badcall - make invalid system calls
badcall contains a variety of tests for system call error conditions and error handling. The tests are grouped by system call; all available tests for a particular system call are run when that system call is selected.
None of the tests should crash the system. If you kill processes when system calls fail with EFAULT (a valid thing to do) badcall itself may get killed. Otherwise, badcall should not get killed either.
Tests may be selected on the command line; if so, all the tests selected on the command line will be run in order. If nothing is selected on the command line, a menu is printed and tests are prompted for.
The tests for the individual syscalls are specified with the letters `a' through `y'. A single-digit number may also be specified; this tests all the system calls that are supposed to work once the corresponding assignment is completed. `*' may be used to test everything. Use `!' to quit.
badcall can test every system call. It requires read and write itself to work properly, and some of the tests may use syscalls other than the ones being tested.
At the completion of each assignment, the system should pass the tests for the syscalls associated with that (and previous) assignments. At no time should anything badcall does crash the system.
Ideally, your course staff will have updated the copy of badcall you received with OS/161 to reflect the system calls required in each of the assignments in your course. In practice, this will probably not be the case. It is likely a better idea to test each system call explicitly than rely on the per-assignment lists.