aboutsummaryrefslogtreecommitdiffstats
path: root/test/root/firemon-events.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/root/firemon-events.exp')
-rwxr-xr-xtest/root/firemon-events.exp72
1 files changed, 72 insertions, 0 deletions
diff --git a/test/root/firemon-events.exp b/test/root/firemon-events.exp
new file mode 100755
index 000000000..4f305e51d
--- /dev/null
+++ b/test/root/firemon-events.exp
@@ -0,0 +1,72 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7# start firemon
8set firemon_id $spawn_id
9send -- "firemon\r"
10sleep 1
11
12# start firejail
13spawn $env(SHELL)
14set firejail_id $spawn_id
15send -- "firejail\r"
16expect {
17 timeout {puts "TESTING ERROR 0\n";exit}
18 "Child process initialized"
19}
20
21# get messages on firemon
22set spawn_id $firemon_id
23expect {
24 timeout {puts "TESTING ERROR 1\n";exit}
25 "exec"
26}
27expect {
28 timeout {puts "TESTING ERROR 2\n";exit}
29 "/bin/bash -c /bin/bash"
30}
31expect {
32 timeout {puts "TESTING ERROR 3\n";exit}
33 "exec"
34}
35expect {
36 timeout {puts "TESTING ERROR 4\n";exit}
37 "/bin/bash"
38}
39expect {
40 timeout {puts "TESTING ERROR 5\n";exit}
41 "fork"
42}
43expect {
44 timeout {puts "TESTING ERROR 6\n";exit}
45 "child"
46}
47expect {
48 timeout {puts "TESTING ERROR 7\n";exit}
49 "/bin/bash"
50}
51after 100
52
53# exit firejail
54set spawn_id $firejail_id
55send -- "exit\r"
56sleep 1
57
58# get messages on firemon
59set spawn_id $firemon_id
60expect {
61 timeout {puts "TESTING ERROR 8\n";exit}
62 "exit"
63}
64
65expect {
66 timeout {puts "TESTING ERROR 9\n";exit}
67 "EXIT SANDBOX"
68}
69
70
71puts "\nall done\n"
72