aboutsummaryrefslogtreecommitdiffstats
path: root/test/environment
diff options
context:
space:
mode:
authorLibravatar smitsohu <smitsohu@gmail.com>2019-09-26 10:59:26 +0200
committerLibravatar smitsohu <smitsohu@gmail.com>2019-09-26 10:59:26 +0200
commitb9888e6a388b7d2c17f0aa75b2ef5205b4b90720 (patch)
treeb17e2d4430e1118e34f4f9764f082d30e309384e /test/environment
parenttesting: rename and simplify (diff)
downloadfirejail-b9888e6a388b7d2c17f0aa75b2ef5205b4b90720.tar.gz
firejail-b9888e6a388b7d2c17f0aa75b2ef5205b4b90720.tar.zst
firejail-b9888e6a388b7d2c17f0aa75b2ef5205b4b90720.zip
testing
Diffstat (limited to 'test/environment')
-rwxr-xr-xtest/environment/environment.sh3
-rwxr-xr-xtest/environment/umask.exp41
2 files changed, 44 insertions, 0 deletions
diff --git a/test/environment/environment.sh b/test/environment/environment.sh
index 735d3e59e..f860f7c24 100755
--- a/test/environment/environment.sh
+++ b/test/environment/environment.sh
@@ -120,3 +120,6 @@ echo "TESTING: rlimit errors profile (test/environment/rlimit-bad-profile.exp)"
120 120
121echo "TESTING: deterministic exit code (test/environment/deterministic-exit-code.exp" 121echo "TESTING: deterministic exit code (test/environment/deterministic-exit-code.exp"
122./deterministic-exit-code.exp 122./deterministic-exit-code.exp
123
124echo "TESTING: retain umask (test/environment/umask.exp"
125(umask 123 && ./umask.exp)
diff --git a/test/environment/umask.exp b/test/environment/umask.exp
new file mode 100755
index 000000000..e93d71bd4
--- /dev/null
+++ b/test/environment/umask.exp
@@ -0,0 +1,41 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail --noprofile\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Child process initialized"
11}
12sleep 1
13
14send -- "umask\r"
15expect {
16 timeout {puts "TESTING ERROR 1\n";exit}
17 "0123"
18}
19after 100
20
21send -- "firejail\r"
22expect {
23 timeout {puts "TESTING ERROR 2\n";exit}
24 "Warning: an existing sandbox was detected"
25}
26after 100
27
28send -- "umask\r"
29expect {
30 timeout {puts "TESTING ERROR 3\n";exit}
31 "0123"
32}
33after 100
34
35send -- "exit\r"
36after 100
37
38send -- "exit\r"
39sleep 1
40
41puts "\nall done\n"