diff options
author | netblue30 <netblue30@yahoo.com> | 2017-10-30 09:12:52 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2017-10-30 09:12:52 -0400 |
commit | ead373fcb9a79e6cdc7aff88d3c0d6e44c9400ac (patch) | |
tree | 612f9b5fdd59e97e545834df1a715b0d09d0d735 /test | |
parent | testing (diff) | |
download | firejail-ead373fcb9a79e6cdc7aff88d3c0d6e44c9400ac.tar.gz firejail-ead373fcb9a79e6cdc7aff88d3c0d6e44c9400ac.tar.zst firejail-ead373fcb9a79e6cdc7aff88d3c0d6e44c9400ac.zip |
testing
Diffstat (limited to 'test')
-rwxr-xr-x | test/environment/quiet.exp | 3 | ||||
-rwxr-xr-x | test/fcopy/dircopy.exp | 2 | ||||
-rwxr-xr-x | test/fcopy/filecopy.exp | 2 | ||||
-rwxr-xr-x | test/fcopy/linkcopy.exp | 2 | ||||
-rwxr-xr-x | test/filters/seccomp-chmod-profile.exp | 4 | ||||
-rwxr-xr-x | test/filters/seccomp-chmod.exp | 4 | ||||
-rwxr-xr-x | test/filters/seccomp-debug-32.exp | 3 | ||||
-rwxr-xr-x | test/filters/seccomp-debug.exp | 3 | ||||
-rwxr-xr-x | test/fs/private-lib.exp | 1 | ||||
-rwxr-xr-x | test/network/bandwidth.exp | 3 | ||||
-rwxr-xr-x | test/network/hostname.exp | 2 | ||||
-rwxr-xr-x | test/network/net_noip.exp | 3 | ||||
-rwxr-xr-x | test/network/net_noip2.exp | 2 | ||||
-rwxr-xr-x | test/network/net_none.exp | 3 | ||||
-rwxr-xr-x | test/overlay/fs-named.exp | 4 | ||||
-rwxr-xr-x | test/overlay/fs-tmpfs.exp | 6 | ||||
-rwxr-xr-x | test/overlay/fs.exp | 6 | ||||
-rwxr-xr-x | test/profiles/test-profile.exp | 2 | ||||
-rwxr-xr-x | test/root/checkcfg.exp | 2 | ||||
-rwxr-xr-x | test/root/firecfg.exp | 2 | ||||
-rwxr-xr-x | test/root/seccomp-chmod.exp | 2 | ||||
-rwxr-xr-x | test/root/seccomp-chown.exp | 2 | ||||
-rwxr-xr-x | test/utils/shutdown.exp | 2 |
23 files changed, 62 insertions, 3 deletions
diff --git a/test/environment/quiet.exp b/test/environment/quiet.exp index 3ab6d7f53..0df798f01 100755 --- a/test/environment/quiet.exp +++ b/test/environment/quiet.exp | |||
@@ -7,7 +7,8 @@ set timeout 4 | |||
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | 9 | ||
10 | # check ip address | 10 | send -- "stty -echo\r" |
11 | after 100 | ||
11 | send -- "firejail --quiet echo done\r" | 12 | send -- "firejail --quiet echo done\r" |
12 | expect { | 13 | expect { |
13 | timeout {puts "TESTING ERROR 1\n";exit} | 14 | timeout {puts "TESTING ERROR 1\n";exit} |
diff --git a/test/fcopy/dircopy.exp b/test/fcopy/dircopy.exp index e8462ae82..ae6ffecf0 100755 --- a/test/fcopy/dircopy.exp +++ b/test/fcopy/dircopy.exp | |||
@@ -118,6 +118,8 @@ expect { | |||
118 | } | 118 | } |
119 | after 100 | 119 | after 100 |
120 | 120 | ||
121 | send -- "stty -echo\r" | ||
122 | after 100 | ||
121 | send -- "diff -q src/a/b/file4 dest/a/b/file4; echo done\r" | 123 | send -- "diff -q src/a/b/file4 dest/a/b/file4; echo done\r" |
122 | expect { | 124 | expect { |
123 | timeout {puts "TESTING ERROR 16\n";exit} | 125 | timeout {puts "TESTING ERROR 16\n";exit} |
diff --git a/test/fcopy/filecopy.exp b/test/fcopy/filecopy.exp index 824a22bba..8074f2ee8 100755 --- a/test/fcopy/filecopy.exp +++ b/test/fcopy/filecopy.exp | |||
@@ -35,6 +35,8 @@ expect { | |||
35 | "rwxrwxr-x" { puts "umask 0002\n" } | 35 | "rwxrwxr-x" { puts "umask 0002\n" } |
36 | } | 36 | } |
37 | after 100 | 37 | after 100 |
38 | send -- "stty -echo\r" | ||
39 | after 100 | ||
38 | 40 | ||
39 | send -- "diff -q dircopy.exp dest/dircopy.exp; echo done\r" | 41 | send -- "diff -q dircopy.exp dest/dircopy.exp; echo done\r" |
40 | expect { | 42 | expect { |
diff --git a/test/fcopy/linkcopy.exp b/test/fcopy/linkcopy.exp index 46ee327cb..ea64329c1 100755 --- a/test/fcopy/linkcopy.exp +++ b/test/fcopy/linkcopy.exp | |||
@@ -34,6 +34,8 @@ expect { | |||
34 | "lrwxrwxrwx" | 34 | "lrwxrwxrwx" |
35 | } | 35 | } |
36 | after 100 | 36 | after 100 |
37 | send -- "stty -echo\r" | ||
38 | after 100 | ||
37 | 39 | ||
38 | send -- "diff -q dircopy.exp dest/dircopy.exp; echo done\r" | 40 | send -- "diff -q dircopy.exp dest/dircopy.exp; echo done\r" |
39 | expect { | 41 | expect { |
diff --git a/test/filters/seccomp-chmod-profile.exp b/test/filters/seccomp-chmod-profile.exp index 22615420d..fb4d0665b 100755 --- a/test/filters/seccomp-chmod-profile.exp +++ b/test/filters/seccomp-chmod-profile.exp | |||
@@ -12,8 +12,10 @@ expect { | |||
12 | timeout {puts "TESTING ERROR 0\n";exit} | 12 | timeout {puts "TESTING ERROR 0\n";exit} |
13 | "Child process initialized" | 13 | "Child process initialized" |
14 | } | 14 | } |
15 | sleep 2 | 15 | sleep 1 |
16 | 16 | ||
17 | send -- "stty -echo\r" | ||
18 | after 100 | ||
17 | send -- "cd ~; echo done\r" | 19 | send -- "cd ~; echo done\r" |
18 | expect { | 20 | expect { |
19 | timeout {puts "TESTING ERROR 1\n";exit} | 21 | timeout {puts "TESTING ERROR 1\n";exit} |
diff --git a/test/filters/seccomp-chmod.exp b/test/filters/seccomp-chmod.exp index 35c6f69c2..1dd9633c2 100755 --- a/test/filters/seccomp-chmod.exp +++ b/test/filters/seccomp-chmod.exp | |||
@@ -12,8 +12,10 @@ expect { | |||
12 | timeout {puts "TESTING ERROR 0\n";exit} | 12 | timeout {puts "TESTING ERROR 0\n";exit} |
13 | "Child process initialized" | 13 | "Child process initialized" |
14 | } | 14 | } |
15 | sleep 2 | 15 | sleep 1 |
16 | 16 | ||
17 | send -- "stty -echo\r" | ||
18 | after 100 | ||
17 | send -- "cd ~; echo done\r" | 19 | send -- "cd ~; echo done\r" |
18 | expect { | 20 | expect { |
19 | timeout {puts "TESTING ERROR 1\n";exit} | 21 | timeout {puts "TESTING ERROR 1\n";exit} |
diff --git a/test/filters/seccomp-debug-32.exp b/test/filters/seccomp-debug-32.exp index 098b309f5..57087a0b3 100755 --- a/test/filters/seccomp-debug-32.exp +++ b/test/filters/seccomp-debug-32.exp | |||
@@ -7,6 +7,9 @@ set timeout 10 | |||
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | 9 | ||
10 | send -- "stty -echo\r" | ||
11 | after 100 | ||
12 | |||
10 | send -- "firejail --debug sleep 1; echo done\r" | 13 | send -- "firejail --debug sleep 1; echo done\r" |
11 | expect { | 14 | expect { |
12 | timeout {puts "TESTING ERROR 0\n";exit} | 15 | timeout {puts "TESTING ERROR 0\n";exit} |
diff --git a/test/filters/seccomp-debug.exp b/test/filters/seccomp-debug.exp index 4986a6bf6..f90bbfa03 100755 --- a/test/filters/seccomp-debug.exp +++ b/test/filters/seccomp-debug.exp | |||
@@ -7,6 +7,9 @@ set timeout 10 | |||
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | 9 | ||
10 | send -- "stty -echo\r" | ||
11 | after 100 | ||
12 | |||
10 | send -- "firejail --debug sleep 1; echo done\r" | 13 | send -- "firejail --debug sleep 1; echo done\r" |
11 | expect { | 14 | expect { |
12 | timeout {puts "TESTING ERROR 0\n";exit} | 15 | timeout {puts "TESTING ERROR 0\n";exit} |
diff --git a/test/fs/private-lib.exp b/test/fs/private-lib.exp index 20d480062..422d8ef21 100755 --- a/test/fs/private-lib.exp +++ b/test/fs/private-lib.exp | |||
@@ -15,6 +15,7 @@ expect { | |||
15 | } | 15 | } |
16 | after 100 | 16 | after 100 |
17 | send -- "stty -echo\r" | 17 | send -- "stty -echo\r" |
18 | after 100 | ||
18 | 19 | ||
19 | send -- "cd /bin; find .\; echo done\r" | 20 | send -- "cd /bin; find .\; echo done\r" |
20 | expect { | 21 | expect { |
diff --git a/test/network/bandwidth.exp b/test/network/bandwidth.exp index 25845c728..db9772789 100755 --- a/test/network/bandwidth.exp +++ b/test/network/bandwidth.exp | |||
@@ -54,6 +54,9 @@ expect { | |||
54 | } | 54 | } |
55 | sleep 1 | 55 | sleep 1 |
56 | 56 | ||
57 | send -- "stty -echo\r" | ||
58 | after 100 | ||
59 | |||
57 | send -- "firejail --bandwidth=test status; echo done\r" | 60 | send -- "firejail --bandwidth=test status; echo done\r" |
58 | expect { | 61 | expect { |
59 | timeout {puts "TESTING ERROR 8\n";exit} | 62 | timeout {puts "TESTING ERROR 8\n";exit} |
diff --git a/test/network/hostname.exp b/test/network/hostname.exp index 0acb6a5ac..5dd14e028 100755 --- a/test/network/hostname.exp +++ b/test/network/hostname.exp | |||
@@ -13,6 +13,8 @@ expect { | |||
13 | "Child process initialized" | 13 | "Child process initialized" |
14 | } | 14 | } |
15 | sleep 1 | 15 | sleep 1 |
16 | send -- "stty -echo\r" | ||
17 | after 100 | ||
16 | 18 | ||
17 | send -- "ping -c 3 bingo; echo done\r" | 19 | send -- "ping -c 3 bingo; echo done\r" |
18 | expect { | 20 | expect { |
diff --git a/test/network/net_noip.exp b/test/network/net_noip.exp index 9a73f618a..1bde8456e 100755 --- a/test/network/net_noip.exp +++ b/test/network/net_noip.exp | |||
@@ -18,6 +18,9 @@ sleep 1 | |||
18 | send -- "bash\r" | 18 | send -- "bash\r" |
19 | sleep 1 | 19 | sleep 1 |
20 | 20 | ||
21 | send -- "stty -echo\r" | ||
22 | after 100 | ||
23 | |||
21 | # no default gateway configured | 24 | # no default gateway configured |
22 | send -- "netstat -rn;echo done\r" | 25 | send -- "netstat -rn;echo done\r" |
23 | expect { | 26 | expect { |
diff --git a/test/network/net_noip2.exp b/test/network/net_noip2.exp index c01f2e4f4..1e41c1b1c 100755 --- a/test/network/net_noip2.exp +++ b/test/network/net_noip2.exp | |||
@@ -17,6 +17,8 @@ expect { | |||
17 | sleep 1 | 17 | sleep 1 |
18 | send -- "bash\r" | 18 | send -- "bash\r" |
19 | sleep 1 | 19 | sleep 1 |
20 | send -- "stty -echo\r" | ||
21 | after 100 | ||
20 | 22 | ||
21 | # no default gateway configured | 23 | # no default gateway configured |
22 | send -- "netstat -rn;echo done\r" | 24 | send -- "netstat -rn;echo done\r" |
diff --git a/test/network/net_none.exp b/test/network/net_none.exp index 0d3701f22..b489d43f3 100755 --- a/test/network/net_none.exp +++ b/test/network/net_none.exp | |||
@@ -19,6 +19,9 @@ sleep 1 | |||
19 | # test default gw | 19 | # test default gw |
20 | send -- "bash\r" | 20 | send -- "bash\r" |
21 | sleep 1 | 21 | sleep 1 |
22 | send -- "stty -echo\r" | ||
23 | after 100 | ||
24 | |||
22 | send -- "netstat -rn; echo done\r" | 25 | send -- "netstat -rn; echo done\r" |
23 | expect { | 26 | expect { |
24 | timeout {puts "TESTING ERROR 1\n";exit} | 27 | timeout {puts "TESTING ERROR 1\n";exit} |
diff --git a/test/overlay/fs-named.exp b/test/overlay/fs-named.exp index 2519a8ede..0356720bc 100755 --- a/test/overlay/fs-named.exp +++ b/test/overlay/fs-named.exp | |||
@@ -12,6 +12,8 @@ expect { | |||
12 | "Child process initialized" {puts "found\n"} | 12 | "Child process initialized" {puts "found\n"} |
13 | } | 13 | } |
14 | sleep 1 | 14 | sleep 1 |
15 | send -- "stty -echo\r" | ||
16 | after 100 | ||
15 | 17 | ||
16 | send -- "echo xyzxyzxyz > ~/_firejail_test_file; echo done\r" | 18 | send -- "echo xyzxyzxyz > ~/_firejail_test_file; echo done\r" |
17 | expect { | 19 | expect { |
@@ -51,6 +53,8 @@ expect { | |||
51 | } | 53 | } |
52 | sleep 1 | 54 | sleep 1 |
53 | 55 | ||
56 | send -- "stty -echo\r" | ||
57 | after 100 | ||
54 | send -- "cat ~/_firejail_test_file; echo done\r" | 58 | send -- "cat ~/_firejail_test_file; echo done\r" |
55 | expect { | 59 | expect { |
56 | timeout {puts "TESTING ERROR 4\n";exit} | 60 | timeout {puts "TESTING ERROR 4\n";exit} |
diff --git a/test/overlay/fs-tmpfs.exp b/test/overlay/fs-tmpfs.exp index 7c1b5d1df..20fa315b6 100755 --- a/test/overlay/fs-tmpfs.exp +++ b/test/overlay/fs-tmpfs.exp | |||
@@ -21,6 +21,8 @@ expect { | |||
21 | "Child process initialized" {puts "found\n"} | 21 | "Child process initialized" {puts "found\n"} |
22 | } | 22 | } |
23 | sleep 1 | 23 | sleep 1 |
24 | send -- "stty -echo\r" | ||
25 | after 100 | ||
24 | 26 | ||
25 | send -- "echo xyzxyzxyz > ~/_firejail_test_file; echo done\r" | 27 | send -- "echo xyzxyzxyz > ~/_firejail_test_file; echo done\r" |
26 | expect { | 28 | expect { |
@@ -29,6 +31,8 @@ expect { | |||
29 | } | 31 | } |
30 | after 100 | 32 | after 100 |
31 | 33 | ||
34 | send -- "stty -echo\r" | ||
35 | after 100 | ||
32 | send -- "cat ~/_firejail_test_file; echo done\r" | 36 | send -- "cat ~/_firejail_test_file; echo done\r" |
33 | expect { | 37 | expect { |
34 | timeout {puts "TESTING ERROR 3\n";exit} | 38 | timeout {puts "TESTING ERROR 3\n";exit} |
@@ -43,6 +47,8 @@ after 100 | |||
43 | send -- "exit\r" | 47 | send -- "exit\r" |
44 | sleep 1 | 48 | sleep 1 |
45 | 49 | ||
50 | send -- "stty -echo\r" | ||
51 | after 100 | ||
46 | send -- "cat ~/_firejail_test_file; echo done\r" | 52 | send -- "cat ~/_firejail_test_file; echo done\r" |
47 | expect { | 53 | expect { |
48 | timeout {puts "TESTING ERROR 5\n";exit} | 54 | timeout {puts "TESTING ERROR 5\n";exit} |
diff --git a/test/overlay/fs.exp b/test/overlay/fs.exp index f8478e78b..9debe6536 100755 --- a/test/overlay/fs.exp +++ b/test/overlay/fs.exp | |||
@@ -13,6 +13,8 @@ expect { | |||
13 | } | 13 | } |
14 | sleep 1 | 14 | sleep 1 |
15 | 15 | ||
16 | send -- "stty -echo\r" | ||
17 | after 100 | ||
16 | send -- "echo xyzxyzxyz > ~/_firejail_test_file; echo done\r" | 18 | send -- "echo xyzxyzxyz > ~/_firejail_test_file; echo done\r" |
17 | expect { | 19 | expect { |
18 | timeout {puts "TESTING ERROR 3\n";exit} | 20 | timeout {puts "TESTING ERROR 3\n";exit} |
@@ -20,6 +22,8 @@ expect { | |||
20 | } | 22 | } |
21 | after 100 | 23 | after 100 |
22 | 24 | ||
25 | send -- "stty -echo\r" | ||
26 | after 100 | ||
23 | send -- "cat ~/_firejail_test_file; echo done\r" | 27 | send -- "cat ~/_firejail_test_file; echo done\r" |
24 | expect { | 28 | expect { |
25 | timeout {puts "TESTING ERROR 4\n";exit} | 29 | timeout {puts "TESTING ERROR 4\n";exit} |
@@ -34,6 +38,8 @@ after 100 | |||
34 | send -- "exit\r" | 38 | send -- "exit\r" |
35 | sleep 2 | 39 | sleep 2 |
36 | 40 | ||
41 | send -- "stty -echo\r" | ||
42 | after 100 | ||
37 | send -- "cat ~/_firejail_test_file; echo done\r" | 43 | send -- "cat ~/_firejail_test_file; echo done\r" |
38 | expect { | 44 | expect { |
39 | timeout {puts "TESTING ERROR 5\n";exit} | 45 | timeout {puts "TESTING ERROR 5\n";exit} |
diff --git a/test/profiles/test-profile.exp b/test/profiles/test-profile.exp index 63fb3a150..c043f4b9e 100755 --- a/test/profiles/test-profile.exp +++ b/test/profiles/test-profile.exp | |||
@@ -13,6 +13,8 @@ if { $argc != 1 } { | |||
13 | exit | 13 | exit |
14 | } | 14 | } |
15 | 15 | ||
16 | send -- "stty -echo\r" | ||
17 | after 100 | ||
16 | send -- "firejail --profile=$argv echo done\r" | 18 | send -- "firejail --profile=$argv echo done\r" |
17 | expect { | 19 | expect { |
18 | timeout {puts "TESTING ERROR 0\n";exit} | 20 | timeout {puts "TESTING ERROR 0\n";exit} |
diff --git a/test/root/checkcfg.exp b/test/root/checkcfg.exp index e17e9cda2..9b7402b95 100755 --- a/test/root/checkcfg.exp +++ b/test/root/checkcfg.exp | |||
@@ -107,6 +107,8 @@ send -- "echo \"xvfb-screen 800x600x24\" >> /etc/firejail/firejail.config\r" | |||
107 | after 100 | 107 | after 100 |
108 | send -- "echo \"xvfb-extra-params blablabla\" >> /etc/firejail/firejail.config\r" | 108 | send -- "echo \"xvfb-extra-params blablabla\" >> /etc/firejail/firejail.config\r" |
109 | sleep 1 | 109 | sleep 1 |
110 | send -- "stty -echo\r" | ||
111 | after 100 | ||
110 | send -- "firejail --noprofile echo done\r" | 112 | send -- "firejail --noprofile echo done\r" |
111 | expect { | 113 | expect { |
112 | timeout {puts "TESTING ERROR 11\n";exit} | 114 | timeout {puts "TESTING ERROR 11\n";exit} |
diff --git a/test/root/firecfg.exp b/test/root/firecfg.exp index 8210496bb..66c956a85 100755 --- a/test/root/firecfg.exp +++ b/test/root/firecfg.exp | |||
@@ -17,6 +17,8 @@ expect { | |||
17 | } | 17 | } |
18 | sleep 1 | 18 | sleep 1 |
19 | 19 | ||
20 | send -- "stty -echo\r" | ||
21 | after 100 | ||
20 | send -- "file /usr/local/bin/firefox; echo done\r" | 22 | send -- "file /usr/local/bin/firefox; echo done\r" |
21 | expect { | 23 | expect { |
22 | timeout {puts "TESTING ERROR 1\n";exit} | 24 | timeout {puts "TESTING ERROR 1\n";exit} |
diff --git a/test/root/seccomp-chmod.exp b/test/root/seccomp-chmod.exp index 35c6f69c2..dfec5a90e 100755 --- a/test/root/seccomp-chmod.exp +++ b/test/root/seccomp-chmod.exp | |||
@@ -14,6 +14,8 @@ expect { | |||
14 | } | 14 | } |
15 | sleep 2 | 15 | sleep 2 |
16 | 16 | ||
17 | send -- "stty -echo\r" | ||
18 | after 100 | ||
17 | send -- "cd ~; echo done\r" | 19 | send -- "cd ~; echo done\r" |
18 | expect { | 20 | expect { |
19 | timeout {puts "TESTING ERROR 1\n";exit} | 21 | timeout {puts "TESTING ERROR 1\n";exit} |
diff --git a/test/root/seccomp-chown.exp b/test/root/seccomp-chown.exp index 174a35ffe..85846ad96 100755 --- a/test/root/seccomp-chown.exp +++ b/test/root/seccomp-chown.exp | |||
@@ -14,6 +14,8 @@ expect { | |||
14 | } | 14 | } |
15 | sleep 2 | 15 | sleep 2 |
16 | 16 | ||
17 | send -- "stty -echo\r" | ||
18 | after 100 | ||
17 | send -- "touch testfile; echo done\r" | 19 | send -- "touch testfile; echo done\r" |
18 | expect { | 20 | expect { |
19 | timeout {puts "TESTING ERROR 1\n";exit} | 21 | timeout {puts "TESTING ERROR 1\n";exit} |
diff --git a/test/utils/shutdown.exp b/test/utils/shutdown.exp index eb87c5d4f..fba76fa7a 100755 --- a/test/utils/shutdown.exp +++ b/test/utils/shutdown.exp | |||
@@ -16,6 +16,8 @@ expect { | |||
16 | sleep 2 | 16 | sleep 2 |
17 | 17 | ||
18 | spawn $env(SHELL) | 18 | spawn $env(SHELL) |
19 | send -- "stty -echo\r" | ||
20 | after 100 | ||
19 | send -- "firejail --shutdown=shutdowntesting; echo done\r" | 21 | send -- "firejail --shutdown=shutdowntesting; echo done\r" |
20 | expect { | 22 | expect { |
21 | timeout {puts "TESTING ERROR 4\n";exit} | 23 | timeout {puts "TESTING ERROR 4\n";exit} |