From adee82c3e7334a09996c0fe9cc75d9a80abc81c8 Mon Sep 17 00:00:00 2001 From: Robert Morris Date: Thu, 13 Aug 2020 10:22:07 -0400 Subject: handle another out-of-memory in fork(). the policy here is not consistent, since other calls (e.g. exec()) panic on out of memory. --- user/usertests.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'user/usertests.c') 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); } } } -- cgit v1.2.3