aboutsummaryrefslogtreecommitdiffstats
path: root/test/environment/keep-fd-bad.exp
diff options
context:
space:
mode:
authorLibravatar smitsohu <smitsohu@gmail.com>2022-01-23 12:42:58 +0100
committerLibravatar smitsohu <smitsohu@gmail.com>2022-01-23 13:01:40 +0100
commit9672e30b24242ca67c11b8af9e78a0a8e7f99a3b (patch)
treeb079c5cfd90193b53173a71f2f414d2457da69c2 /test/environment/keep-fd-bad.exp
parentbuild option: remove deprecated strace feature from manual (diff)
downloadfirejail-9672e30b24242ca67c11b8af9e78a0a8e7f99a3b.tar.gz
firejail-9672e30b24242ca67c11b8af9e78a0a8e7f99a3b.tar.zst
firejail-9672e30b24242ca67c11b8af9e78a0a8e7f99a3b.zip
testing
Diffstat (limited to 'test/environment/keep-fd-bad.exp')
-rwxr-xr-xtest/environment/keep-fd-bad.exp40
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
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10
11send -- "firejail --noprofile --keep-fd=\r"
12expect {
13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Error: invalid keep-fd option"
15}
16after 100
17
18send -- "firejail --noprofile --keep-fd=,,,\r"
19expect {
20 timeout {puts "TESTING ERROR 1\n";exit}
21 "Error: invalid keep-fd option"
22}
23after 100
24
25send -- "firejail --noprofile --keep-fd=dall\r"
26expect {
27 timeout {puts "TESTING ERROR 2\n";exit}
28 "Error: invalid keep-fd option"
29}
30after 100
31
32send -- "firejail --noprofile --keep-fd=6,7,8,10b,11\r"
33expect {
34 timeout {puts "TESTING ERROR 3\n";exit}
35 "Error: invalid keep-fd option"
36}
37after 100
38
39
40puts "\nall done\n"