summaryrefslogtreecommitdiff
path: root/usertests.c
diff options
context:
space:
mode:
authorrsc <rsc>2006-07-16 15:36:31 +0000
committerrsc <rsc>2006-07-16 15:36:31 +0000
commit9b37d1bfaa65c96e7a465c285599aa45117182ea (patch)
tree58a2e6a4b3ecd7ad5921cfaab9dd5a78ad932448 /usertests.c
parentb903b693ec1525f1c033fa8738f78a6d956f1adf (diff)
downloadxv6-labs-9b37d1bfaa65c96e7a465c285599aa45117182ea.tar.gz
xv6-labs-9b37d1bfaa65c96e7a465c285599aa45117182ea.tar.bz2
xv6-labs-9b37d1bfaa65c96e7a465c285599aa45117182ea.zip
Add user.h for prototypes.
Add cons_puts for cleaner output.
Diffstat (limited to 'usertests.c')
-rw-r--r--usertests.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/usertests.c b/usertests.c
index e277839..78b9477 100644
--- a/usertests.c
+++ b/usertests.c
@@ -1,3 +1,5 @@
+#include "user.h"
+
char buf[2048];
// simple fork and pipe read/write
@@ -17,10 +19,10 @@ pipe1()
buf[i] = seq++;
if(write(fds[1], buf, 1033) != 1033){
panic("pipe1 oops 1\n");
- exit(1);
+ exit();
}
}
- exit(0);
+ exit();
} else {
close(fds[1]);
total = 0;
@@ -109,12 +111,13 @@ exitwait()
return;
}
} else {
- exit(0);
+ exit();
}
}
puts("exitwait ok\n");
}
+int
main()
{
puts("usertests starting\n");
@@ -123,5 +126,6 @@ main()
preempt();
exitwait();
- panic("usertests finished successfuly");
+ panic("usertests succeeded");
+ return 0;
}