diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/fs/fs.sh | 3 | ||||
-rwxr-xr-x | test/fs/private-homedir.exp | 25 |
2 files changed, 28 insertions, 0 deletions
diff --git a/test/fs/fs.sh b/test/fs/fs.sh index 0b9cf977e..efbf505ee 100755 --- a/test/fs/fs.sh +++ b/test/fs/fs.sh | |||
@@ -43,6 +43,9 @@ echo "TESTING: private home (test/fs/private-home.exp)" | |||
43 | echo "TESTING: private home dir (test/fs/private-home-dir.exp)" | 43 | echo "TESTING: private home dir (test/fs/private-home-dir.exp)" |
44 | ./private-home-dir.exp | 44 | ./private-home-dir.exp |
45 | 45 | ||
46 | echo "TESTING: private home dir same as user home (test/fs/private-homedir.exp)" | ||
47 | ./private-homedir.exp | ||
48 | |||
46 | echo "TESTING: private-etc (test/fs/private-etc.exp)" | 49 | echo "TESTING: private-etc (test/fs/private-etc.exp)" |
47 | ./private-etc.exp | 50 | ./private-etc.exp |
48 | 51 | ||
diff --git a/test/fs/private-homedir.exp b/test/fs/private-homedir.exp new file mode 100755 index 000000000..35085948a --- /dev/null +++ b/test/fs/private-homedir.exp | |||
@@ -0,0 +1,25 @@ | |||
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 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --private=~\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 1\n";exit} | ||
13 | "Child process initialized" | ||
14 | } | ||
15 | after 100 | ||
16 | |||
17 | send -- "ls -l ~\r" | ||
18 | expect { | ||
19 | timeout {puts "TESTING ERROR 2\n";exit} | ||
20 | "total 0" | ||
21 | } | ||
22 | after 100 | ||
23 | |||
24 | puts "\nall done\n" | ||
25 | |||