Working instructions for my Pintos development environment on WSL.

For more on the Pintos development environment, see my previous article: Setting up Pintos on WSL with Ubuntu.

Build and test OS

With the shell in ./threads, run make to build the operating system. This action creates a ./threads/build subdirectory.

It is NOT necessary to shell into the build subdirectory to start testing.

Run all tests

Run make check in the shell to run all the tests.

  • All the tests will run on the Bochs x86 emulator.
  • For now this takes about 10 to 12 seconds to complete.
  • Each test has a 60 second timeout. Testing will progress even if the OS breaks during a test.
    • Leave it for a while and then check the test output to see what you can do.
    • Pro-tip: Compare to previous test runs, and to runs on the initial kernels. Make sure to retain some good branch points in version control for this.
  • 20 of 27 tests fail on the initial project. As you progress on implementing the scheduler functions, more tests will pass.

The test results are both printed in terminal and stored in their respective result files.

Upon closer inspection, the build directory has a subdirectory ./build/tests/threads. In this you will find for each test test-name:

  1. test-name.errors with diagnostics output from the Bochs emulator.
  2. test-name.output with the raw output from the test that ran.
  3. test-name.result which either contains the word PASS, or the word FAIL followed by a detailed explanation as expected with Test Driven Development.

Run single tests

If the test has been run previously, then remove test-name.output first. Otherwise the Make script will skip the test. Then pass the respective test-name.result as an argument to make.

In example, to re-run the alarm-priority test:

rm -f build/tests/threads/alarm-priority.output
make build/tests/threads/alarm-priority.result

Launch Pintos and run a single test

For cleanliness in your project folders, shell into the build directory for this part.

To see the operating system in action, use the included pintos Perl utility.

In example, to see Pintos run the priority-change test in the Bochs emulator GUI:

pintos run priority-change

Pro-tip: The GUI may break if the emulator is terminated through the terminal. Use the POWER button in the upper right hand corner of the emulator GUI to “switch off the machine” if necessary.