Product of the Week: Solid Sands SuperGuard C Library Safety Qualification Suite

June 02, 2021

Blog

Product of the Week: Solid Sands SuperGuard C Library Safety Qualification Suite

Adhering to the requirements of complex functional safety standards like ISO 26262, EN 50128, and IEC 61508 is, well, complex. Just consider the amount of code coverage this requires, in everything from application software to the various conditions that exist within libraries like C90 and C99 used in all C compilers. That means providing code coverage for code you didn’t even write!

That’s why Solid Sands developed SuperGuard, a C Library Safety Qualification Suite for safety-critical and safety-related systems. Based on Solid Sands’ SuperTest library test and validation suite, SuperGuard was designed as a requirements-centric test solution for the C90 and C99 libraries that is closely aligned with the ISO C specification, which does not define test requirements for every C library function. The SuperGuard tool transforms this specification into testing requirements that account for different implementations of conditional functions in the standard C library and calls out those needed for compliance. 

Those requirements are documented and linked to test specifications within the SuperGuard suite, and then further linked to C library tests in the SuperTest tool. The SuperGuard verification and documentation chain provides full traceability for developers who must demonstrate to international certification authorities that application software, toolchains, methods, and processes comply with safety standards.

Compatible with Windows and Linux systems, the suite works with any C or C++ compiler (including bare metal targets), supports configuration plugins, and can leverage multi-processing capabilities that spread validation runs across so that tests execute more quickly. 

The SuperGuard C Library Safety Qualification Suite in Action

As mentioned, SuperGuard is based on the SuperTest suite that contains library tests for every section of the ISO Standard C library specification. SuperGuard test requirements are derived from these tests to generate cases that are testable from definitions that are otherwise ambiguous. 

For example, the argument of the function 'strlen()' must point to a valid string. That is defined in the C language specification. It is a pre-condition of the strlen() function. If the application developer fails to meet this pre-condition, the program has undefined behavior. That is not good, but it is a well-understood property of C. It is not a requirement that the implementation of the strlen() function verifies that the precondition is true – that is simply not possible in C. So, this pre-condition is a requirement on the programmer. It does not lead to a test for the implementation of strlen().


This process results in a detailed, structured list of requirements, which are then converted into test specifications for those requirements that are testable. The suite can also generate multiple test specifications for a single requirement. For those elements that are implementation defined, SuperGuard provides engineers with full control to add their own tests or adapt generated test sets.

Structural code coverage tools can then be applied to the library implementation. Solid Sands has used this methodology to achieve up to 100 percent code coverage for the MUSL-C library implementation and high modified condition/decision coverage.

After tests have run, the SuperGuard reporting tool can link results back to previously-generated requirements that are housed in the suite and provide an overview of those implementations that met requirements and those that failed.

The linking and documentation from the ISO Standard C library specification to the generation of test requirements through the creation test specifications and execution of tests all the way to reporting is the verification chain needed for compliance with today’s safety-critical standards.

Getting Started with the SuperGuard C Library Safety Qualification Suite

Overall, the SuperGuard test suite eases the safety qualification process by allowing developers to map their software to the requirements of safety-critical systems. The full SuperGuard C Library Safety Qualification Suite will be available this summer as a standalone solution and as an add-on to SuperTest. A C++ standard library version is also currently being developed.

For more information, visit https://solidsands.com or check out the resources below.