Skip to content

Latest commit

 

History

History

symqemu

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

SymQEMU tests

The purpose of those tests is to automatically run SymQEMU on some known binaries and check that it gives the expected outputs (i.e. check that it generates the expected test cases).

To run the tests, cd into this directory and run:

python3 -m unittest test.py

The directory binaries contain a directory for each test binary. A test binary directory contains the following:

  • An executable file binary
  • A file input whose path will be given as an argument to binary and whose content will be symbolic
  • A text file args that contains the arguments binary will be called with. One of the arguments must be @@ and it will be replaced with the path of the input file.
  • A directory expected_outputs: the test cases that SymQEMU should generate when called like this: <symqemu> <path/to/binary> <args>, with the content of input being symbolic.

Adding a test

  • Create a new directory in binaries and put the files binary and input inside it
  • Run python3 init-new <name of your new binary directory>. This will run SymQEMU on your new binary, create a new directory binaries/<name of your new directory>/expected_outputs and store the test cases generated by SymQEMU in it.
  • Edit test.py to add your binary