Test on Submission Platform¶
The test is performed through the following 4 steps.
Apply your patch to the kernel source code
Compile the kernel source code
Reboot
Execute a test script which execute a test binary
What submission platform already has¶
Linux kernel source code
Kernel configuration file (.config)
What you will submit¶
You will submit a file named patch.tar.gz that contains patches for the kernel source.
Setting up your working environment¶
For debugging and testing your program, TAs offer files used on submission platform. Supposedly, they will work on our reference VM on VirtualBox. For downloading please click here.
The test environment will allow you to perform tests efficiently and speed up your debugging process.
The tar ball contains following files.
companion (kernel source + configuration file named .config)
test.c (source C code of the test program binary)
script0.sh (a script which applies your patch and compile kernel)
script1.sh (a script which executes a test program binary (compiled test.c))
How to use¶
script0.sh will compile the kernel inside the directory named companion, and install it on your VM.
Note
The default script0.sh does not apply your patch. For applying the patch using script0.sh, you need to remove comment outs in script0.sh.
Danger
Once you enable patch adaptation of script0.sh by removing comment outs, script0.sh will remove a directory named patch for clean up.
Danger
The patches in a directory patch will be applied on top of your current companion. So, if you wish to perform patch adaptation test, you need to locate a new companion which does not have your modification. Please pay attention when you prepare a new companion in order not to overwrite your work.
Note
It would be reccommended to try the patch adaptation test after you save the whole states of your working enironments.
Following command will compile and install the new kernel.:
$ ./script0.sh
After the installation finishes, please reboot for loading the new kernel:
$ sudo reboot
Supposedly, now your VM runs with the new kernel. The next step is running the test. If you do not finish your modification on the kernel yet, the test script should say the test has failed. The entire test is executed by the following command:
$ ./script1.sh
After you add the functionaliteis specified in the assignment to the kernel, please recompile, reboot and run script1.sh again for testing.