aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-12-15 14:12:31 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2016-12-15 14:12:31 -0500
commit1b549b5ee5a386bf3297a54a533fcd7294e23fec (patch)
tree7c9d2ddf2d3bea9870c7cac8d45cc7600ed4b8b4 /test/utils
parentfix older platforms (diff)
downloadfirejail-1b549b5ee5a386bf3297a54a533fcd7294e23fec.tar.gz
firejail-1b549b5ee5a386bf3297a54a533fcd7294e23fec.tar.zst
firejail-1b549b5ee5a386bf3297a54a533fcd7294e23fec.zip
testing
Diffstat (limited to 'test/utils')
-rwxr-xr-xtest/utils/cpu-print.exp24
-rwxr-xr-xtest/utils/trace.exp18
2 files changed, 29 insertions, 13 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
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10send -- "firejail --name=test --cpu=1,2\r" 10send -- "firejail --name=test --cpu=0\r"
11expect { 11expect {
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}
15sleep 2 15sleep 1
16send -- "cat /proc/self/status | grep Cpus\r"
17expect {
18 timeout {puts "TESTING ERROR 1\n";exit}
19 "Cpus_allowed_list: 0"
20}
21after 100
22send -- "exit\r"
23sleep 1
24
25
26send -- "firejail --name=test --cpu=1\r"
27expect {
28 timeout {puts "TESTING ERROR 1\n";exit}
29 "Child process initialized"
30}
31sleep 1
16 32
17spawn $env(SHELL) 33spawn $env(SHELL)
18send -- "firejail --cpu.print=test\r" 34send -- "firejail --cpu.print=test\r"
19expect { 35expect {
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}
23after 100 39after 100
24puts "\nall done\n" 40puts "\nall done\n"
diff --git a/test/utils/trace.exp b/test/utils/trace.exp
index 78a04b273..eedc0f23f 100755
--- a/test/utils/trace.exp
+++ b/test/utils/trace.exp
@@ -53,15 +53,15 @@ expect {
53sleep 1 53sleep 1
54 54
55send -- "firejail --trace wget -q debian.org\r" 55send -- "firejail --trace wget -q debian.org\r"
56expect { 56#expect {
57 timeout {puts "TESTING ERROR 8.1\n";exit} 57# timeout {puts "TESTING ERROR 8.1\n";exit}
58 "Child process initialized" 58# "Child process initialized"
59} 59#}
60expect { 60#expect {
61 timeout {puts "TESTING ERROR 8.2\n";exit} 61# timeout {puts "TESTING ERROR 8.2\n";exit}
62 "bash:open /dev/tty" {puts "OK\n";} 62# "bash:open /dev/tty" {puts "OK\n";}
63 "bash:open64 /dev/tty" {puts "OK\n";} 63# "bash:open64 /dev/tty" {puts "OK\n";}
64} 64#}
65expect { 65expect {
66 timeout {puts "TESTING ERROR 8.3\n";exit} 66 timeout {puts "TESTING ERROR 8.3\n";exit}
67 "wget:fopen64 /etc/wgetrc" {puts "OK\n";} 67 "wget:fopen64 /etc/wgetrc" {puts "OK\n";}