Dynamic Fault Injection via Runtime Function Switching
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional software testing techniques fail to provide comprehensive coverage for unexpected input or output events and operational anomalies, and existing fault injection methods are not cost-effective, time-efficient, or adaptable for unit, system, and integration-level testing without access to source code.
Innovation Solution
A dynamic fault injection system that uses a program binary, a fault-injected library, and a script to suspend and resume execution, dynamically linking functions during runtime, allowing for comprehensive testing without modifying the source code or requiring access to it.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If conventional software testing techniques are used, then normal operational usage is tested, but coverage for unexpected input events, output events, and operational anomalies is insufficient
Solution Approach 1:
The system dynamically switches between normal function implementations and fault-injected versions during runtime based on test requirements. The dynamic linker/loader modifies function symbol resolutions in real-time, allowing the same binary to be tested under multiple fault conditions without recompilation, thus achieving both comprehensive coverage and adaptability
2Adaptability or versatility
If static fault injection techniques are used, then fault injection capability is provided, but flexibility to dynamically adapt to changing testing requirements is limited
Solution Approach 1:
The dynamic linker/loader acts as an intermediary between the program binary and the fault injection library. It resolves function symbols by intercepting linker requests and redirecting them to appropriate implementations (normal or fault-injected) based on test configuration, providing dynamic adaptability without modifying the original program code
3Reliability
If comprehensive fault injection testing is implemented, then testing thoroughness is improved, but time efficiency and cost effectiveness deteriorate
Solution Approach 1:
The system creates a copy of the original program binary and uses dynamic linking to substitute function implementations with fault-injected versions. This allows comprehensive fault testing without modifying or recompiling the original source code, significantly reducing testing time and cost while maintaining thoroughness
Data Source
AI summary
An approach is provided for performing software fault injection code testing in a framework that allows testers to place flexible tracing and monitoring actions into algorithmic scripts which provide instructions for dynamically switching called software program functions to corresponding fault injected functions during program execution and that allows testers to perform fault injection testing without requiring modification or access to the underlying source code of the software program being tested. The framework suspends execution of the software program when certain conditions are met, removes any existing linking to called functions, changes the software program's runtime dynamic linking, performs any other instructions provided by the algorithmic script, and then resumes the software program's execution until execution of the program is complete or until the framework is again instructed to change the software program's runtime dynamic linking.


