Interface Injection with AspectC++ in Embedded Systems

Ulrich Thomas Gabor, Christoph-Cordt von Egidy, Olaf Spinczyk · 2019

Avoiding undefined software behavior in case of software faults is important to ensure a minimum of software quality even in unexpected situations. We discuss interface error injection in the embedded domain, which is used to extend unit testing for successful to faulty executions. Since well-known methods are not applicable, we present a new injection method based on AspectC++, an aspect-oriented language extension for C++, as it allows for automated injection of errors without modifying the C++ source code. Our method is flexible, for example it allows to inject errors into arbitrary software interfaces as well as interfaces defined by specifications. For an application scenario, we consider the POSIX standard, as its importance is growing in embedded systems, and provide automatisms to generate the test environment. We use custom C++ attributes, an AspectC++ language extension, to control the automatic testing process by providing information about potential errors. Finally, we compare it with existing approaches.

Read the paper · More papers on PaperTik