diff options
Diffstat (limited to 'test/seccomp-errno.exp')
-rwxr-xr-x | test/seccomp-errno.exp | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/test/seccomp-errno.exp b/test/seccomp-errno.exp deleted file mode 100755 index e6678ab8f..000000000 --- a/test/seccomp-errno.exp +++ /dev/null | |||
@@ -1,87 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "touch seccomp-test-file\r" | ||
8 | sleep 1 | ||
9 | |||
10 | send -- "firejail --seccomp.enoent=unlinkat rm seccomp-test-file\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "No such file or directory" | ||
14 | } | ||
15 | sleep 1 | ||
16 | |||
17 | send -- "firejail --seccomp.enoent=unlinkat --debug rm seccomp-test-file\r" | ||
18 | expect { | ||
19 | timeout {puts "TESTING ERROR 1\n";exit} | ||
20 | "unlinkat 2 ENOENT" | ||
21 | } | ||
22 | sleep 1 | ||
23 | |||
24 | send -- "firejail --seccomp.enoent=unlinkat,mkdir\r" | ||
25 | expect { | ||
26 | timeout {puts "TESTING ERROR 2\n";exit} | ||
27 | "Child process initialized" | ||
28 | } | ||
29 | sleep 1 | ||
30 | send -- "rm seccomp-test-file\r" | ||
31 | expect { | ||
32 | timeout {puts "TESTING ERROR 3\n";exit} | ||
33 | "No such file or directory" | ||
34 | } | ||
35 | after 100 | ||
36 | puts "\n" | ||
37 | |||
38 | send -- "mkdir seccomp-test-dir\r" | ||
39 | expect { | ||
40 | timeout {puts "TESTING ERROR 4\n";exit} | ||
41 | "No such file or directory" | ||
42 | } | ||
43 | after 100 | ||
44 | puts "\n" | ||
45 | |||
46 | send -- "exit\r" | ||
47 | sleep 1 | ||
48 | |||
49 | |||
50 | send -- "firejail --seccomp.enoent=unlinkat --seccomp.enoent=mkdir\r" | ||
51 | expect { | ||
52 | timeout {puts "TESTING ERROR 5\n";exit} | ||
53 | "errno enoent already configured" | ||
54 | } | ||
55 | sleep 1 | ||
56 | |||
57 | send -- "firejail --seccomp.enoent=unlinkat --seccomp.eperm=mkdir\r" | ||
58 | expect { | ||
59 | timeout {puts "TESTING ERROR 6\n";exit} | ||
60 | "Child process initialized" | ||
61 | } | ||
62 | sleep 1 | ||
63 | send -- "rm seccomp-test-file\r" | ||
64 | expect { | ||
65 | timeout {puts "TESTING ERROR 7\n";exit} | ||
66 | "No such file or directory" | ||
67 | } | ||
68 | after 100 | ||
69 | puts "\n" | ||
70 | |||
71 | send -- "mkdir seccomp-test-dir\r" | ||
72 | expect { | ||
73 | timeout {puts "TESTING ERROR 8\n";exit} | ||
74 | "Operation not permitted" | ||
75 | } | ||
76 | after 100 | ||
77 | puts "\n" | ||
78 | |||
79 | send -- "exit\r" | ||
80 | sleep 1 | ||
81 | |||
82 | |||
83 | |||
84 | |||
85 | send -- "rm seccomp-test-file\r" | ||
86 | sleep 1 | ||
87 | puts "all done\n" | ||