aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-04-06 20:40:45 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-04-06 20:40:45 -0400
commit7526e567cd80ceec483ce3546f6fe9897e6ffd48 (patch)
tree5de7f1534ec0574b59c831838dd6d75a33d2f996 /test
parentssh/scp/sftp fixes (diff)
downloadfirejail-7526e567cd80ceec483ce3546f6fe9897e6ffd48.tar.gz
firejail-7526e567cd80ceec483ce3546f6fe9897e6ffd48.tar.zst
firejail-7526e567cd80ceec483ce3546f6fe9897e6ffd48.zip
--cpu.print
Diffstat (limited to 'test')
-rwxr-xr-xtest/cpu-print.exp21
-rwxr-xr-xtest/test.sh4
2 files changed, 25 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
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail --name=test --cpu=1,2\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Child process initialized"
11}
12sleep 2
13
14spawn $env(SHELL)
15send -- "firejail --cpu.print=test\r"
16expect {
17 timeout {puts "TESTING ERROR 1\n";exit}
18 "Cpus_allowed_list: 1-2"
19}
20sleep 1
21puts "\nall done\n"
diff --git a/test/test.sh b/test/test.sh
index ca2108bc5..96ef8f423 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -6,6 +6,10 @@
6 6
7./fscheck.sh 7./fscheck.sh
8 8
9echo "TESTING: cpu.print (cpu-print.exp)"
10echo "TESTING: failing under VirtualBox where there is only one CPU"
11./cpu-print.exp
12
9echo "TESTING: bandwidth (bandwidth.exp)" 13echo "TESTING: bandwidth (bandwidth.exp)"
10./bandwidth.exp 14./bandwidth.exp
11 15