Bitflip Fault Simulation Platform by Daniele Rizzieri (2021)
The platform injects a random bitflip in each of N copies of a binary file. Then it executed them, analysing the outcomes.
Required Linux packages:
Test Binary File Guidelines
In order to be properly testable, the program under test must be compliant with the following guidelines:
- Application's output must be redirected to the standard output virtual file (i.e., it must be instructed to print the functional results to screen/console)
- Application's behaviour and functional output must be fully deterministic: the tester must ensure that the entire code does not depend on time or other random variables. Examples:
- if some kind of randomization function is involved, the tester must fix the randomization seed;
- if some kind of time related function is involved, the tester must either suppress it or fix the time dependant variable;
- The test application must be compiled from code, following the here reported guidelines:
- During the compilation the debug symbols must be included using the GCC option "-g"
- The application must be statically linked, through the "-static" compilation option
- When compiling, the tester should avoid the compiler optimization options "-o#"
Remember to set a value for the global setting variables in the code, not accessible via command parameters (see bfsp.py for more details):
- binary file name
- binary arguments
- hang timeout
Put SW executable file*** under test in ./run/ folder
[*** Read carefully Test Binary File Guidelines section]
Type "python3 bfsp.py -h" or "python3 bfsp.py --help" for usage info:
> Usage: python3 bfsp.py -n N [options]
-n N, N = number of injections
-s r_seed, Set the random seed to r_seed
-v, --verbose, To produce verbose output report
-c, --clean, To clean the bitflipped libraries folder and exit
-z, --zip, To compact all the reports in ./reports/ in a summary\
See crash report in the file indicated at end of execution.
See execution report in the file indicated at end of execution.
Output File Locations
- ./bitflipped_binaries/ --> binaries with injected bitflips
- ./bitflipped_binaries/results/ --> functional results of the binaries
- ./core_dumps/ --> coredump files of crashed processes in
- ./gdb_logs/ --> log files from gdb analysis of the coredumps
- ./exec_reports/ --> reports with info about the exit codes and hang processes
- ./crash_reports/ --> reports with info about the crashed processes