diff options
author | netblue30 <netblue30@yahoo.com> | 2015-08-08 19:12:30 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2015-08-08 19:12:30 -0400 |
commit | 1379851360349d6617ad32944a25ee5e2bb74fc2 (patch) | |
tree | f69b48e90708bfa3c2723d5a27ed3e024c827b43 /test/trace.exp | |
parent | delete files (diff) | |
download | firejail-1379851360349d6617ad32944a25ee5e2bb74fc2.tar.gz firejail-1379851360349d6617ad32944a25ee5e2bb74fc2.tar.zst firejail-1379851360349d6617ad32944a25ee5e2bb74fc2.zip |
Baseline firejail 0.9.28
Diffstat (limited to 'test/trace.exp')
-rwxr-xr-x | test/trace.exp | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/test/trace.exp b/test/trace.exp new file mode 100755 index 000000000..bca3ac3b3 --- /dev/null +++ b/test/trace.exp | |||
@@ -0,0 +1,95 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 30 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail --trace mkdir ttt\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 0\n";exit} | ||
10 | "Child process initialized" | ||
11 | } | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 1\n";exit} | ||
14 | "1:mkdir:mkdir ttt" | ||
15 | } | ||
16 | sleep 1 | ||
17 | |||
18 | send -- "firejail --trace rmdir ttt\r" | ||
19 | expect { | ||
20 | timeout {puts "TESTING ERROR 2\n";exit} | ||
21 | "Child process initialized" | ||
22 | } | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 3\n";exit} | ||
25 | "1:rmdir:rmdir ttt" | ||
26 | } | ||
27 | sleep 1 | ||
28 | |||
29 | send -- "firejail --trace touch ttt\r" | ||
30 | expect { | ||
31 | timeout {puts "TESTING ERROR 4\n";exit} | ||
32 | "Child process initialized" | ||
33 | } | ||
34 | expect { | ||
35 | timeout {puts "TESTING ERROR 5\n";exit} | ||
36 | "1:touch:open ttt" {puts "OK\n";} | ||
37 | "1:touch:open64 ttt" {puts "OK\n";} | ||
38 | } | ||
39 | sleep 1 | ||
40 | |||
41 | send -- "firejail --trace rm ttt\r" | ||
42 | expect { | ||
43 | timeout {puts "TESTING ERROR 6\n";exit} | ||
44 | "Child process initialized" | ||
45 | } | ||
46 | expect { | ||
47 | timeout {puts "TESTING ERROR 7\n";exit} | ||
48 | "1:rm:unlinkat ttt" | ||
49 | } | ||
50 | sleep 1 | ||
51 | |||
52 | send -- "firejail --trace wget -q debian.org\r" | ||
53 | expect { | ||
54 | timeout {puts "TESTING ERROR 8.1\n";exit} | ||
55 | "Child process initialized" | ||
56 | } | ||
57 | expect { | ||
58 | timeout {puts "TESTING ERROR 8.2\n";exit} | ||
59 | "1:bash:open /dev/tty" {puts "OK\n";} | ||
60 | "1:bash:open64 /dev/tty" {puts "OK\n";} | ||
61 | } | ||
62 | expect { | ||
63 | timeout {puts "TESTING ERROR 8.3\n";exit} | ||
64 | "1:wget:fopen64 /etc/wgetrc" {puts "OK\n";} | ||
65 | "1:wget:fopen /etc/wgetrc" {puts "OK\n";} | ||
66 | } | ||
67 | expect { | ||
68 | timeout {puts "TESTING ERROR 8.4\n";exit} | ||
69 | "1:wget:fopen /etc/hosts" | ||
70 | } | ||
71 | expect { | ||
72 | timeout {puts "TESTING ERROR 8.5\n";exit} | ||
73 | "1:wget:connect" | ||
74 | } | ||
75 | expect { | ||
76 | timeout {puts "TESTING ERROR 8.6\n";exit} | ||
77 | "1:wget:fopen64 index.html" {puts "OK\n";} | ||
78 | "1:wget:fopen index.html" {puts "OK\n";} | ||
79 | } | ||
80 | sleep 1 | ||
81 | |||
82 | send -- "firejail --trace rm index.html\r" | ||
83 | expect { | ||
84 | timeout {puts "TESTING ERROR 9\n";exit} | ||
85 | "Child process initialized" | ||
86 | } | ||
87 | expect { | ||
88 | timeout {puts "TESTING ERROR 10\n";exit} | ||
89 | "1:rm:unlinkat index.html" | ||
90 | } | ||
91 | sleep 1 | ||
92 | |||
93 | |||
94 | puts "\n" | ||
95 | |||