Test scripts for A2

(REMEMBER TO HIT THE RELOAD BUTTON IN YOUR BROWSER TO SEE THE LATEST VERSION)

Note: The test scripts described and provided here may be revised. The goal is to make available to you some idea of what the tests will be like that we will be running on your kernel. Our goal will be to run the scripts as provided here (if possible).

Installing

These instructions are for using the student.cs environment. If you are working on another system you'll need to copy and transfer the a2-test-scripts.tar.gz file to your system and adjust the tar command below as appropriate.
# We assuming your directory structure is as follows
# $HOME/cs350-os161
# $HOME/cs350-os161/os161-1.11
# $HOME/cs350-os161/root
#
# And that kernel-ASST2 is compiled and installed in 
# $HOME/cs350-os161/root

cd $HOME/cs350-os161

# This creates the directory a2-test-script and its contents.
~cs350/bin/tar -xzf /u/cs350/pub/os161_repository/a2-test-scripts.tar.gz

cd a2-test-script

# This will create some symbolic links
make


Using the test scripts

First read the README file in a2-test-scripts. Use some of the smaller scripts (called by run-batch) to test your system calls as you add them. We will try to run (assuming they are being run from the csh) are:
./run-batch |& tee out.1
./test-rw-con |& tee out.2
./test-forkbomb |& tee out.3
See each script to see what tests they run and to see how to run each test individually. Note that run-batch runs tests in alphabetical order. This may not match the order that you would like to use to implement the various system calls. For example, one of the tests run by the run-batch but 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-_exit
Then you might like to test writing to the console using:
./test-write-con
These tests are not exhaustive but the majority of your testing/implementation mark will come from correctly running these tests. The tests that you design and implement should fill in some of the more obvious holes (test cases) that are not covered by these tests.