diff options
Diffstat (limited to 'tests/userprog/multi-child-fd.ck')
| -rw-r--r-- | tests/userprog/multi-child-fd.ck | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/userprog/multi-child-fd.ck b/tests/userprog/multi-child-fd.ck new file mode 100644 index 0000000..d0b3a33 --- /dev/null +++ b/tests/userprog/multi-child-fd.ck | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | # -*- perl -*- | ||
| 2 | use strict; | ||
| 3 | use warnings; | ||
| 4 | use tests::tests; | ||
| 5 | check_expected ([<<'EOF', <<'EOF']); | ||
| 6 | (multi-child-fd) begin | ||
| 7 | (multi-child-fd) open "sample.txt" | ||
| 8 | (child-close) begin | ||
| 9 | (child-close) end | ||
| 10 | child-close: exit(0) | ||
| 11 | (multi-child-fd) wait(exec()) = 0 | ||
| 12 | (multi-child-fd) verified contents of "sample.txt" | ||
| 13 | (multi-child-fd) end | ||
| 14 | multi-child-fd: exit(0) | ||
| 15 | EOF | ||
| 16 | (multi-child-fd) begin | ||
| 17 | (multi-child-fd) open "sample.txt" | ||
| 18 | (child-close) begin | ||
| 19 | child-close: exit(-1) | ||
| 20 | (multi-child-fd) wait(exec()) = -1 | ||
| 21 | (multi-child-fd) verified contents of "sample.txt" | ||
| 22 | (multi-child-fd) end | ||
| 23 | multi-child-fd: exit(0) | ||
| 24 | EOF | ||
| 25 | pass; | ||
