Test Cases for ASST 2
This document contains pointers to files with test cases for your assignment.
The file syscall.c has two new system calls added to it. Previously syscall had only SYS_reboot, now it contains SYS_read and SYS_write already implemented. This file should replace "src/kern/arch/mips/mips/syscall.c"
The file sh.c is a simple shell program which makes calls to fork(), execv(), waitpid(), and _exit(). These calls result in "Unknown system call" error. As soon as you implement the system calls, the error will vanish. The shell can take input from the keyboard and outputs to the console using SYS_read and SYS_write. This file repleces "src/bin/sh/sh.c"
After adding the sys_read and sys_write, changing the syscall.c and sh.c files, you may compile it following instructions similar to those used for ASST0
To add the sys_read and sys_write functions, trace back how sys_reboot is defined and registered. To compilel the newly created shell file (sh.c) go to ~/os161/src/bin/sh and make depend, make, and make install. Then from the ~/os161/root type "sys161 kernel" and in your own kernel type "p /bin/sh" to run the newly created shell.