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 of
the tests we will likely 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
# Note: that this is the gnu version of tar.
# 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
# You should now be able to run the tests in the a2-test-script directory.
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 them 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.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 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.
You will most likely want to
design and implement additional tests
that may be simplified versions of
these tests, provide more debugging information,
or test some of the
cases that are not covered by these tests.