aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/userprog/multi-child-fd.ck
blob: d0b3a33922258bb1c310294db3eba63d2bcedf9a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF', <<'EOF']);
(multi-child-fd) begin
(multi-child-fd) open "sample.txt"
(child-close) begin
(child-close) end
child-close: exit(0)
(multi-child-fd) wait(exec()) = 0
(multi-child-fd) verified contents of "sample.txt"
(multi-child-fd) end
multi-child-fd: exit(0)
EOF
(multi-child-fd) begin
(multi-child-fd) open "sample.txt"
(child-close) begin
child-close: exit(-1)
(multi-child-fd) wait(exec()) = -1
(multi-child-fd) verified contents of "sample.txt"
(multi-child-fd) end
multi-child-fd: exit(0)
EOF
pass;