diff options
Diffstat (limited to 'test/seccomp-print.exp')
-rwxr-xr-x | test/seccomp-print.exp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/seccomp-print.exp b/test/seccomp-print.exp new file mode 100755 index 000000000..b4e6ed35e --- /dev/null +++ b/test/seccomp-print.exp | |||
@@ -0,0 +1,33 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail --name=test\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 0\n";exit} | ||
10 | "Child process initialized" | ||
11 | } | ||
12 | sleep 2 | ||
13 | |||
14 | spawn $env(SHELL) | ||
15 | send -- "firejail --seccomp.print=test\r" | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 1\n";exit} | ||
18 | "EXAMINE_SYSCAL" | ||
19 | } | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 2\n";exit} | ||
22 | "init_module" | ||
23 | } | ||
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 3\n";exit} | ||
26 | "delete_module" | ||
27 | } | ||
28 | expect { | ||
29 | timeout {puts "TESTING ERROR 4\n";exit} | ||
30 | "RETURN_ALLOW" | ||
31 | } | ||
32 | sleep 1 | ||
33 | puts "\nall done\n" | ||