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