summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2020-08-13 10:22:07 -0400
committerRobert Morris <[email protected]>2020-08-13 10:22:07 -0400
commitadee82c3e7334a09996c0fe9cc75d9a80abc81c8 (patch)
treeb29e38cd1aab2cb526dd657ba23d636a93401580 /user
parent4c22c54480f020c36de120ce868912c022e48113 (diff)
downloadxv6-labs-adee82c3e7334a09996c0fe9cc75d9a80abc81c8.tar.gz
xv6-labs-adee82c3e7334a09996c0fe9cc75d9a80abc81c8.tar.bz2
xv6-labs-adee82c3e7334a09996c0fe9cc75d9a80abc81c8.zip
handle another out-of-memory in fork(). the policy here is not consistent,
since other calls (e.g. exec()) panic on out of memory.
Diffstat (limited to 'user')
-rw-r--r--user/usertests.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/user/usertests.c b/user/usertests.c
index dfe0039..cc88555 100644
--- a/user/usertests.c
+++ b/user/usertests.c
@@ -2507,6 +2507,8 @@ main(int argc, char *argv[])
if(argc == 2 && strcmp(argv[1], "-c") == 0){
continuous = 1;
+ } else if(argc == 2 && strcmp(argv[1], "-C") == 0){
+ continuous = 2;
} else if(argc == 2 && argv[1][0] != '-'){
justone = argv[1];
} else if(argc > 1){
@@ -2589,12 +2591,14 @@ main(int argc, char *argv[])
}
if(fail){
printf("SOME TESTS FAILED\n");
- exit(1);
+ if(continuous != 2)
+ exit(1);
}
int free1 = countfree();
if(free1 < free0){
printf("FAILED -- lost some free pages\n");
- exit(1);
+ if(continuous != 2)
+ exit(1);
}
}
}