Up

Traces

linux[4.2.5-1-ARCH][system[GNU C Library (GNU libc) stable release version 2.22, by Roland McGrath et al.]][path=/mnt/flashix/[unknown]]@[2015-12-14T16:11:13Z./nix/store/qf513g69n2gy4prf0yhgggwimyl8q7kd-fs_test]

Checked Trace
linux_spec@[/nix/store/qf513g69n2gy4prf0yhgggwimyl8q7kd-fs_test] sexp stdout stderr
Traced Execution stdout stderr
Script script

Combined Trace

1 # processing file 'adhoc_close_tests-int.trace' ...
2 @type trace
3 # Tests for close
4
5 # close on an fd that was never used
6 close (FD 3)
7 Tau
8 EBADF
9
10 # and again
11 close (FD 4)
12 Tau
13 EBADF
14
15 # open a normal file, and close
16 open "f1.txt" [O_CREAT;O_WRONLY] 0o644
17 Tau
18 RV_num(3)
19 write (FD 3) "0123456789" 10
20 Tau
21 RV_num(10)
22 close (FD 3)
23 Tau
24 RV_none
25
26 # open a normal file, and close twice
27 open "f2.txt" [O_CREAT;O_WRONLY] 0o644
28 Tau
29 RV_num(3)
30 close (FD 3)
31 Tau
32 RV_none
33 close (FD 3)
34 Tau
35 EBADF
36
37 # open and close a recently closed fd
38 open "f1.txt" [O_RDWR]
39 Tau
40 RV_num(3)
41 close (FD 3)
42 Tau
43 RV_none
44
45 open "f1" [O_RDWR]
46 Tau
47 ENOENT
48 close (FD 3)
49 Tau
50 EBADF
51
52
53 # multiple overlapping opens
54 open "f1.txt" [O_RDWR]
55 Tau
56 RV_num(3)
57 open "f2.txt" [O_RDWR]
58 Tau
59 RV_num(4)
60 close (FD 3)
61 Tau
62 RV_none
63 open "f1.txt" [O_RDWR]
64 Tau
65 RV_num(3)
66 close (FD 4)
67 Tau
68 RV_none
69 close (FD 3)
70 Tau
71 RV_none
72
73 # opening a directory
74 mkdir "d1" 0o755
75 Tau
76 RV_none
77 open "d1" [O_RDWR]
78 Tau
79 EISDIR
80 close (FD 3)
81 Tau
82 EBADF
83 open "d1" [O_RDWR]
84 Tau
85 EISDIR
86 close (FD 3)
87 Tau
88 EBADF
89
90 # only for coverage purposes we test openclose on a symlink
91 symlink "f1.txt" "my_symlink"
92 Tau
93 RV_none
94 open_close "my_symlink" [O_RDWR] 0o666
95 Tau
96 RV_none
97
98 # closing stdin
99 close (FD 0)
100 Tau
101 RV_none
102
103 # closing stdout
104 close (FD 1)
105 Tau
106 RV_none
107
108 # closing stderr
109 close (FD 2)
110 Tau
111 RV_none
112
113