Link Search Menu Expand Document

Running Pintos tests

To run an individual test from the Pintos test suite, first enter the relevant subdirectory of src/ for the project you are working on (e.g. userprog) Make sure you have built the relevant executables by running make, then run pintos-test with the name of the test you would like to run.

For example, to run the stack-align-0 test, you would enter the userprog directory and do the following:

pintos-test stack-align-0

Alternatively, if you’ve forgotten the exact name of the test you’d like to run, or would like to browse through the available tests, you can run pintos-test with just part of a test’s name, and then use the interactive menu to select which test to actually run. For example, try substituting pintos-test align for pintos-test stack-align-0 in the previous example. You’ll be presented with a menu containing all tests that fuzzily matched the argument you gave to pintos-test, which in this case should show you all of the stack-align-N tests, since the argument provided was align. You can type more characters to narrow down the selection further (for example type ‘2’ and you’ll see the results are narrowed down to just stack-align-2), as well as using the up/down arrow keys to scroll through the options.

Once you’ve selected the test you’d like to run, simply press Enter and the test will be run.