aboutsummaryrefslogtreecommitdiffstats
path: root/test/fs/private.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/fs/private.exp')
-rwxr-xr-xtest/fs/private.exp58
1 files changed, 58 insertions, 0 deletions
diff --git a/test/fs/private.exp b/test/fs/private.exp
new file mode 100755
index 000000000..8114ee45d
--- /dev/null
+++ b/test/fs/private.exp
@@ -0,0 +1,58 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10
11if {[file exists ~/.asoundrc]} {
12 puts "found .asoundrc file\n"
13} else {
14 send -- "touch ~/.asoundrc\r"
15}
16after 100
17
18if {[file exists ~/.Xauthority]} {
19 puts "found .Xauthority file\n"
20} else {
21 send -- "touch ~/.Xauthority\r"
22}
23after 100
24
25# testing profile and private
26send -- "firejail --private\r"
27expect {
28 timeout {puts "TESTING ERROR 0\n";exit}
29 "Child process initialized"
30}
31sleep 1
32
33send -- "ls -l ~\r"
34expect {
35 timeout {puts "TESTING ERROR 1\n";exit}
36 "total 0"
37}
38after 100
39
40send -- "ls -al ~\r"
41expect {
42 timeout {puts "TESTING ERROR 2\n";exit}
43 ".asoundrc"
44}
45expect {
46 timeout {puts "TESTING ERROR 3\n";exit}
47 ".bashrc"
48}
49expect {
50 timeout {puts "TESTING ERROR 4\n";exit}
51 ".Xauthority"
52}
53after 100
54
55send -- "exit\r"
56sleep 1
57
58puts "all done\n"