diff options
Diffstat (limited to 'test/cpu-print.exp')
-rwxr-xr-x | test/cpu-print.exp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/cpu-print.exp b/test/cpu-print.exp new file mode 100755 index 000000000..d8e3fbb04 --- /dev/null +++ b/test/cpu-print.exp | |||
@@ -0,0 +1,21 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail --name=test --cpu=1,2\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 --cpu.print=test\r" | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 1\n";exit} | ||
18 | "Cpus_allowed_list: 1-2" | ||
19 | } | ||
20 | sleep 1 | ||
21 | puts "\nall done\n" | ||