From 7526e567cd80ceec483ce3546f6fe9897e6ffd48 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Wed, 6 Apr 2016 20:40:45 -0400 Subject: --cpu.print --- test/cpu-print.exp | 21 +++++++++++++++++++++ test/test.sh | 4 ++++ 2 files changed, 25 insertions(+) create mode 100755 test/cpu-print.exp (limited to 'test') 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 @@ +#!/usr/bin/expect -f + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +send -- "firejail --name=test --cpu=1,2\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Child process initialized" +} +sleep 2 + +spawn $env(SHELL) +send -- "firejail --cpu.print=test\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "Cpus_allowed_list: 1-2" +} +sleep 1 +puts "\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 @@ ./fscheck.sh +echo "TESTING: cpu.print (cpu-print.exp)" +echo "TESTING: failing under VirtualBox where there is only one CPU" +./cpu-print.exp + echo "TESTING: bandwidth (bandwidth.exp)" ./bandwidth.exp -- cgit v1.2.3-70-g09d2