diff options
author | smitsohu <smitsohu@gmail.com> | 2022-01-23 12:42:58 +0100 |
---|---|---|
committer | smitsohu <smitsohu@gmail.com> | 2022-01-23 13:01:40 +0100 |
commit | 9672e30b24242ca67c11b8af9e78a0a8e7f99a3b (patch) | |
tree | b079c5cfd90193b53173a71f2f414d2457da69c2 /test/environment/keep-fd-bad.exp | |
parent | build option: remove deprecated strace feature from manual (diff) | |
download | firejail-9672e30b24242ca67c11b8af9e78a0a8e7f99a3b.tar.gz firejail-9672e30b24242ca67c11b8af9e78a0a8e7f99a3b.tar.zst firejail-9672e30b24242ca67c11b8af9e78a0a8e7f99a3b.zip |
testing
Diffstat (limited to 'test/environment/keep-fd-bad.exp')
-rwxr-xr-x | test/environment/keep-fd-bad.exp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/environment/keep-fd-bad.exp b/test/environment/keep-fd-bad.exp new file mode 100755 index 000000000..e8b411ea0 --- /dev/null +++ b/test/environment/keep-fd-bad.exp | |||
@@ -0,0 +1,40 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2022 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | |||
11 | send -- "firejail --noprofile --keep-fd=\r" | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 0\n";exit} | ||
14 | "Error: invalid keep-fd option" | ||
15 | } | ||
16 | after 100 | ||
17 | |||
18 | send -- "firejail --noprofile --keep-fd=,,,\r" | ||
19 | expect { | ||
20 | timeout {puts "TESTING ERROR 1\n";exit} | ||
21 | "Error: invalid keep-fd option" | ||
22 | } | ||
23 | after 100 | ||
24 | |||
25 | send -- "firejail --noprofile --keep-fd=dall\r" | ||
26 | expect { | ||
27 | timeout {puts "TESTING ERROR 2\n";exit} | ||
28 | "Error: invalid keep-fd option" | ||
29 | } | ||
30 | after 100 | ||
31 | |||
32 | send -- "firejail --noprofile --keep-fd=6,7,8,10b,11\r" | ||
33 | expect { | ||
34 | timeout {puts "TESTING ERROR 3\n";exit} | ||
35 | "Error: invalid keep-fd option" | ||
36 | } | ||
37 | after 100 | ||
38 | |||
39 | |||
40 | puts "\nall done\n" | ||