diff options
Diffstat (limited to 'test/firemon-cgroup.exp')
-rwxr-xr-x | test/firemon-cgroup.exp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/firemon-cgroup.exp b/test/firemon-cgroup.exp new file mode 100755 index 000000000..41a38b3b6 --- /dev/null +++ b/test/firemon-cgroup.exp | |||
@@ -0,0 +1,40 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail --name=bingo1 --cgroup=/sys/fs/cgroup/g1/tasks\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 0\n";exit} | ||
10 | "Child process initialized" | ||
11 | } | ||
12 | sleep 1 | ||
13 | |||
14 | spawn $env(SHELL) | ||
15 | send -- "firejail --name=bingo2\r" | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 0\n";exit} | ||
18 | "Child process initialized" | ||
19 | } | ||
20 | sleep 1 | ||
21 | |||
22 | |||
23 | spawn $env(SHELL) | ||
24 | send -- "firemon --cgroup\r" | ||
25 | expect { | ||
26 | timeout {puts "TESTING ERROR 1\n";exit} | ||
27 | "bingo1" | ||
28 | } | ||
29 | expect { | ||
30 | timeout {puts "TESTING ERROR 2\n";exit} | ||
31 | ":/g1" | ||
32 | } | ||
33 | expect { | ||
34 | timeout {puts "TESTING ERROR 3\n";exit} | ||
35 | "bingo2" | ||
36 | } | ||
37 | sleep 1 | ||
38 | |||
39 | puts "\n" | ||
40 | |||