diff options
author | netblue30 <netblue30@yahoo.com> | 2016-12-15 14:12:31 -0500 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-12-15 14:12:31 -0500 |
commit | 1b549b5ee5a386bf3297a54a533fcd7294e23fec (patch) | |
tree | 7c9d2ddf2d3bea9870c7cac8d45cc7600ed4b8b4 /test/utils/cpu-print.exp | |
parent | fix older platforms (diff) | |
download | firejail-1b549b5ee5a386bf3297a54a533fcd7294e23fec.tar.gz firejail-1b549b5ee5a386bf3297a54a533fcd7294e23fec.tar.zst firejail-1b549b5ee5a386bf3297a54a533fcd7294e23fec.zip |
testing
Diffstat (limited to 'test/utils/cpu-print.exp')
-rwxr-xr-x | test/utils/cpu-print.exp | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/test/utils/cpu-print.exp b/test/utils/cpu-print.exp index ca2e57313..0a6f46102 100755 --- a/test/utils/cpu-print.exp +++ b/test/utils/cpu-print.exp | |||
@@ -7,18 +7,34 @@ set timeout 10 | |||
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | 9 | ||
10 | send -- "firejail --name=test --cpu=1,2\r" | 10 | send -- "firejail --name=test --cpu=0\r" |
11 | expect { | 11 | expect { |
12 | timeout {puts "TESTING ERROR 0\n";exit} | 12 | timeout {puts "TESTING ERROR 0\n";exit} |
13 | "Child process initialized" | 13 | "Child process initialized" |
14 | } | 14 | } |
15 | sleep 2 | 15 | sleep 1 |
16 | send -- "cat /proc/self/status | grep Cpus\r" | ||
17 | expect { | ||
18 | timeout {puts "TESTING ERROR 1\n";exit} | ||
19 | "Cpus_allowed_list: 0" | ||
20 | } | ||
21 | after 100 | ||
22 | send -- "exit\r" | ||
23 | sleep 1 | ||
24 | |||
25 | |||
26 | send -- "firejail --name=test --cpu=1\r" | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 1\n";exit} | ||
29 | "Child process initialized" | ||
30 | } | ||
31 | sleep 1 | ||
16 | 32 | ||
17 | spawn $env(SHELL) | 33 | spawn $env(SHELL) |
18 | send -- "firejail --cpu.print=test\r" | 34 | send -- "firejail --cpu.print=test\r" |
19 | expect { | 35 | expect { |
20 | timeout {puts "TESTING ERROR 1\n";exit} | 36 | timeout {puts "TESTING ERROR 2\n";exit} |
21 | "Cpus_allowed_list: 1-2" | 37 | "Cpus_allowed_list: 1" |
22 | } | 38 | } |
23 | after 100 | 39 | after 100 |
24 | puts "\nall done\n" | 40 | puts "\nall done\n" |