diff --git a/src/examples/file_syscall_tests.c b/src/examples/file_syscall_tests.c index 53358eb20bbef5ca12853dbab2aa4aac399647d1..190a49fad85b105698e342084e2f96069b7873b7 100644 --- a/src/examples/file_syscall_tests.c +++ b/src/examples/file_syscall_tests.c @@ -9,9 +9,9 @@ Test program for basic system calls. Inspired by previous versions by various IDA-employees / lab-assistanst. - + Emergency exit QEMU bu pressing C-a x (release Ctrl before pressing x) - + DONE: Warn when '\r' instead of '\n' DONE: Check result for JUNK DONE: Compare/verify content of buffer after reads. @@ -42,13 +42,13 @@ int main(int argc, char* argv[]) { int id = JUNK; int i, j; - + msg ( "* ------------------ write screen test ------------------ *" ); { char* msg = "Now displaying the arguments to main\n"; int length = strlen (msg); int result = JUNK; - + result = write (STDOUT_FILENO, msg, length); for ( i = 0; i < argc; ++i ) @@ -56,18 +56,18 @@ int main(int argc, char* argv[]) write (STDOUT_FILENO, argv[i], strlen (argv[i]) ); write (STDOUT_FILENO, "\n", 1); } - + verify (length == result); } end ( "* -------------------- press enter ---------------------- *" ); - + printf ("To emergency exit QEMU at any time:\n"); printf ("Hold 'Control' and press 'a' and then \n"); printf ("release 'Control' and press 'x'\n"); - + end ( "* -------------------- press enter ---------------------- *" ); - + msg ( "* ----------------- read keyboard test ------------------ *" ); { char* input = "qwerty1234"; @@ -77,48 +77,48 @@ int main(int argc, char* argv[]) char yes; init_buffer(buffer, 10); - + printf ("Will now try to read 10 characters.\n"); printf ("Please write \"%s\": ", input); result = read ( STDIN_FILENO, buffer, 10 ); length = strlen( buffer ); printf ("\nThe following characters was read: '%s'\n", buffer); - + verify ( length == result && memcmp(buffer, input, 10) == 0 ); - + printf ("\nDid you see each character as you typed it? (y/n) "); result = read ( STDIN_FILENO, &yes, 1 ); printf ("\n"); - + verify ( result == 1 && yes == 'y'); } end ( "* -------------------- press enter ---------------------- *" ); - + msg ( "* ------------------ create file test ------------------- *" ); { int success = JUNK; - + printf ("Will try to create 'test.txt'\n"); - success = create("test.txt", SIZE); + success = create("test.txt", SIZE); verify ( success != JUNK && success ); } end ( "* -------------------- press enter ---------------------- *" ); - + msg ( "* ------------------ open file test --------------------- *" ); { printf ("Will try to open 'non_existent_file'\n"); - id = open("non_existent_file"); + id = open("non_existent_file"); verify ( id == -1 ); - + printf ("Will try to open 'test.txt'\n"); id = open("test.txt"); verify ( id > 1 ); } end ( "* -------------------- press enter ---------------------- *" ); - + msg ( "* ------------------ write file test -------------------- *" ); { char buffer[8]; @@ -126,7 +126,7 @@ int main(int argc, char* argv[]) bool success = true; init_buffer(buffer, 8); - + printf ("Will try to write a sequence to '%d'\n", id); for ( i = 0; i < 16; ++i) { @@ -147,21 +147,21 @@ int main(int argc, char* argv[]) } end ( "* -------------------- press enter ---------------------- *" ); - + msg ( "* ------------------ read file test --------------------- *" ); { char buffer[8]; char verify_buffer[8]; int result = JUNK; bool success = true; - + init_buffer(buffer, 8); init_buffer(verify_buffer, 8); - + printf ("Will try to reopen 'test.txt'\n"); close(id); id = open("test.txt"); - + printf ("Will try to read a sequence from '%d'\n", id); for ( i = 0; i < 16; ++i) { @@ -171,7 +171,7 @@ int main(int argc, char* argv[]) result = read(id, buffer, 4); success = success && (result == 4); result = write(STDOUT_FILENO, buffer, 4); - + success = success && (memcmp(buffer, verify_buffer, 4) == 0); } result = write(STDOUT_FILENO, "\n", 1); @@ -184,31 +184,31 @@ int main(int argc, char* argv[]) } end ( "* -------------------- press enter ---------------------- *" ); - + msg ( "* ------------------ close file test -------------------- *" ); { char buffer[128]; int result = JUNK; - + init_buffer(buffer, 128); - + printf ("Will try to close 'STDIN_FILENO' and then read from it.\n"); printf ("Write some input please: "); close(STDIN_FILENO); result = get_line(buffer, 128); verify ( result < 128 && result == (int)strlen(buffer) ); - + printf ("Will try to close 'STDOUT_FILENO' and then write to it.\n"); close(STDOUT_FILENO); result = write(STDOUT_FILENO, buffer, strlen(buffer)); printf ("\n"); verify ( result == (int)strlen(buffer) ); - + printf ("Will try to close id '%d' and then read from it\n", id); close(id); result = read(id, buffer, 128); verify ( result == -1 ); - + printf ("Will try to close id '%d' and then read from it\n", id); close(JUNK); result = read(JUNK, buffer, 128); @@ -216,42 +216,42 @@ int main(int argc, char* argv[]) } end ( "* -------------------- press enter ---------------------- *" ); - + msg ( "* ------------------ remove file test ------------------- *" ); { int success = JUNK; - + printf ("Will try to remove 'test.txt' and then open it\n"); success = remove("test.txt"); - id = open("test.txt"); + id = open("test.txt"); verify ( success && id == -1 ); - + printf ("Will try to remove 'non_existent_file'\n"); success = remove("non_existent_file"); verify ( ! success ); } end ( "* -------------------- press enter ---------------------- *" ); - + printf ("To emergency exit QEMU at any time:\n"); printf ("Hold 'Control' and press 'a' and then \n"); printf ("release 'Control' and press 'x'\n"); - + end ( "* -------------------- press enter ---------------------- *" ); - + msg ( "* ---------------- seek/tell file test ------------------ *" ); { char buffer[8]; char verify_buffer[8]; int result = JUNK; int success = CRAP; - + init_buffer(buffer, 8); init_buffer(verify_buffer, 8); - + printf ("Will try to create and open 'test.txt'\n"); success = create("test.txt", SIZE); - id = open("test.txt"); + id = open("test.txt"); verify ( success != CRAP && success && id > 1 ); printf ("Will try to write a sequence to '%d'\n", id); @@ -270,18 +270,18 @@ int main(int argc, char* argv[]) result = write(STDOUT_FILENO, "\n", 1); } verify ( success ); - + printf ("Will try to read the sequence from '%d'\n", id); seek (id, 0); for ( i = 0; i < 16; ++i) { for ( j = 0; j < 16; ++j) { - snprintf (verify_buffer, 8, "%4d", i*16+j); + snprintf (verify_buffer, 8, "%4d", i*16+j); result = read(id, buffer, 4); success = success && (result == 4); result = write(STDOUT_FILENO, buffer, 4); - + success = success && (memcmp(buffer, verify_buffer, 4) == 0); } result = write(STDOUT_FILENO, "\n", 1); @@ -305,7 +305,7 @@ const char* crlf_warning = ("\033[1;31;40mWARNING\033[1;0m: " static void skip_line( void ) { char c = '\0'; - + while ( c != '\n' && c != '\r' ) read ( STDIN_FILENO, &c, 1); @@ -317,14 +317,14 @@ static void skip_line( void ) static int get_line( char* buf, int size ) { int i; - + for ( i = 0; i < (size - 1); ++i) { buf[i] = '\0'; - + if (read ( STDIN_FILENO, buf+i, 1) != 1) return -1; - + if ( buf[i] == '\r' ) write ( STDOUT_FILENO, crlf_warning, strlen ( crlf_warning ) ); @@ -343,10 +343,10 @@ static void verify(int test) const char* result[3] = {"\033[1;31;40m WRONG RESULT \033[1;0m \n", "\033[1;32;40m RESULT OK \033[1;0m \n", "\033[1;31;40m BAD BOOLEAN \033[1;0m \n"}; - + if (test < 0 || test > 1) test = 2; - + write ( STDOUT_FILENO, result[ test ], strlen (result[ test ]) ); } diff --git a/src/filesys/directory.c b/src/filesys/directory.c index dfaff73f0aaf186e07a5d9519cdebefebdf63bdd..4401808007d09e079da998a604db44818153f891 100644 --- a/src/filesys/directory.c +++ b/src/filesys/directory.c @@ -103,7 +103,6 @@ lookup (const struct dir *dir, const char *name, { struct dir_entry e; size_t ofs; - ASSERT (dir != NULL); ASSERT (name != NULL); @@ -134,12 +133,13 @@ dir_lookup (const struct dir *dir, const char *name, ASSERT (name != NULL); lock_acquire(&dir_lock); + if (lookup (dir, name, &e, NULL)) *inode = inode_open (e.inode_sector); else *inode = NULL; - lock_release(&dir_lock); + lock_release(&dir_lock); return *inode != NULL; } diff --git a/src/filesys/filesys.c b/src/filesys/filesys.c index c21510279b1d9dc9ac5fe29403ab56fed7194701..3a1b116ab03a5f9a3043b840837c72e2eda6ee64 100644 --- a/src/filesys/filesys.c +++ b/src/filesys/filesys.c @@ -73,10 +73,12 @@ filesys_open (const char *name) struct dir *dir = dir_open_root (); struct inode *inode = NULL; struct file *file = NULL; + file_close(file); - if (dir != NULL && dir_lookup (dir, name, &inode)) - file = file_open (inode); + if (dir != NULL) + dir_lookup (dir, name, &inode); + file = file_open (inode); dir_close (dir); return file; diff --git a/src/filesys/inode.c b/src/filesys/inode.c index a82642bb193885fa1b9e97a6e630aa0f54c23861..88de076bf9ebf61e5cb3173ecb0e185c8a42b82c 100644 --- a/src/filesys/inode.c +++ b/src/filesys/inode.c @@ -192,9 +192,12 @@ inode_close (struct inode *inode) { lock_acquire(&list_lock); /* Ignore null pointer. */ + if (inode == NULL) + { + lock_release(&list_lock); return; - + } lock_acquire(&inode->inode_lock); /* Release resources if this was the last opener. */ diff --git a/src/threads/thread.c b/src/threads/thread.c index dbf0cf143b0685e849fc79471fd975498a4e2d6f..6617e277c6e7d22d6bbd3facec7f44b5444e1ef0 100644 --- a/src/threads/thread.c +++ b/src/threads/thread.c @@ -549,7 +549,7 @@ schedule (void) ASSERT (is_thread (next)); //wake up any threads that has slept long enough - pmap_for_each(&process_table, try_wake, 0); + //pmap_for_each(&process_table, try_wake, 0); if (cur != next) prev = switch_threads (cur, next); diff --git a/src/userprog/check.err b/src/userprog/check.err index aeb5c71086b135e14fe07fb320fbf381269e125c..054bfede84cc5ef8d23cadedca7c5f0e6bb14649 100644 --- a/src/userprog/check.err +++ b/src/userprog/check.err @@ -1,8 +1,9 @@ -20+1 records in -21+0 records out -86016 bytes (86 kB, 84 KiB) copied, 0,000136171 s, 632 MB/s +make[1]: *** [../../tests/Make.tests:105: tests/userprog/wait-killed.output] Interrupt +make[1]: *** [../../tests/Make.tests:105: tests/filesys/base/lg-create.output] Interrupt +make[1]: *** [../../tests/Make.tests:105: tests/userprog/multi-recurse.output] Interrupt +make[1]: *** [../../tests/Make.tests:105: tests/filesys/base/lg-full.output] Interrupt +make[1]: *** [../../tests/Make.tests:105: tests/klaar/pfs.output] Interrupt make[1]: *** [../../tests/Make.tests:105: tests/userprog/wait-twice.output] Interrupt -make[1]: *** [../../tests/Make.tests:105: tests/userprog/open-missing.output] Interrupt -make[1]: *** [../../tests/Make.tests:105: tests/userprog/open-empty.output] Interrupt -make[1]: *** [../../tests/Make.tests:105: tests/userprog/exec-missing.output] Interrupt +make[1]: *** [../../tests/Make.tests:105: tests/userprog/wait-bad-pid.output] Interrupt +make[1]: *** [../../tests/Make.tests:105: tests/userprog/multi-child-fd.output] Interrupt make: *** [../Makefile.kernel:10: check] Interrupt diff --git a/src/userprog/check.tmp b/src/userprog/check.tmp index 8f3cf2aac8492c8ff10b13752fa4fbec5285795f..b708676932fcf06f0820f64f57ec6f4d4a1af0ec 100644 --- a/src/userprog/check.tmp +++ b/src/userprog/check.tmp @@ -1,13 +1,5 @@ cd build && make check make[1]: Entering directory '/home/davidnorell/tdiu16-eget/src/userprog/build' -gcc -m32 -c ../../userprog/syscall.c -o userprog/syscall.o -std=gnu99 -ggdb -msoft-float -fno-omit-frame-pointer -ffreestanding -fno-inline -fno-pic -O -fno-stack-protector -nostdinc -I../.. -I../../lib -I../../lib/kernel -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Wsystem-headers -DPINTOS -DUSERPROG -DFILESYS -MMD -MF userprog/syscall.d -ld -melf_i386 -T threads/kernel.lds.s -o kernel.o threads/init.o threads/thread.o threads/switch.o threads/interrupt.o threads/intr-stubs.o threads/synch.o threads/palloc.o threads/malloc.o threads/start.o threads/boundedbuffer.o threads/synchlist.o devices/timer.o devices/kbd.o devices/vga.o devices/serial.o devices/disk.o devices/input.o devices/intq.o lib/debug.o lib/random.o lib/stdio.o lib/stdlib.o lib/string.o lib/arithmetic.o lib/kernel/debug.o lib/kernel/list.o lib/kernel/bitmap.o lib/kernel/hash.o lib/kernel/console.o lib/kernel/slist.o userprog/process.o userprog/load.o userprog/pagedir.o userprog/exception.o userprog/syscall.o userprog/gdt.o userprog/tss.o userprog/flist.o userprog/plist.o filesys/filesys.o filesys/free-map.o filesys/file.o filesys/directory.o filesys/inode.o filesys/fsutil.o -objcopy -O binary -R .note -R .comment -S kernel.o kernel.bin.tmp -dd if=kernel.bin.tmp of=kernel.bin bs=4096 conv=sync -rm kernel.bin.tmp -gcc -m32 -c ../../threads/loader.S -o threads/loader.o -Wa,--gstabs -nostdinc -I../.. -I../../lib -I../../lib/kernel -DPINTOS -DUSERPROG -DFILESYS -DKERNEL_LOAD_PAGES=`perl -e 'print +(-s "kernel.bin") / 4096;'` -ld -melf_i386 -N -e start -Ttext 0x7c00 --oformat binary -o loader.bin threads/loader.o -cat loader.bin kernel.bin > os.dsk pintos -v -k -T 60 --qemu --fs-disk=2 -p tests/klaar/read-bad-buf -a read-bad-buf -p ../../tests/klaar/sample.txt -a sample.txt -- -q -F=10000 -f run read-bad-buf < /dev/null 2> tests/klaar/read-bad-buf.errors > tests/klaar/read-bad-buf.allput pintos -v -k -T 60 --qemu --fs-disk=2 -p tests/klaar/low-mem -a low-mem -p tests/klaar/child-simple -a child-simple -- -q -F=10000 -tcl=3 -f run low-mem < /dev/null 2> tests/klaar/low-mem.errors > tests/klaar/low-mem.allput pintos -v -k -T 60 --qemu --fs-disk=2 -p tests/klaar/exec-corrupt -a exec-corrupt -p ../../tests/klaar/corrupt-elf -a corrupt-elf -- -q -F=10000 -f run exec-corrupt < /dev/null 2> tests/klaar/exec-corrupt.errors > tests/klaar/exec-corrupt.allput @@ -72,1098 +64,3 @@ pintos -v -k -T 60 --qemu --fs-disk=2 -p tests/userprog/multi-recurse -a multi- pintos -v -k -T 60 --qemu --fs-disk=2 -p tests/userprog/multi-child-fd -a multi-child-fd -p ../../tests/userprog/sample.txt -a sample.txt -p tests/userprog/child-close -a child-close -- -q -F=10000 -f run multi-child-fd < /dev/null 2> tests/userprog/multi-child-fd.errors > tests/userprog/multi-child-fd.allput pintos -v -k -T 60 --qemu --fs-disk=2 -p tests/filesys/base/lg-create -a lg-create -- -q -F=10000 -f run lg-create < /dev/null 2> tests/filesys/base/lg-create.errors > tests/filesys/base/lg-create.allput pintos -v -k -T 60 --qemu --fs-disk=2 -p tests/filesys/base/lg-full -a lg-full -- -q -F=10000 -f run lg-full < /dev/null 2> tests/filesys/base/lg-full.errors > tests/filesys/base/lg-full.allput -pintos -v -k -T 60 --qemu --fs-disk=2 -p tests/filesys/base/lg-random -a lg-random -- -q -F=10000 -f run lg-random < /dev/null 2> tests/filesys/base/lg-random.errors > tests/filesys/base/lg-random.allput -pintos -v -k -T 60 --qemu --fs-disk=2 -p tests/filesys/base/lg-seq-block -a lg-seq-block -- -q -F=10000 -f run lg-seq-block < /dev/null 2> tests/filesys/base/lg-seq-block.errors > tests/filesys/base/lg-seq-block.allput -pintos -v -k -T 60 --qemu --fs-disk=2 -p tests/filesys/base/lg-seq-random -a lg-seq-random -- -q -F=10000 -f run lg-seq-random < /dev/null 2> tests/filesys/base/lg-seq-random.errors > tests/filesys/base/lg-seq-random.allput -pintos -v -k -T 60 --qemu --fs-disk=2 -p tests/filesys/base/sm-create -a sm-create -- -q -F=10000 -f run sm-create < /dev/null 2> tests/filesys/base/sm-create.errors > tests/filesys/base/sm-create.allput -pintos -v -k -T 60 --qemu --fs-disk=2 -p tests/filesys/base/sm-full -a sm-full -- -q -F=10000 -f run sm-full < /dev/null 2> tests/filesys/base/sm-full.errors > tests/filesys/base/sm-full.allput -pintos -v -k -T 60 --qemu --fs-disk=2 -p tests/filesys/base/sm-random -a sm-random -- -q -F=10000 -f run sm-random < /dev/null 2> tests/filesys/base/sm-random.errors > tests/filesys/base/sm-random.allput -pintos -v -k -T 60 --qemu --fs-disk=2 -p tests/filesys/base/sm-seq-block -a sm-seq-block -- -q -F=10000 -f run sm-seq-block < /dev/null 2> tests/filesys/base/sm-seq-block.errors > tests/filesys/base/sm-seq-block.allput -pintos -v -k -T 60 --qemu --fs-disk=2 -p tests/filesys/base/sm-seq-random -a sm-seq-random -- -q -F=10000 -f run sm-seq-random < /dev/null 2> tests/filesys/base/sm-seq-random.errors > tests/filesys/base/sm-seq-random.allput -pintos -v -k -T 300 --qemu --fs-disk=2 -p tests/filesys/base/syn-read -a syn-read -p tests/filesys/base/child-syn-read -a child-syn-read -- -q -F=10000 -f run syn-read < /dev/null 2> tests/filesys/base/syn-read.errors > tests/filesys/base/syn-read.allput -pintos -v -k -T 60 --qemu --fs-disk=2 -p tests/filesys/base/syn-remove -a syn-remove -- -q -F=10000 -f run syn-remove < /dev/null 2> tests/filesys/base/syn-remove.errors > tests/filesys/base/syn-remove.allput -pintos -v -k -T 60 --qemu --fs-disk=2 -p tests/filesys/base/syn-write -a syn-write -p tests/filesys/base/child-syn-wrt -a child-syn-wrt -- -q -F=10000 -f run syn-write < /dev/null 2> tests/filesys/base/syn-write.errors > tests/filesys/base/syn-write.allput -perl -I../.. ../../tests/klaar/read-bad-buf.ck tests/klaar/read-bad-buf tests/klaar/read-bad-buf.result -FAIL tests/klaar/read-bad-buf -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -perl -I../.. ../../tests/klaar/low-mem.ck tests/klaar/low-mem tests/klaar/low-mem.result -FAIL tests/klaar/low-mem -Test output failed to match any acceptable form. - -Acceptable output: - (low-mem) begin - (low-mem) exec("child-simple"): -1 - (low-mem) end - low-mem: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (low-mem) begin - (low-mem) exec("child-simple"): -1 - (low-mem) end -- low-mem: exit(0) -+ -+ Process exit(3), status: 0 -+ -perl -I../.. ../../tests/klaar/exec-corrupt.ck tests/klaar/exec-corrupt tests/klaar/exec-corrupt.result -FAIL tests/klaar/exec-corrupt -Test output failed to match any acceptable form. - -Acceptable output: - (exec-corrupt) begin - load: corrupt-elf: error loading executable - corrupt-elf: exit(-1) - (exec-corrupt) exec("corrupt-elf"): -1 - (exec-corrupt) end - exec-corrupt: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (exec-corrupt) begin -+ Checkpoint 6 - load: corrupt-elf: error loading executable -- corrupt-elf: exit(-1) - (exec-corrupt) exec("corrupt-elf"): -1 - (exec-corrupt) end -- exec-corrupt: exit(0) -+ -+ Process exit(3), status: 0 -+ -Acceptable output: - (exec-corrupt) begin - load: corrupt-elf: error loading executable - (exec-corrupt) exec("corrupt-elf"): -1 - (exec-corrupt) end - corrupt-elf: exit(-1) - exec-corrupt: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (exec-corrupt) begin -+ Checkpoint 6 - load: corrupt-elf: error loading executable - (exec-corrupt) exec("corrupt-elf"): -1 - (exec-corrupt) end -- corrupt-elf: exit(-1) -- exec-corrupt: exit(0) -+ -+ Process exit(3), status: 0 -+ -Acceptable output: - (exec-corrupt) begin - (exec-corrupt) exec("corrupt-elf"): -1 - (exec-corrupt) end - exec-corrupt: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (exec-corrupt) begin -+ Checkpoint 6 -+ load: corrupt-elf: error loading executable - (exec-corrupt) exec("corrupt-elf"): -1 - (exec-corrupt) end -- exec-corrupt: exit(0) -+ -+ Process exit(3), status: 0 -+ -Acceptable output: - (exec-corrupt) begin - load: corrupt-elf: error loading executable - (exec-corrupt) exec("corrupt-elf"): -1 - (exec-corrupt) end - exec-corrupt: exit(0) - corrupt-elf: exit(-1) -Differences in `diff -u' format: -+ Checkpoint 6 - (exec-corrupt) begin -+ Checkpoint 6 - load: corrupt-elf: error loading executable - (exec-corrupt) exec("corrupt-elf"): -1 - (exec-corrupt) end -- exec-corrupt: exit(0) -- corrupt-elf: exit(-1) -+ -+ Process exit(3), status: 0 -+ -Acceptable output: - (exec-corrupt) begin - load: corrupt-elf: error loading executable - (exec-corrupt) exec("corrupt-elf"): -1 - (exec-corrupt) end - exec-corrupt: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (exec-corrupt) begin -+ Checkpoint 6 - load: corrupt-elf: error loading executable - (exec-corrupt) exec("corrupt-elf"): -1 - (exec-corrupt) end -- exec-corrupt: exit(0) -+ -+ Process exit(3), status: 0 -+ -Acceptable output: - (exec-corrupt) begin - load: corrupt-elf: error loading executable - (exec-corrupt) exec("corrupt-elf"): -1 - corrupt-elf: exit(-1) - (exec-corrupt) end - exec-corrupt: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (exec-corrupt) begin -+ Checkpoint 6 - load: corrupt-elf: error loading executable - (exec-corrupt) exec("corrupt-elf"): -1 -- corrupt-elf: exit(-1) - (exec-corrupt) end -- exec-corrupt: exit(0) -+ -+ Process exit(3), status: 0 -+ -perl -I../.. ../../tests/klaar/pfs.ck tests/klaar/pfs tests/klaar/pfs.result -FAIL tests/klaar/pfs -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -perl -I../.. ../../tests/filst/sc-bad-write.ck tests/filst/sc-bad-write tests/filst/sc-bad-write.result -FAIL tests/filst/sc-bad-write -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -perl -I../.. ../../tests/filst/sc-bad-close.ck tests/filst/sc-bad-close tests/filst/sc-bad-close.result -FAIL tests/filst/sc-bad-close -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -perl -I../.. ../../tests/filst/sc-bad-nr-1.ck tests/filst/sc-bad-nr-1 tests/filst/sc-bad-nr-1.result -FAIL tests/filst/sc-bad-nr-1 -Test output failed to match any acceptable form. - -Acceptable output: - (sc-bad-nr-1) begin - sc-bad-nr-1: exit(-1) -Differences in `diff -u' format: -+ Checkpoint 6 - (sc-bad-nr-1) begin -- sc-bad-nr-1: exit(-1) -+ Executed an unknown system call! -+ Stack top + 0: 22 -+ Stack top + 1: 0 -Acceptable output: - (sc-bad-nr-1) begin - Executed an unknown system call! - Stack top + 0: 21 - Stack top + 1: 0 - sc-bad-nr-1: exit(-1) -Differences in `diff -u' format: -+ Checkpoint 6 - (sc-bad-nr-1) begin - Executed an unknown system call! -- Stack top + 0: 21 -+ Stack top + 0: 22 - Stack top + 1: 0 -- sc-bad-nr-1: exit(-1) -perl -I../.. ../../tests/filst/sc-bad-nr-2.ck tests/filst/sc-bad-nr-2 tests/filst/sc-bad-nr-2.result -FAIL tests/filst/sc-bad-nr-2 -Test output failed to match any acceptable form. - -Acceptable output: - (sc-bad-nr-2) begin - sc-bad-nr-2: exit(-1) -Differences in `diff -u' format: -+ Checkpoint 6 - (sc-bad-nr-2) begin -- sc-bad-nr-2: exit(-1) -+ Executed an unknown system call! -+ Stack top + 0: 1048576 -+ Stack top + 1: 0 -Acceptable output: - (sc-bad-nr-2) begin - Executed an unknown system call! - Stack top + 0: 1048576 - Stack top + 1: 0 - sc-bad-nr-2: exit(-1) -Differences in `diff -u' format: -+ Checkpoint 6 - (sc-bad-nr-2) begin - Executed an unknown system call! - Stack top + 0: 1048576 - Stack top + 1: 0 -- sc-bad-nr-2: exit(-1) -perl -I../.. ../../tests/filst/sc-bad-nr-3.ck tests/filst/sc-bad-nr-3 tests/filst/sc-bad-nr-3.result -FAIL tests/filst/sc-bad-nr-3 -Test output failed to match any acceptable form. - -Acceptable output: - (sc-bad-nr-3) begin - Executed an unknown system call! - Stack top + 0: -1 - Stack top + 1: 0 - sc-bad-nr-3: exit(-1) -Differences in `diff -u' format: -+ Checkpoint 6 - (sc-bad-nr-3) begin - Executed an unknown system call! - Stack top + 0: -1 - Stack top + 1: 0 -- sc-bad-nr-3: exit(-1) -Acceptable output: - (sc-bad-nr-3) begin - sc-bad-nr-3: exit(-1) -Differences in `diff -u' format: -+ Checkpoint 6 - (sc-bad-nr-3) begin -- sc-bad-nr-3: exit(-1) -+ Executed an unknown system call! -+ Stack top + 0: -1 -+ Stack top + 1: 0 -perl -I../.. ../../tests/userprog/args-none.ck tests/userprog/args-none tests/userprog/args-none.result -FAIL tests/userprog/args-none -Test output failed to match any acceptable form. - -Acceptable output: - (args) begin - (args) argc = 1 - (args) argv[0] = 'args-none' - (args) argv[1] = null - (args) end - args-none: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (args) begin - (args) argc = 1 - (args) argv[0] = 'args-none' - (args) argv[1] = null - (args) end -- args-none: exit(0) -+ -+ Process exit(3), status: 0 -+ -perl -I../.. ../../tests/userprog/args-single.ck tests/userprog/args-single tests/userprog/args-single.result -FAIL tests/userprog/args-single -Test output failed to match any acceptable form. - -Acceptable output: - (args) begin - (args) argc = 2 - (args) argv[0] = 'args-single' - (args) argv[1] = 'onearg' - (args) argv[2] = null - (args) end - args-single: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (args) begin - (args) argc = 2 - (args) argv[0] = 'args-single' - (args) argv[1] = 'onearg' - (args) argv[2] = null - (args) end -- args-single: exit(0) -+ -+ Process exit(3), status: 0 -+ -perl -I../.. ../../tests/userprog/args-multiple.ck tests/userprog/args-multiple tests/userprog/args-multiple.result -FAIL tests/userprog/args-multiple -Test output failed to match any acceptable form. - -Acceptable output: - (args) begin - (args) argc = 5 - (args) argv[0] = 'args-multiple' - (args) argv[1] = 'some' - (args) argv[2] = 'arguments' - (args) argv[3] = 'for' - (args) argv[4] = 'you!' - (args) argv[5] = null - (args) end - args-multiple: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (args) begin - (args) argc = 5 - (args) argv[0] = 'args-multiple' - (args) argv[1] = 'some' - (args) argv[2] = 'arguments' - (args) argv[3] = 'for' - (args) argv[4] = 'you!' - (args) argv[5] = null - (args) end -- args-multiple: exit(0) -+ -+ Process exit(3), status: 0 -+ -perl -I../.. ../../tests/userprog/args-many.ck tests/userprog/args-many tests/userprog/args-many.result -FAIL tests/userprog/args-many -Test output failed to match any acceptable form. - -Acceptable output: - (args) begin - (args) argc = 23 - (args) argv[0] = 'args-many' - (args) argv[1] = 'a' - (args) argv[2] = 'b' - (args) argv[3] = 'c' - (args) argv[4] = 'd' - (args) argv[5] = 'e' - (args) argv[6] = 'f' - (args) argv[7] = 'g' - (args) argv[8] = 'h' - (args) argv[9] = 'i' - (args) argv[10] = 'j' - (args) argv[11] = 'k' - (args) argv[12] = 'l' - (args) argv[13] = 'm' - (args) argv[14] = 'n' - (args) argv[15] = 'o' - (args) argv[16] = 'p' - (args) argv[17] = 'q' - (args) argv[18] = 'r' - (args) argv[19] = 's' - (args) argv[20] = 't' - (args) argv[21] = 'u' - (args) argv[22] = 'v' - (args) argv[23] = null - (args) end - args-many: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (args) begin - (args) argc = 23 - (args) argv[0] = 'args-many' - (args) argv[1] = 'a' - (args) argv[2] = 'b' - (args) argv[3] = 'c' - (args) argv[4] = 'd' - (args) argv[5] = 'e' - (args) argv[6] = 'f' - (args) argv[7] = 'g' - (args) argv[8] = 'h' - (args) argv[9] = 'i' - (args) argv[10] = 'j' - (args) argv[11] = 'k' - (args) argv[12] = 'l' - (args) argv[13] = 'm' - (args) argv[14] = 'n' - (args) argv[15] = 'o' - (args) argv[16] = 'p' - (args) argv[17] = 'q' - (args) argv[18] = 'r' - (args) argv[19] = 's' - (args) argv[20] = 't' - (args) argv[21] = 'u' - (args) argv[22] = 'v' - (args) argv[23] = null - (args) end -- args-many: exit(0) -+ -+ Process exit(3), status: 0 -+ -perl -I../.. ../../tests/userprog/args-dbl-space.ck tests/userprog/args-dbl-space tests/userprog/args-dbl-space.result -FAIL tests/userprog/args-dbl-space -Test output failed to match any acceptable form. - -Acceptable output: - (args) begin - (args) argc = 3 - (args) argv[0] = 'args-dbl-space' - (args) argv[1] = 'two' - (args) argv[2] = 'spaces!' - (args) argv[3] = null - (args) end - args-dbl-space: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (args) begin - (args) argc = 3 - (args) argv[0] = 'args-dbl-space' - (args) argv[1] = 'two' - (args) argv[2] = 'spaces!' - (args) argv[3] = null - (args) end -- args-dbl-space: exit(0) -+ -+ Process exit(3), status: 0 -+ -perl -I../.. ../../tests/userprog/sc-bad-sp.ck tests/userprog/sc-bad-sp tests/userprog/sc-bad-sp.result -FAIL tests/userprog/sc-bad-sp -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -perl -I../.. ../../tests/userprog/sc-bad-arg.ck tests/userprog/sc-bad-arg tests/userprog/sc-bad-arg.result -FAIL tests/userprog/sc-bad-arg -Test output failed to match any acceptable form. - -Acceptable output: - (sc-bad-arg) begin - sc-bad-arg: exit(-1) -Differences in `diff -u' format: -+ Checkpoint 6 - (sc-bad-arg) begin -- sc-bad-arg: exit(-1) -+ -+ Process exit(3), status: -268370093 -+ -perl -I../.. ../../tests/userprog/sc-boundary.ck tests/userprog/sc-boundary tests/userprog/sc-boundary.result -FAIL tests/userprog/sc-boundary -Test output failed to match any acceptable form. - -Acceptable output: - (sc-boundary) begin - sc-boundary: exit(42) -Differences in `diff -u' format: -+ Checkpoint 6 - (sc-boundary) begin -- sc-boundary: exit(42) -+ -+ Process exit(3), status: 42 -+ -perl -I../.. ../../tests/userprog/sc-boundary-2.ck tests/userprog/sc-boundary-2 tests/userprog/sc-boundary-2.result -FAIL tests/userprog/sc-boundary-2 -Test output failed to match any acceptable form. - -Acceptable output: - (sc-boundary-2) begin - sc-boundary-2: exit(67) -Differences in `diff -u' format: -+ Checkpoint 6 - (sc-boundary-2) begin -- sc-boundary-2: exit(67) -+ -+ Process exit(3), status: 67 -+ -perl -I../.. ../../tests/userprog/halt.ck tests/userprog/halt tests/userprog/halt.result -pass tests/userprog/halt -perl -I../.. ../../tests/userprog/exit.ck tests/userprog/exit tests/userprog/exit.result -FAIL tests/userprog/exit -Test output failed to match any acceptable form. - -Acceptable output: - (exit) begin - exit: exit(57) -Differences in `diff -u' format: -+ Checkpoint 6 - (exit) begin -- exit: exit(57) -+ -+ Process exit(3), status: 57 -+ -perl -I../.. ../../tests/userprog/create-normal.ck tests/userprog/create-normal tests/userprog/create-normal.result -FAIL tests/userprog/create-normal -Test output failed to match any acceptable form. - -Acceptable output: - (create-normal) begin - (create-normal) create quux.dat - (create-normal) end - create-normal: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (create-normal) begin - (create-normal) create quux.dat - (create-normal) end -- create-normal: exit(0) -+ -+ Process exit(3), status: 0 -+ -perl -I../.. ../../tests/userprog/create-empty.ck tests/userprog/create-empty tests/userprog/create-empty.result -FAIL tests/userprog/create-empty -Test output failed to match any acceptable form. - -Acceptable output: - (create-empty) begin - create-empty: exit(-1) -Differences in `diff -u' format: -+ Checkpoint 6 - (create-empty) begin -- create-empty: exit(-1) -+ (create-empty) create(""): 0 -+ (create-empty) end -+ -+ Process exit(3), status: 0 -+ -Acceptable output: - (create-empty) begin - (create-empty) create(""): 0 - (create-empty) end - create-empty: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (create-empty) begin - (create-empty) create(""): 0 - (create-empty) end -- create-empty: exit(0) -+ -+ Process exit(3), status: 0 -+ -perl -I../.. ../../tests/userprog/create-null.ck tests/userprog/create-null tests/userprog/create-null.result -perl -I../.. ../../tests/userprog/create-bad-ptr.ck tests/userprog/create-bad-ptr tests/userprog/create-bad-ptr.result -FAIL tests/userprog/create-null -Kernel panic in run: PANIC at ../../filesys/directory.c:153 in dir_add(): assertion `name != NULL' failed. -perl -I../.. ../../tests/userprog/create-long.ck tests/userprog/create-long tests/userprog/create-long.result -FAIL tests/userprog/create-long -Test output failed to match any acceptable form. - -Acceptable output: - (create-long) begin - (create-long) create("x..."): 0 - (create-long) end - create-long: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (create-long) begin - (create-long) create("x..."): 0 - (create-long) end -- create-long: exit(0) -+ -+ Process exit(3), status: 0 -+ -FAIL tests/userprog/create-bad-ptr -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -perl -I../.. ../../tests/userprog/create-exists.ck tests/userprog/create-exists tests/userprog/create-exists.result -perl -I../.. ../../tests/userprog/create-bound.ck tests/userprog/create-bound tests/userprog/create-bound.result -FAIL tests/userprog/create-bound -Test output failed to match any acceptable form. - -Acceptable output: - (create-bound) begin - (create-bound) create("quux.dat"): 1 - (create-bound) end - create-bound: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (create-bound) begin - (create-bound) create("quux.dat"): 1 - (create-bound) end -- create-bound: exit(0) -+ -+ Process exit(3), status: 0 -+ -FAIL tests/userprog/create-exists -Test output failed to match any acceptable form. - -Acceptable output: - (create-exists) begin - (create-exists) create quux.dat - (create-exists) create warble.dat - (create-exists) try to re-create quux.dat - (create-exists) create baffle.dat - (create-exists) try to re-create quux.dat - (create-exists) end - create-exists: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (create-exists) begin - (create-exists) create quux.dat - (create-exists) create warble.dat - (create-exists) try to re-create quux.dat - (create-exists) create baffle.dat - (create-exists) try to re-create quux.dat - (create-exists) end -- create-exists: exit(0) -+ -+ Process exit(3), status: 0 -+ -perl -I../.. ../../tests/userprog/open-normal.ck tests/userprog/open-normal tests/userprog/open-normal.result -perl -I../.. ../../tests/userprog/open-boundary.ck tests/userprog/open-boundary tests/userprog/open-boundary.result -FAIL tests/userprog/open-normal -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -FAIL tests/userprog/open-boundary -Test output failed to match any acceptable form. - -Acceptable output: - (open-boundary) begin - (open-boundary) open "sample.txt" - (open-boundary) end - open-boundary: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (open-boundary) begin - (open-boundary) open "sample.txt" - (open-boundary) end -- open-boundary: exit(0) -+ -+ Process exit(3), status: 0 -+ -+ owned by entered -perl -I../.. ../../tests/userprog/open-null.ck tests/userprog/open-null tests/userprog/open-null.result -perl -I../.. ../../tests/userprog/open-bad-ptr.ck tests/userprog/open-bad-ptr tests/userprog/open-bad-ptr.result -FAIL tests/userprog/open-null -Kernel panic in run: PANIC at ../../filesys/directory.c:127 in dir_lookup(): assertion `name != NULL' failed. -FAIL tests/userprog/open-bad-ptr -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -perl -I../.. ../../tests/userprog/open-twice.ck tests/userprog/open-twice tests/userprog/open-twice.result -perl -I../.. ../../tests/userprog/close-normal.ck tests/userprog/close-normal tests/userprog/close-normal.result -FAIL tests/userprog/open-twice -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -FAIL tests/userprog/close-normal -Test output failed to match any acceptable form. - -Acceptable output: - (close-normal) begin - (close-normal) open "sample.txt" - (close-normal) close "sample.txt" - (close-normal) end - close-normal: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (close-normal) begin - (close-normal) open "sample.txt" - (close-normal) close "sample.txt" - (close-normal) end -- close-normal: exit(0) -+ -+ Process exit(3), status: 0 -+ -perl -I../.. ../../tests/userprog/close-twice.ck tests/userprog/close-twice tests/userprog/close-twice.result -perl -I../.. ../../tests/userprog/close-stdin.ck tests/userprog/close-stdin tests/userprog/close-stdin.result -perl -I../.. ../../tests/userprog/close-stdout.ck tests/userprog/close-stdout tests/userprog/close-stdout.result -FAIL tests/userprog/close-twice -Test output failed to match any acceptable form. - -Acceptable output: - (close-twice) begin - (close-twice) open "sample.txt" - (close-twice) close "sample.txt" - (close-twice) close "sample.txt" again - (close-twice) end - close-twice: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (close-twice) begin - (close-twice) open "sample.txt" - (close-twice) close "sample.txt" - (close-twice) close "sample.txt" again - (close-twice) end -- close-twice: exit(0) -+ -+ Process exit(3), status: 0 -+ -Acceptable output: - (close-twice) begin - (close-twice) open "sample.txt" - (close-twice) close "sample.txt" - (close-twice) close "sample.txt" again - close-twice: exit(-1) -Differences in `diff -u' format: -+ Checkpoint 6 - (close-twice) begin - (close-twice) open "sample.txt" - (close-twice) close "sample.txt" - (close-twice) close "sample.txt" again -- close-twice: exit(-1) -+ (close-twice) end -+ -+ Process exit(3), status: 0 -+ -perl -I../.. ../../tests/userprog/close-bad-fd.ck tests/userprog/close-bad-fd tests/userprog/close-bad-fd.result -FAIL tests/userprog/close-stdin -Test output failed to match any acceptable form. - -Acceptable output: - (close-stdin) begin - close-stdin: exit(-1) -Differences in `diff -u' format: -+ Checkpoint 6 - (close-stdin) begin -- close-stdin: exit(-1) -+ (close-stdin) end -+ -+ Process exit(3), status: 0 -+ -Acceptable output: - (close-stdin) begin - (close-stdin) end - close-stdin: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (close-stdin) begin - (close-stdin) end -- close-stdin: exit(0) -+ -+ Process exit(3), status: 0 -+ -perl -I../.. ../../tests/userprog/read-normal.ck tests/userprog/read-normal tests/userprog/read-normal.result -FAIL tests/userprog/close-stdout -Test output failed to match any acceptable form. - -Acceptable output: - (close-stdout) begin - close-stdout: exit(-1) -Differences in `diff -u' format: -+ Checkpoint 6 - (close-stdout) begin -- close-stdout: exit(-1) -+ (close-stdout) end -+ -+ Process exit(3), status: 0 -+ -Acceptable output: - (close-stdout) begin - (close-stdout) end - close-stdout: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (close-stdout) begin - (close-stdout) end -- close-stdout: exit(0) -+ -+ Process exit(3), status: 0 -+ -perl -I../.. ../../tests/userprog/read-bad-ptr.ck tests/userprog/read-bad-ptr tests/userprog/read-bad-ptr.result -FAIL tests/userprog/close-bad-fd -Test output failed to match any acceptable form. - -Acceptable output: - (close-bad-fd) begin - (close-bad-fd) end - close-bad-fd: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (close-bad-fd) begin - (close-bad-fd) end -- close-bad-fd: exit(0) -+ -+ Process exit(3), status: 0 -+ -Acceptable output: - (close-bad-fd) begin - close-bad-fd: exit(-1) -Differences in `diff -u' format: -+ Checkpoint 6 - (close-bad-fd) begin -- close-bad-fd: exit(-1) -+ (close-bad-fd) end -+ -+ Process exit(3), status: 0 -+ -perl -I../.. ../../tests/userprog/read-boundary.ck tests/userprog/read-boundary tests/userprog/read-boundary.result -FAIL tests/userprog/read-normal -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -perl -I../.. ../../tests/userprog/read-zero.ck tests/userprog/read-zero tests/userprog/read-zero.result -FAIL tests/userprog/read-bad-ptr -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -perl -I../.. ../../tests/userprog/read-stdout.ck tests/userprog/read-stdout tests/userprog/read-stdout.result -FAIL tests/userprog/read-boundary -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -perl -I../.. ../../tests/userprog/read-bad-fd.ck tests/userprog/read-bad-fd tests/userprog/read-bad-fd.result -perl -I../.. ../../tests/userprog/write-normal.ck tests/userprog/write-normal tests/userprog/write-normal.result -FAIL tests/userprog/read-zero -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -perl -I../.. ../../tests/userprog/write-bad-ptr.ck tests/userprog/write-bad-ptr tests/userprog/write-bad-ptr.result -FAIL tests/userprog/read-stdout -Test output failed to match any acceptable form. - -Acceptable output: - (read-stdout) begin - (read-stdout) end - read-stdout: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (read-stdout) begin - (read-stdout) end -- read-stdout: exit(0) -+ -+ Process exit(3), status: 0 -+ -Acceptable output: - (read-stdout) begin - read-stdout: exit(-1) -Differences in `diff -u' format: -+ Checkpoint 6 - (read-stdout) begin -- read-stdout: exit(-1) -+ (read-stdout) end -+ -+ Process exit(3), status: 0 -+ -perl -I../.. ../../tests/userprog/write-boundary.ck tests/userprog/write-boundary tests/userprog/write-boundary.result -FAIL tests/userprog/read-bad-fd -Test output failed to match any acceptable form. - -Acceptable output: - (read-bad-fd) begin - (read-bad-fd) end - read-bad-fd: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (read-bad-fd) begin - (read-bad-fd) end -- read-bad-fd: exit(0) -+ -+ Process exit(3), status: 0 -+ -Acceptable output: - (read-bad-fd) begin - read-bad-fd: exit(-1) -Differences in `diff -u' format: -+ Checkpoint 6 - (read-bad-fd) begin -- read-bad-fd: exit(-1) -+ (read-bad-fd) end -+ -+ Process exit(3), status: 0 -+ -perl -I../.. ../../tests/userprog/write-zero.ck tests/userprog/write-zero tests/userprog/write-zero.result -FAIL tests/userprog/write-normal -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -perl -I../.. ../../tests/userprog/write-stdin.ck tests/userprog/write-stdin tests/userprog/write-stdin.result -FAIL tests/userprog/write-boundary -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -perl -I../.. ../../tests/userprog/write-bad-fd.ck tests/userprog/write-bad-fd tests/userprog/write-bad-fd.result -FAIL tests/userprog/write-bad-ptr -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -perl -I../.. ../../tests/userprog/exec-once.ck tests/userprog/exec-once tests/userprog/exec-once.result -FAIL tests/userprog/write-zero -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -perl -I../.. ../../tests/userprog/exec-arg.ck tests/userprog/exec-arg tests/userprog/exec-arg.result -FAIL tests/userprog/write-stdin -Test output failed to match any acceptable form. - -Acceptable output: - (write-stdin) begin - write-stdin: exit(-1) -Differences in `diff -u' format: -+ Checkpoint 6 - (write-stdin) begin -- write-stdin: exit(-1) -+ (write-stdin) end -+ -+ Process exit(3), status: 0 -+ -Acceptable output: - (write-stdin) begin - (write-stdin) end - write-stdin: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (write-stdin) begin - (write-stdin) end -- write-stdin: exit(0) -+ -+ Process exit(3), status: 0 -+ -perl -I../.. ../../tests/userprog/exec-multiple.ck tests/userprog/exec-multiple tests/userprog/exec-multiple.result -FAIL tests/userprog/write-bad-fd -Test output failed to match any acceptable form. - -Acceptable output: - (write-bad-fd) begin - (write-bad-fd) end - write-bad-fd: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (write-bad-fd) begin - (write-bad-fd) end -- write-bad-fd: exit(0) -+ -+ Process exit(3), status: 0 -+ -Acceptable output: - (write-bad-fd) begin - write-bad-fd: exit(-1) -Differences in `diff -u' format: -+ Checkpoint 6 - (write-bad-fd) begin -- write-bad-fd: exit(-1) -+ (write-bad-fd) end -+ -+ Process exit(3), status: 0 -+ -FAIL tests/userprog/exec-once -Test output failed to match any acceptable form. - -Acceptable output: - (exec-once) begin - (child-simple) run - child-simple: exit(81) - (exec-once) end - exec-once: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (exec-once) begin -+ Checkpoint 6 - (child-simple) run -- child-simple: exit(81) -+ -+ Process exit(4), status: 81 -+ - (exec-once) end -- exec-once: exit(0) -+ -+ Process exit(3), status: 0 -+ -perl -I../.. ../../tests/userprog/exec-bad-ptr.ck tests/userprog/exec-bad-ptr tests/userprog/exec-bad-ptr.result -perl -I../.. ../../tests/userprog/wait-simple.ck tests/userprog/wait-simple tests/userprog/wait-simple.result -FAIL tests/userprog/exec-arg -Test output failed to match any acceptable form. - -Acceptable output: - (exec-arg) begin - (args) begin - (args) argc = 2 - (args) argv[0] = 'child-args' - (args) argv[1] = 'childarg' - (args) argv[2] = null - (args) end - child-args: exit(0) - (exec-arg) end - exec-arg: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (exec-arg) begin -+ Checkpoint 6 - (args) begin - (args) argc = 2 - (args) argv[0] = 'child-args' - (args) argv[1] = 'childarg' - (args) argv[2] = null - (args) end -- child-args: exit(0) -+ -+ Process exit(4), status: 0 -+ - (exec-arg) end -- exec-arg: exit(0) -+ -+ Process exit(3), status: 0 -+ -FAIL tests/userprog/exec-multiple -Test output failed to match any acceptable form. - -Acceptable output: - (exec-multiple) begin - (child-simple) run - child-simple: exit(81) - (child-simple) run - child-simple: exit(81) - (child-simple) run - child-simple: exit(81) - (child-simple) run - child-simple: exit(81) - (exec-multiple) end - exec-multiple: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (exec-multiple) begin -+ Checkpoint 6 - (child-simple) run -- child-simple: exit(81) -+ -+ Process exit(4), status: 81 -+ -+ Checkpoint 6 - (child-simple) run -- child-simple: exit(81) -+ -+ Process exit(5), status: 81 -+ -+ Checkpoint 6 - (child-simple) run -- child-simple: exit(81) -+ -+ Process exit(6), status: 81 -+ -+ Checkpoint 6 - (child-simple) run -- child-simple: exit(81) -+ -+ Process exit(7), status: 81 -+ - (exec-multiple) end -- exec-multiple: exit(0) -+ -+ Process exit(3), status: 0 -+ -perl -I../.. ../../tests/userprog/wait-killed.ck tests/userprog/wait-killed tests/userprog/wait-killed.result -perl -I../.. ../../tests/userprog/wait-bad-pid.ck tests/userprog/wait-bad-pid tests/userprog/wait-bad-pid.result -FAIL tests/userprog/exec-bad-ptr -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -perl -I../.. ../../tests/userprog/multi-recurse.ck tests/userprog/multi-recurse tests/userprog/multi-recurse.result -FAIL tests/userprog/wait-simple -Test output failed to match any acceptable form. - -Acceptable output: - (wait-simple) begin - (child-simple) run - child-simple: exit(81) - (wait-simple) wait(exec()) = 81 - (wait-simple) end - wait-simple: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (wait-simple) begin -+ Checkpoint 6 - (child-simple) run -- child-simple: exit(81) -- (wait-simple) wait(exec()) = 81 -+ -+ Process exit(4), status: 81 -+ -+ (wait-simple) wait(exec()) = 4 - (wait-simple) end -- wait-simple: exit(0) -+ -+ Process exit(3), status: 0 -+ -perl -I../.. ../../tests/userprog/multi-child-fd.ck tests/userprog/multi-child-fd tests/userprog/multi-child-fd.result -FAIL tests/userprog/wait-killed -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -FAIL tests/userprog/wait-bad-pid -Test output failed to match any acceptable form. - -Acceptable output: - (wait-bad-pid) begin - (wait-bad-pid) end - wait-bad-pid: exit(0) -Differences in `diff -u' format: -+ Checkpoint 6 - (wait-bad-pid) begin - (wait-bad-pid) end -- wait-bad-pid: exit(0) -+ -+ Process exit(3), status: 0 -+ -Acceptable output: - (wait-bad-pid) begin - wait-bad-pid: exit(-1) -Differences in `diff -u' format: -+ Checkpoint 6 - (wait-bad-pid) begin -- wait-bad-pid: exit(-1) -+ (wait-bad-pid) end -+ -+ Process exit(3), status: 0 -+ -perl -I../.. ../../tests/filesys/base/lg-create.ck tests/filesys/base/lg-create tests/filesys/base/lg-create.result -perl -I../.. ../../tests/filesys/base/lg-full.ck tests/filesys/base/lg-full tests/filesys/base/lg-full.result -FAIL tests/userprog/multi-recurse -run: wait(exec("multi-recurse 0")) returned 18: FAILED -perl -I../.. ../../tests/filesys/base/lg-random.ck tests/filesys/base/lg-random tests/filesys/base/lg-random.result -FAIL tests/userprog/multi-child-fd -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -perl -I../.. ../../tests/filesys/base/lg-seq-block.ck tests/filesys/base/lg-seq-block tests/filesys/base/lg-seq-block.result -FAIL tests/filesys/base/lg-full -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -FAIL tests/filesys/base/lg-create -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -perl -I../.. ../../tests/filesys/base/lg-seq-random.ck tests/filesys/base/lg-seq-random tests/filesys/base/lg-seq-random.result -perl -I../.. ../../tests/filesys/base/sm-create.ck tests/filesys/base/sm-create tests/filesys/base/sm-create.result -FAIL tests/filesys/base/lg-random -run: write 512 bytes at offset 6144 failed: FAILED -FAIL tests/filesys/base/lg-seq-block -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -perl -I../.. ../../tests/filesys/base/sm-full.ck tests/filesys/base/sm-full tests/filesys/base/sm-full.result -perl -I../.. ../../tests/filesys/base/sm-random.ck tests/filesys/base/sm-random tests/filesys/base/sm-random.result -FAIL tests/filesys/base/lg-seq-random -Run didn't start up properly: no "Pintos booting" message -FAIL tests/filesys/base/sm-create -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -perl -I../.. ../../tests/filesys/base/sm-seq-block.ck tests/filesys/base/sm-seq-block tests/filesys/base/sm-seq-block.result -perl -I../.. ../../tests/filesys/base/sm-seq-random.ck tests/filesys/base/sm-seq-random tests/filesys/base/sm-seq-random.result -FAIL tests/filesys/base/sm-full -run: write 5678 bytes at offset 0 in "quux" failed: FAILED -FAIL tests/filesys/base/sm-random -run: write 13 bytes at offset 858 failed: FAILED -perl -I../.. ../../tests/filesys/base/syn-read.ck tests/filesys/base/syn-read tests/filesys/base/syn-read.result -perl -I../.. ../../tests/filesys/base/syn-remove.ck tests/filesys/base/syn-remove tests/filesys/base/syn-remove.result -FAIL tests/filesys/base/sm-seq-block -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -perl -I../.. ../../tests/filesys/base/syn-write.ck tests/filesys/base/syn-write tests/filesys/base/syn-write.result -FAIL tests/filesys/base/syn-read -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -FAIL tests/filesys/base/syn-remove -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel -FAIL tests/filesys/base/sm-seq-random -Run didn't start up properly: no "Pintos booting" message -FAIL tests/filesys/base/syn-write -Kernel panic in run: PANIC at ../../userprog/exception.c:100 in kill(): Kernel bug - unexpected interrupt in kernel diff --git a/src/userprog/messages b/src/userprog/messages index d70983f70aee5893e7a5924ad02e774c7057c0ff..02515b05b5be6efb2e9a6eccd8d19ffe92d927b8 100644 Binary files a/src/userprog/messages and b/src/userprog/messages differ diff --git a/src/userprog/process.c b/src/userprog/process.c index f8dc6121c8c85f9d34db26258a2e7500f71071b8..c77fd5bcb3bf944cc2758fa7a84b6fce706e1269 100644 --- a/src/userprog/process.c +++ b/src/userprog/process.c @@ -35,13 +35,11 @@ struct main_args void* setup_main_stack(const char* command_line, void* stack_top); -static struct lock exit_lock; /* This function is called at boot time (threads/init.c) to initialize * the process subsystem. */ void process_init(void) { pmap_init(&process_table); - lock_init(&exit_lock); } /* This function is currently never called. As thread_exit does not @@ -204,9 +202,9 @@ start_process (struct parameters_to_start_process* parameters) /* Add process information to process list */ struct process* p = malloc(sizeof(struct process)); ptype_init(p, parameters->par_id, thread_current()->name); //create value type for process list - int inserted UNUSED = pmap_insert(&process_table, thread_tid(), p); + pmap_insert(&process_table, thread_tid(), p); - if ( ! success /*|| inserted == -1*/) + if ( ! success ) { *(parameters->chi_id) = -1; sema_up(¶meters->arg_sem); @@ -299,12 +297,10 @@ process_cleanup (void) * that may sometimes poweroff as soon as process_wait() returns, * possibly before the printf is completed.) */ - lock_acquire(&exit_lock); + /* remove process from process table */ struct process *p = pmap_find(&process_table, thread_tid()); - //synkronisera open_file_table och process_table - if(p != NULL) { status = p->exit_status; @@ -329,12 +325,12 @@ process_cleanup (void) //remove all child process that is marked as dead from the process list pmap_remove_if(&process_table, parent_ded, 0); + //close all files opened by this process map_for_each(&open_file_table, pf_close, thread_tid()); /* remove all open files in table for this process */ map_remove_if(&open_file_table, owned_by, 0); - lock_release(&exit_lock); /* Destroy the current process's page directory and switch back to the kernel-only page directory. */ if (pd != NULL) diff --git a/src/userprog/syscall.c b/src/userprog/syscall.c index 1826418097a458483059733a7f6449c4541f4623..504c073379e6036314b08053c8ae700133a14015 100644 --- a/src/userprog/syscall.c +++ b/src/userprog/syscall.c @@ -218,7 +218,6 @@ bool remove(int32_t* esp) process_exit(-1); thread_exit(); } - return filesys_remove((char*)esp[1]); } @@ -233,7 +232,6 @@ int open(int32_t* esp) process_exit(-1); thread_exit(); } - struct file *file = filesys_open((char*)esp[1]); if(file == NULL) return -1;