diff options
Diffstat (limited to 'test/fs_chroot.exp')
-rwxr-xr-x | test/fs_chroot.exp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/test/fs_chroot.exp b/test/fs_chroot.exp index 448a00a7a..4ddf8d32a 100755 --- a/test/fs_chroot.exp +++ b/test/fs_chroot.exp | |||
@@ -4,7 +4,7 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --noprofile --chroot=/tmp/chroot\r" | 7 | send -- "firejail --chroot=/tmp/chroot\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 0\n";exit} | 9 | timeout {puts "TESTING ERROR 0\n";exit} |
10 | "Child process initialized" | 10 | "Child process initialized" |
@@ -13,12 +13,24 @@ sleep 1 | |||
13 | 13 | ||
14 | send -- "cd /home;pwd\r" | 14 | send -- "cd /home;pwd\r" |
15 | expect { | 15 | expect { |
16 | timeout {puts "TESTING ERROR 3\n";exit} | 16 | timeout {puts "TESTING ERROR 0.1\n";exit} |
17 | "home" | 17 | "home" |
18 | } | 18 | } |
19 | sleep 1 | 19 | sleep 1 |
20 | send -- "bash\r" | 20 | send -- "bash\r" |
21 | sleep 1 | 21 | sleep 1 |
22 | send -- "ls /; pwd\r" | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 0.2\n";exit} | ||
25 | "this-is-my-chroot" | ||
26 | } | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 0.3\n";exit} | ||
29 | "home" | ||
30 | } | ||
31 | |||
32 | |||
33 | |||
22 | send -- "ps aux; pwd\r" | 34 | send -- "ps aux; pwd\r" |
23 | expect { | 35 | expect { |
24 | timeout {puts "TESTING ERROR 1\n";exit} | 36 | timeout {puts "TESTING ERROR 1\n";exit} |
@@ -50,5 +62,6 @@ expect { | |||
50 | } | 62 | } |
51 | sleep 1 | 63 | sleep 1 |
52 | 64 | ||
65 | |||
53 | puts "all done\n" | 66 | puts "all done\n" |
54 | 67 | ||