Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
The CAN/CSA-ISO/IEC 13210-02 standard, formally designated as CAN/CSA-ISO/IEC 13210-02 (R2016), is the Canadian adoption of the international standard ISO/IEC 13210:1999, Information technology — Portable Operating System Interface (POSIX) — Test methods for measuring conformance to POSIX. This standard provides a rigorous framework for developing and executing conformance tests for implementations claiming compliance with POSIX specifications, particularly IEEE Std 1003.1.
The primary scope of CAN/CSA-ISO/IEC 13210-02 is to define a set of test methods that enable objective, repeatable assessment of an operating system’s adherence to the POSIX system interfaces and headers. It specifies the format and structure of test assertions, the required behaviour of a test driver, and the procedures for reporting results. The standard covers both mandatory and optional POSIX interfaces, ensuring that implementers can verify conformance for a wide range of system capabilities, from file I/O and process management to threading and real-time extensions.
This standard plays a vital role in ensuring software portability across different UNIX-like systems. By providing a common test methodology, it allows developers and certifying bodies to evaluate POSIX compliance consistently, reducing interoperability risks in multi-platform environments.
The technical core of CAN/CSA-ISO/IEC 13210-02 is the detailed description of test assertions and the test suite architecture. Each assertion targets a specific requirement from the POSIX specification, and the standard provides guidelines on how to structure, document, and execute these assertions reliably.
A test assertion is a single, verifiable claim about the behaviour of a POSIX interface. Each assertion explicitly references the relevant POSIX clause and specifies the input conditions, expected output, and pass/fail criteria. The standard mandates that test assertions be machine-parseable and accompanied by explanatory comments to facilitate review and maintenance.
The test methods encompass a wide range of POSIX functionality, grouped into the following categories:
| Category | Description | Example Interfaces |
|---|---|---|
| System Interfaces (Mandatory) | Required functions for process control, file I/O, signal handling, and system management. | open(), read(), fork(), wait() |
| System Interfaces (Optional) | Functions that are part of option groups (e.g., sporo, memlock, pthreads). | pthread_create(), mmap(), sched_setscheduler() |
| Headers | Tests that check the correct definition of types, constants, and macro expansions in required header files. | <unistd.h>, <sys/types.h> |
| Behaviour Assertions | Semantic checks that verify correct system behaviour under defined conditions, including error handling. | Return of ENOENT for nonexistent file, atomicity of write() |
| Thread Synchronization | Mutex operations, condition variables, barriers as defined in POSIX Threads. | pthread_mutex_lock(), pthread_cond_wait() |
The standard requires that a conformant test suite include a test driver capable of executing individual assertions, grouping them into test scenarios, and generating summary reports. The driver must handle multiple execution contexts (e.g., single-threaded, multi-process) and provide traceability back to the original POSIX requirement. The test results are classified as PASS, FAIL, or UNSUPPORTED (for optional interfaces).
Building a conformant test suite in accordance with CAN/CSA-ISO/IEC 13210-02 involves several key steps:
sysconf() or pathconf()) to determine if the option is supported. Tests for unsupported options should yield an UNSUPPORTED result, not a failure.A typical test assertion in C might look like the following simplified example:
/* TEST: Assert that open() returns -1 for a nonexistent file */ #include <fcntl.h> #include <errno.h>
int main() { int fd = open("/nonexistent_file", O_RDONLY); if (fd == -1 && errno == ENOENT) { return 0; /* PASS */ } else { return 1; /* FAIL */ } }
While elementary, this pattern scales to hundreds of assertions covering the full POSIX surface. The standard encourages the use of test automation frameworks that manage the execution of such assertions in a systematic, repeatable manner.
Conformance to CAN/CSA-ISO/IEC 13210-02 is typically required as part of a broader POSIX certification program, such as the IEEE POSIX Conformance Test Suite or the Open Group’s UNIX® certification. The standard itself does not include a certification mark but provides the technical foundation for testing.
Organisations seeking to claim conformance to POSIX often submit their test results derived from a test suite built according to 13210. Certification bodies review the test logs, the test harness configuration, and the implementation’s interpretation of the POSIX standard. The test suite must be executed on the exact hardware and software configuration that will be marketed as compliant.
Although ISO/IEC 13210 was officially withdrawn in 2005 (superseded by newer testing frameworks such as the Open Group’s VSPSE), many production test suites still rely on its methodology. CAN/CSA-ISO/IEC 13210-02 remains in effect in Canada as a stable reference for legacy projects and hybrid environments. It continues to be cited in procurement specifications for embedded and safety-critical systems that require a high degree of POSIX portability.
sysconf()). Test assertions for optional interfaces must first detect whether the interface is available. If it is not, the assertion is marked as UNSUPPORTED rather than FAIL. The test report must list all non-tested optional interfaces for transparency.