diff options
author | smitsohu <smitsohu@gmail.com> | 2019-09-26 10:59:26 +0200 |
---|---|---|
committer | smitsohu <smitsohu@gmail.com> | 2019-09-26 10:59:26 +0200 |
commit | b9888e6a388b7d2c17f0aa75b2ef5205b4b90720 (patch) | |
tree | b17e2d4430e1118e34f4f9764f082d30e309384e /test/environment/umask.exp | |
parent | testing: rename and simplify (diff) | |
download | firejail-b9888e6a388b7d2c17f0aa75b2ef5205b4b90720.tar.gz firejail-b9888e6a388b7d2c17f0aa75b2ef5205b4b90720.tar.zst firejail-b9888e6a388b7d2c17f0aa75b2ef5205b4b90720.zip |
testing
Diffstat (limited to 'test/environment/umask.exp')
-rwxr-xr-x | test/environment/umask.exp | 41 |
1 files changed, 41 insertions, 0 deletions
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 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail --noprofile\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 0\n";exit} | ||
10 | "Child process initialized" | ||
11 | } | ||
12 | sleep 1 | ||
13 | |||
14 | send -- "umask\r" | ||
15 | expect { | ||
16 | timeout {puts "TESTING ERROR 1\n";exit} | ||
17 | "0123" | ||
18 | } | ||
19 | after 100 | ||
20 | |||
21 | send -- "firejail\r" | ||
22 | expect { | ||
23 | timeout {puts "TESTING ERROR 2\n";exit} | ||
24 | "Warning: an existing sandbox was detected" | ||
25 | } | ||
26 | after 100 | ||
27 | |||
28 | send -- "umask\r" | ||
29 | expect { | ||
30 | timeout {puts "TESTING ERROR 3\n";exit} | ||
31 | "0123" | ||
32 | } | ||
33 | after 100 | ||
34 | |||
35 | send -- "exit\r" | ||
36 | after 100 | ||
37 | |||
38 | send -- "exit\r" | ||
39 | sleep 1 | ||
40 | |||
41 | puts "\nall done\n" | ||