diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/environment/allow-debuggers.exp | 32 | ||||
-rwxr-xr-x | test/environment/environment.sh | 8 |
2 files changed, 40 insertions, 0 deletions
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 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | cd /home | ||
5 | spawn $env(SHELL) | ||
6 | match_max 100000 | ||
7 | |||
8 | send -- "firejail --profile=/etc/firejail/firefox.profile --allow-debuggers strace ls\r" | ||
9 | expect { | ||
10 | timeout {puts "TESTING ERROR 0\n";exit} | ||
11 | "Child process initialized" | ||
12 | } | ||
13 | expect { | ||
14 | timeout {puts "TESTING ERROR 1\n";exit} | ||
15 | "exited with 0" | ||
16 | } | ||
17 | after 100 | ||
18 | |||
19 | send -- "firejail --allow-debuggers --profile=/etc/firejail/firefox.profile strace ls\r" | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 2\n";exit} | ||
22 | "Child process initialized" | ||
23 | } | ||
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 3\n";exit} | ||
26 | "exited with 0" | ||
27 | } | ||
28 | after 100 | ||
29 | |||
30 | |||
31 | puts "\nall done\n" | ||
32 | |||
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)" | |||
82 | echo "TESTING: quiet (test/environment/quiet.exp)" | 82 | echo "TESTING: quiet (test/environment/quiet.exp)" |
83 | ./quiet.exp | 83 | ./quiet.exp |
84 | 84 | ||
85 | which strace | ||
86 | if [ "$?" -eq 0 ]; | ||
87 | then | ||
88 | echo "TESTING: --allow-debuggers (test/environment/allow-debuggers.exp)" | ||
89 | ./allow-debuggers.exp | ||
90 | else | ||
91 | echo "TESTING SKIP: strace not found" | ||
92 | fi | ||
85 | 93 | ||