diff options
author | 2020-11-08 08:50:04 -0500 | |
---|---|---|
committer | 2020-11-08 08:50:04 -0500 | |
commit | 2a4eca185266ef26fd71816d0e36eee815c8a486 (patch) | |
tree | 39d6bd8c27da5a092ab8175af27ac827b17a712d /test/fs/mkdir.exp | |
parent | mkdir ci testing (diff) | |
download | firejail-2a4eca185266ef26fd71816d0e36eee815c8a486.tar.gz firejail-2a4eca185266ef26fd71816d0e36eee815c8a486.tar.zst firejail-2a4eca185266ef26fd71816d0e36eee815c8a486.zip |
mkdir ci testing
Diffstat (limited to 'test/fs/mkdir.exp')
-rwxr-xr-x | test/fs/mkdir.exp | 43 |
1 files changed, 17 insertions, 26 deletions
diff --git a/test/fs/mkdir.exp b/test/fs/mkdir.exp index 49fef38cc..61029ec18 100755 --- a/test/fs/mkdir.exp +++ b/test/fs/mkdir.exp | |||
@@ -7,18 +7,6 @@ set timeout 3 | |||
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | 9 | ||
10 | |||
11 | # debugging github-ci - do we have a /run/user/1001 directory? | ||
12 | send "echo %%%%%%%%%%%%%%%%%%%%%%%%%%\r" | ||
13 | after 100 | ||
14 | send "ls -l /run/user\r" | ||
15 | after 100 | ||
16 | send "find /run/user\r" | ||
17 | after 100 | ||
18 | send "echo %%%%%%%%%%%%%%%%%%%%%%%%%%\r" | ||
19 | after 100 | ||
20 | |||
21 | |||
22 | send -- "rm -fr ~/.firejail_test\r" | 10 | send -- "rm -fr ~/.firejail_test\r" |
23 | after 100 | 11 | after 100 |
24 | 12 | ||
@@ -39,20 +27,23 @@ send -- "rm -rf /tmp/.firejail_test\r" | |||
39 | after 100 | 27 | after 100 |
40 | 28 | ||
41 | set UID [exec id -u] | 29 | set UID [exec id -u] |
42 | send -- "firejail --profile=mkdir.profile find /run/user/$UID/.firejail_test\r" | 30 | set fexist [file exist /run/user/$UID] |
43 | expect { | 31 | if { $fexist } { |
44 | timeout {puts "TESTING ERROR 3.1\n";exit} | 32 | send -- "firejail --profile=mkdir.profile find /run/user/$UID/.firejail_test\r" |
45 | "/run/user/$UID/.firejail_test/a/b/c/d.txt" | 33 | expect { |
34 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
35 | "/run/user/$UID/.firejail_test/a/b/c/d.txt" | ||
36 | } | ||
37 | send -- "rm -rf /run/user/$UID/.firejail_test\r" | ||
38 | after 100 | ||
39 | |||
40 | |||
41 | send -- "firejail --profile=mkdir2.profile\r" | ||
42 | expect { | ||
43 | timeout {puts "TESTING ERROR 4\n";exit} | ||
44 | "only files or directories in user home, /tmp, or /run/user/<UID>" | ||
45 | } | ||
46 | after 100 | ||
46 | } | 47 | } |
47 | send -- "rm -rf /run/user/$UID/.firejail_test\r" | ||
48 | after 100 | ||
49 | |||
50 | |||
51 | send -- "firejail --profile=mkdir2.profile\r" | ||
52 | expect { | ||
53 | timeout {puts "TESTING ERROR 4\n";exit} | ||
54 | "only files or directories in user home, /tmp, or /run/user/<UID>" | ||
55 | } | ||
56 | after 100 | ||
57 | 48 | ||
58 | puts "\nall done\n" | 49 | puts "\nall done\n" |