diff options
Diffstat (limited to 'test/xchat.exp')
-rwxr-xr-x | test/xchat.exp | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/test/xchat.exp b/test/xchat.exp new file mode 100755 index 000000000..babbcf87d --- /dev/null +++ b/test/xchat.exp | |||
@@ -0,0 +1,71 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail xchat\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 0\n";exit} | ||
10 | "Reading profile /etc/firejail/xchat.profile" | ||
11 | } | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 1\n";exit} | ||
14 | "Child process initialized" | ||
15 | } | ||
16 | sleep 3 | ||
17 | |||
18 | spawn $env(SHELL) | ||
19 | send -- "firejail --list\r" | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 3\n";exit} | ||
22 | ":firejail" | ||
23 | } | ||
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
26 | "xchat" | ||
27 | } | ||
28 | sleep 1 | ||
29 | send -- "firejail --name=blablabla\r" | ||
30 | expect { | ||
31 | timeout {puts "TESTING ERROR 4\n";exit} | ||
32 | "Child process initialized" | ||
33 | } | ||
34 | sleep 2 | ||
35 | |||
36 | spawn $env(SHELL) | ||
37 | send -- "firemon --seccomp\r" | ||
38 | expect { | ||
39 | timeout {puts "TESTING ERROR 5\n";exit} | ||
40 | " xchat" | ||
41 | } | ||
42 | expect { | ||
43 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} | ||
44 | "Seccomp: 2" | ||
45 | } | ||
46 | expect { | ||
47 | timeout {puts "TESTING ERROR 5.1\n";exit} | ||
48 | "name=blablabla" | ||
49 | } | ||
50 | sleep 1 | ||
51 | send -- "firemon --caps\r" | ||
52 | expect { | ||
53 | timeout {puts "TESTING ERROR 6\n";exit} | ||
54 | " xchat" | ||
55 | } | ||
56 | expect { | ||
57 | timeout {puts "TESTING ERROR 6.1\n";exit} | ||
58 | "CapBnd:" | ||
59 | } | ||
60 | expect { | ||
61 | timeout {puts "TESTING ERROR 6.2\n";exit} | ||
62 | "0000000000000000" | ||
63 | } | ||
64 | expect { | ||
65 | timeout {puts "TESTING ERROR 6.3\n";exit} | ||
66 | "name=blablabla" | ||
67 | } | ||
68 | sleep 1 | ||
69 | |||
70 | puts "\n" | ||
71 | |||