2018-04-03 16:47:47 -04:00
..
2017-03-13 14:06:36 -05:00
2017-03-28 15:45:08 -03:00
2017-10-17 19:47:20 -03:00
2018-04-03 16:47:47 -04:00

Auto unittest generation

  1. You need a Linux program that exercises a set of interestings intructions. For instance try make in examples/linux.

  2. Run the tracer on your program. It is a gdb wrapper that will execute the program step by step printing pre/pos information on each instruction:

python make_dump.py ../../examples/linux/nostdlib32 > mytest.dump

(Several dumps can be concatenated togheter)

  1. Generate the actual python unittest based on the dump.
python make_tests.py mytest.dump > SymbolicExecutor/tests/test_example.py

This will get up to 1000 testcases for the same mnemonic in the dump.

  1. Run the test:
python -m unittest -c test_example