diff options
author | smitsohu <smitsohu@gmail.com> | 2021-11-20 14:06:06 +0100 |
---|---|---|
committer | smitsohu <smitsohu@gmail.com> | 2021-11-20 14:06:06 +0100 |
commit | c477e00dddb3f043b06f03357eeb2ed27343c677 (patch) | |
tree | 14eee42a764571ff050c8a0be6451a00db977e1b /test/environment | |
parent | build: Stop linking pthread (#4695) (diff) | |
download | firejail-c477e00dddb3f043b06f03357eeb2ed27343c677.tar.gz firejail-c477e00dddb3f043b06f03357eeb2ed27343c677.tar.zst firejail-c477e00dddb3f043b06f03357eeb2ed27343c677.zip |
testing
Diffstat (limited to 'test/environment')
-rwxr-xr-x | test/environment/deterministic-shutdown.exp | 16 | ||||
-rwxr-xr-x | test/environment/environment.sh | 3 |
2 files changed, 19 insertions, 0 deletions
diff --git a/test/environment/deterministic-shutdown.exp b/test/environment/deterministic-shutdown.exp new file mode 100755 index 000000000..3931893be --- /dev/null +++ b/test/environment/deterministic-shutdown.exp | |||
@@ -0,0 +1,16 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2021 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 5 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --deterministic-shutdown bash -c \"sleep 10 & exec sleep 1\"\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "Parent is shutting down, bye..." | ||
14 | } | ||
15 | |||
16 | puts "\nall done\n" | ||
diff --git a/test/environment/environment.sh b/test/environment/environment.sh index 1e1dd549b..c35f69b0c 100755 --- a/test/environment/environment.sh +++ b/test/environment/environment.sh | |||
@@ -124,5 +124,8 @@ echo "TESTING: rlimit errors profile (test/environment/rlimit-bad-profile.exp)" | |||
124 | echo "TESTING: deterministic exit code (test/environment/deterministic-exit-code.exp)" | 124 | echo "TESTING: deterministic exit code (test/environment/deterministic-exit-code.exp)" |
125 | ./deterministic-exit-code.exp | 125 | ./deterministic-exit-code.exp |
126 | 126 | ||
127 | echo "TESTING: deterministic shutdown (test/environment/deterministic-shutdown.exp)" | ||
128 | ./deterministic-shutdown.exp | ||
129 | |||
127 | echo "TESTING: retain umask (test/environment/umask.exp)" | 130 | echo "TESTING: retain umask (test/environment/umask.exp)" |
128 | (umask 123 && ./umask.exp) | 131 | (umask 123 && ./umask.exp) |