aboutsummaryrefslogtreecommitdiffstats
path: root/test/fs/noblacklist-blacklist-noexec.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/fs/noblacklist-blacklist-noexec.exp')
-rwxr-xr-xtest/fs/noblacklist-blacklist-noexec.exp36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/fs/noblacklist-blacklist-noexec.exp b/test/fs/noblacklist-blacklist-noexec.exp
new file mode 100755
index 000000000..5d0581a8c
--- /dev/null
+++ b/test/fs/noblacklist-blacklist-noexec.exp
@@ -0,0 +1,36 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2019 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9set PWD $env(PWD)
10
11
12send -- "firejail --noprofile --noblacklist=$PWD --blacklist=$PWD --noexec=$PWD\r"
13expect {
14 timeout {puts "TESTING ERROR 0\n";exit}
15 "Child process initialized"
16}
17sleep 1
18
19send -- "ls $PWD\r"
20expect {
21 timeout {puts "TESTING ERROR 1\n";exit}
22 "noblacklist-blacklist-noexec.exp"
23}
24after 100
25
26send -- "$PWD/noblacklist-blacklist-noexec.exp\r"
27expect {
28 timeout {puts "TESTING ERROR 2\n";exit}
29 "Permission denied"
30}
31after 100
32
33send -- "exit\r"
34sleep 1
35
36puts "\nall done\n"