# We are assuming your directory structure is as follows # $HOME/cs350-os161 # $HOME/cs350-os161/os161-1.99 # $HOME/cs350-os161/root # # And that kernel-ASST2 is compiled and installed in # $HOME/cs350-os161/root
cd $HOME/cs350-os161cd $HOME/cs350-os161/os161-1.99 tar -xzf /u/cs350/pub/os161_repository/a2-test-scripts.tar.gz cd a2-test-scriptcd a2-test-scripts # This will create some symbolic links make # You should now be able to run the tests in the a2-test-script directory. # The automated testing portion that we use will run make runtests
All the scripts in the a2-test-script directory use the csh so your PATH must be set properly in the .cshrc file.
The directory contains several files named test-*. These files are scripts that test specific features of your kernel by running a small number of programs that are in the testbin directory. You can find out which programs are being run by looking at the contents of each file.
The directory also contains a README file with information about the different tests. Use these scripts to test your system calls as you add them.
The a2-test-script directory also contains a script called run-batch that runs a batch of tests. We will try to run the tests as follows (assuming they are being run from the csh):
# Note: palin produces a long line that may cause problems when using tee # on some systems. ./run-batch |& tee out.1 ./test-rw-con |& tee out.2 ./test-forkbomb |& tee out.3Note that run-batch runs tests in the order used for evaluation. This may not match the order that you would like to use to implement or test the various system calls. For example, one of the tests run by run-batch and one that you might want to start with first and can be run separately is:
# This script tests does a bit of computation # and then calls the _exit system call. ./test-_exitThen you might like to test writing to the console using:
./test-write-conThese tests are not exhaustive but the majority of your testing/implementation mark will come from correctly running these tests.