aboutsummaryrefslogtreecommitdiffstats
path: root/test/fs
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-05-05 18:16:03 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-05-05 18:16:03 -0400
commitf8ad9c20bbbc5018927598c23532e33851b74d60 (patch)
treefce89e52f67388c228039d5c9efdae8d069f2813 /test/fs
parentMerge pull request #499 from reinerh/master (diff)
downloadfirejail-f8ad9c20bbbc5018927598c23532e33851b74d60.tar.gz
firejail-f8ad9c20bbbc5018927598c23532e33851b74d60.tar.zst
firejail-f8ad9c20bbbc5018927598c23532e33851b74d60.zip
test fixes
Diffstat (limited to 'test/fs')
-rwxr-xr-xtest/fs/fs.sh1
-rwxr-xr-xtest/fs/private-whitelist.exp10
-rwxr-xr-xtest/fs/private.exp43
3 files changed, 7 insertions, 47 deletions
diff --git a/test/fs/fs.sh b/test/fs/fs.sh
index 425af45a6..0fcffcb8e 100755
--- a/test/fs/fs.sh
+++ b/test/fs/fs.sh
@@ -31,7 +31,6 @@ echo "TESTING: whitelist empty (test/fs/whitelist-empty.exp)"
31./whitelist-empty.exp 31./whitelist-empty.exp
32 32
33echo "TESTING: private whitelist (test/fs/private-whitelist.exp)" 33echo "TESTING: private whitelist (test/fs/private-whitelist.exp)"
34echo "TESTING: (failing on OpenSUSE)"
35./private-whitelist.exp 34./private-whitelist.exp
36 35
37echo "TESTING: invalid filename (test/fs/invalid_filename.exp)" 36echo "TESTING: invalid filename (test/fs/invalid_filename.exp)"
diff --git a/test/fs/private-whitelist.exp b/test/fs/private-whitelist.exp
index a3d60369a..4dadeacb1 100755
--- a/test/fs/private-whitelist.exp
+++ b/test/fs/private-whitelist.exp
@@ -12,26 +12,28 @@ expect {
12 timeout {puts "TESTING ERROR 1\n";exit} 12 timeout {puts "TESTING ERROR 1\n";exit}
13 "Child process initialized" 13 "Child process initialized"
14} 14}
15sleep 1 15after 100
16 16
17send -- "ls -al /tmp\r" 17send -- "ls -al /tmp\r"
18expect { 18expect {
19 timeout {puts "TESTING ERROR 2\n";exit} 19 timeout {puts "TESTING ERROR 2\n";exit}
20 ".X11-unix" 20 ".X11-unix"
21} 21}
22sleep 1 22after 100
23 23
24send -- "ls -a /tmp | wc -l\r" 24send -- "ls -a /tmp | wc -l\r"
25expect { 25expect {
26 timeout {puts "TESTING ERROR 3\n";exit} 26 timeout {puts "TESTING ERROR 3\n";exit}
27 "3" 27 "3"
28} 28}
29sleep 1 29after 100
30 30
31send -- "ls -a ~ | wc -l\r" 31send -- "ls -a ~ | wc -l\r"
32expect { 32expect {
33 timeout {puts "TESTING ERROR 4\n";exit} 33 timeout {puts "TESTING ERROR 4\n";exit}
34 "5" 34 "3" {puts "3\n"}
35 "4" {puts "4\n"}
36 "5" {puts "5\n"}
35} 37}
36 38
37sleep 1 39sleep 1
diff --git a/test/fs/private.exp b/test/fs/private.exp
index 01f04d3cb..7eee0c82b 100755
--- a/test/fs/private.exp
+++ b/test/fs/private.exp
@@ -38,49 +38,8 @@ expect {
38} 38}
39expect { 39expect {
40 timeout {puts "TESTING ERROR 3\n";exit} 40 timeout {puts "TESTING ERROR 3\n";exit}
41 [lindex $argv 0] 41 done
42} 42}
43send -- "ls -al; echo done\r"
44expect {
45 timeout {
46 # OpenSUSE doesn't use .Xauthority from user done directory
47 send -- "env | grep XAUTHORITY\r"
48
49 expect {
50 timeout {puts "TESTING ERROR 4\n";exit}
51 "/run/lightdm/netblue/xauthority"
52 }
53 }
54 ".Xauthority"
55}
56expect {
57 timeout {puts "TESTING ERROR 5\n";exit}
58 [lindex $argv 0]
59}
60
61
62# testing private only
63send -- "bash\r"
64sleep 1
65# owner /done/netblue
66send -- "ls -l /done;echo done\r"
67expect {
68 timeout {puts "TESTING ERROR 6\n";exit}
69 [lindex $argv 0]
70}
71expect {
72 timeout {puts "TESTING ERROR 7\n";exit}
73 [lindex $argv 0]
74}
75expect {
76 timeout {puts "TESTING ERROR 8\n";exit}
77 [lindex $argv 0]
78}
79expect {
80 timeout {puts "TESTING ERROR 9\n";exit}
81 "done"
82}
83sleep 1
84 43
85# owner /tmp 44# owner /tmp
86send -- "stat -c %U%a /tmp;echo done\r" 45send -- "stat -c %U%a /tmp;echo done\r"