From 2b76cea1106462268b975ee68480796ba900d37f Mon Sep 17 00:00:00 2001 From: netblue30 Date: Mon, 22 Aug 2016 08:59:00 -0400 Subject: --allow-debuggers --- test/environment/allow-debuggers.exp | 32 ++++++++++++++++++++++++++++++++ test/environment/environment.sh | 8 ++++++++ 2 files changed, 40 insertions(+) create mode 100755 test/environment/allow-debuggers.exp (limited to 'test') diff --git a/test/environment/allow-debuggers.exp b/test/environment/allow-debuggers.exp new file mode 100755 index 000000000..dde9c4cc1 --- /dev/null +++ b/test/environment/allow-debuggers.exp @@ -0,0 +1,32 @@ +#!/usr/bin/expect -f + +set timeout 10 +cd /home +spawn $env(SHELL) +match_max 100000 + +send -- "firejail --profile=/etc/firejail/firefox.profile --allow-debuggers strace ls\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Child process initialized" +} +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "exited with 0" +} +after 100 + +send -- "firejail --allow-debuggers --profile=/etc/firejail/firefox.profile strace ls\r" +expect { + timeout {puts "TESTING ERROR 2\n";exit} + "Child process initialized" +} +expect { + timeout {puts "TESTING ERROR 3\n";exit} + "exited with 0" +} +after 100 + + +puts "\nall done\n" + diff --git a/test/environment/environment.sh b/test/environment/environment.sh index a6fe07a1c..785f57d3f 100755 --- a/test/environment/environment.sh +++ b/test/environment/environment.sh @@ -82,4 +82,12 @@ echo "TESTING: nice (test/environment/nice.exp)" echo "TESTING: quiet (test/environment/quiet.exp)" ./quiet.exp +which strace +if [ "$?" -eq 0 ]; +then + echo "TESTING: --allow-debuggers (test/environment/allow-debuggers.exp)" + ./allow-debuggers.exp +else + echo "TESTING SKIP: strace not found" +fi -- cgit v1.2.3-54-g00ecf