diff options
author | Robert Morris <[email protected]> | 2011-08-30 20:50:19 -0400 |
---|---|---|
committer | Robert Morris <[email protected]> | 2011-08-30 20:50:19 -0400 |
commit | 5e083578278e340e0661f2dede68676432269f49 (patch) | |
tree | 5783451019b97c53c1b63cb03d313ca1c867acc7 /usertests.c | |
parent | 1ddfbbb194e3aa668b33469eb547132a7a7f940a (diff) | |
download | xv6-labs-5e083578278e340e0661f2dede68676432269f49.tar.gz xv6-labs-5e083578278e340e0661f2dede68676432269f49.tar.bz2 xv6-labs-5e083578278e340e0661f2dede68676432269f49.zip |
enterpgdir -> entrypgdir
Diffstat (limited to 'usertests.c')
-rw-r--r-- | usertests.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/usertests.c b/usertests.c index 455e68a..655610c 100644 --- a/usertests.c +++ b/usertests.c @@ -1,3 +1,4 @@ +#include "param.h" #include "types.h" #include "stat.h" #include "user.h" @@ -240,8 +241,10 @@ pipe1(void) if(cc > sizeof(buf)) cc = sizeof(buf); } - if(total != 5 * 1033) + if(total != 5 * 1033){ printf(1, "pipe1 oops 3 total %d\n", total); + exit(); + } close(fds[0]); wait(); } else { @@ -401,10 +404,12 @@ sharedfd(void) } close(fd); unlink("sharedfd"); - if(nc == 10000 && np == 10000) + if(nc == 10000 && np == 10000){ printf(1, "sharedfd ok\n"); - else + } else { printf(1, "sharedfd oops %d %d\n", nc, np); + exit(); + } } // two processes write two different files at the same @@ -423,7 +428,7 @@ twofiles(void) pid = fork(); if(pid < 0){ printf(1, "fork failed\n"); - return; + exit(); } fname = pid ? "f1" : "f2"; @@ -1582,6 +1587,14 @@ fsfull() printf(1, "fsfull test finished\n"); } +unsigned long randstate = 1; +unsigned int +rand() +{ + randstate = randstate * 1664525 + 1013904223; + return randstate; +} + int main(int argc, char *argv[]) { |