X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftests%2Fuserprog%2Fsc-boundary-2.c;h=8acf0361e3e7a392f3c9a5143632c134ca646109;hb=1c765c09e567d3da51d5249932daa71f8a74ff9d;hp=47d28c6dfcbcec1de4b2240db03cf6671ef5b5e0;hpb=575dc45e34db19ee7808c116e93485b37e0df716;p=pintos-anon diff --git a/src/tests/userprog/sc-boundary-2.c b/src/tests/userprog/sc-boundary-2.c index 47d28c6..8acf036 100644 --- a/src/tests/userprog/sc-boundary-2.c +++ b/src/tests/userprog/sc-boundary-2.c @@ -1,3 +1,7 @@ +/* Invokes a system call with one byte of the system call's + argument on a separate page from the rest of the bytes. This + must work. */ + #include #include "tests/userprog/boundary.h" #include "tests/lib.h" @@ -9,10 +13,10 @@ test_main (void) /* Make one byte of a syscall argument hang over into a second page. */ int *p = (int *) ((char *) get_boundary_area () - 7); - p[0] = SYS_exit; + p[0] = SYS_EXIT; p[1] = 67; /* Invoke the system call. */ - asm volatile ("movl %0, %%esp; int $0x30" :: "g" (p)); + asm volatile ("movl %0, %%esp; int $0x30" : : "g" (p)); fail ("should have called exit(67)"); }