diff options
Diffstat (limited to 'test/root/cgroup.exp')
-rwxr-xr-x | test/root/cgroup.exp | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/test/root/cgroup.exp b/test/root/cgroup.exp deleted file mode 100755 index 9a1bbe161..000000000 --- a/test/root/cgroup.exp +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2022 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | cd /home | ||
8 | spawn $env(SHELL) | ||
9 | match_max 100000 | ||
10 | |||
11 | |||
12 | send -- "mkdir /sys/fs/cgroup/systemd/firejail\r" | ||
13 | sleep 1 | ||
14 | send -- "ls /sys/fs/cgroup/systemd/firejail\r" | ||
15 | expect { | ||
16 | timeout {puts "TESTING ERROR 0\n";exit} | ||
17 | "tasks" | ||
18 | } | ||
19 | |||
20 | send -- "firejail --name=\"join testing\" --cgroup=/sys/fs/cgroup/systemd/firejail/tasks\r" | ||
21 | expect { | ||
22 | timeout {puts "TESTING ERROR 1\n";exit} | ||
23 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
24 | } | ||
25 | sleep 2 | ||
26 | |||
27 | spawn $env(SHELL) | ||
28 | send -- "wc -l /sys/fs/cgroup/systemd/firejail/tasks\r" | ||
29 | expect { | ||
30 | timeout {puts "TESTING ERROR 2\n";exit} | ||
31 | "3" | ||
32 | } | ||
33 | |||
34 | spawn $env(SHELL) | ||
35 | send -- "firejail --join=\"join testing\"\r" | ||
36 | expect { | ||
37 | timeout {puts "TESTING ERROR 3\n";exit} | ||
38 | "Switching to pid" | ||
39 | } | ||
40 | expect { | ||
41 | timeout {puts "TESTING ERROR 4\n";exit} | ||
42 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
43 | } | ||
44 | sleep 1 | ||
45 | send -- "ps aux\r" | ||
46 | expect { | ||
47 | timeout {puts "TESTING ERROR 5\n";exit} | ||
48 | "/bin/bash" | ||
49 | } | ||
50 | expect { | ||
51 | timeout {puts "TESTING ERROR 6\n";exit} | ||
52 | "/bin/bash" | ||
53 | } | ||
54 | |||
55 | after 100 | ||
56 | |||
57 | spawn $env(SHELL) | ||
58 | send -- "wc -l /sys/fs/cgroup/systemd/firejail/tasks\r" | ||
59 | expect { | ||
60 | timeout {puts "TESTING ERROR 7\n";exit} | ||
61 | "3" | ||
62 | } | ||
63 | after 100 | ||
64 | |||
65 | puts "\nall done\n" | ||