Skip to content

Commit

Permalink
Fix testcases for proj2
Browse files Browse the repository at this point in the history
- Fix possible race on child-rox
- Change multi-oom timeout to 600 (those who do slow implementation).
  • Loading branch information
hestati63 committed Apr 19, 2020
1 parent 7794ae3 commit 8906e08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion tests/userprog/child-rox.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,13 @@ main (int argc UNUSED, char *argv[])
int child;

snprintf (cmd, sizeof cmd, "child-rox %d", atoi (argv[1]) - 1);
msg ("exec \"%s\"", cmd);
if (!(child = fork ("child-rox"))){
exec (cmd);
}
CHECK (child != -1, "exec \"%s\"", cmd);

if (child < 0)
fail ("fork() returned %d", child);
quiet = true;
CHECK (wait (child) == 12, "wait for \"child-rox\"");
quiet = false;
Expand Down
2 changes: 1 addition & 1 deletion tests/userprog/no-vm/Make.tests
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ tests/userprog/no-vm_PROGS = $(tests/userprog/no-vm_TESTS)
tests/userprog/no-vm/multi-oom_SRC = tests/userprog/no-vm/multi-oom.c \
tests/lib.c

tests/userprog/no-vm/multi-oom.output: TIMEOUT = 360 -m 20
tests/userprog/no-vm/multi-oom.output: TIMEOUT = 600 -m 20

0 comments on commit 8906e08

Please sign in to comment.