diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/arguments/arguments.sh | 7 | ||||
-rwxr-xr-x | test/arguments/bashrun.sh | 12 | ||||
-rwxr-xr-x | test/arguments/joinrun.sh | 12 | ||||
-rwxr-xr-x | test/arguments/outrun.sh | 12 | ||||
-rwxr-xr-x | test/environment/csh.exp | 2 | ||||
-rwxr-xr-x | test/environment/zsh.exp | 2 | ||||
-rwxr-xr-x | test/fcopy/cmdline.exp | 8 | ||||
-rwxr-xr-x | test/fcopy/dircopy.exp | 2 | ||||
-rwxr-xr-x | test/fcopy/fcopy.sh | 7 | ||||
-rwxr-xr-x | test/fcopy/filecopy.exp | 2 | ||||
-rwxr-xr-x | test/fcopy/linkcopy.exp | 2 | ||||
-rwxr-xr-x | test/filters/filters.sh | 7 | ||||
-rwxr-xr-x | test/filters/fseccomp.exp | 30 | ||||
-rwxr-xr-x | test/fs/mkdir_mkfile.exp | 10 | ||||
-rwxr-xr-x | test/fs/private-home-dir.exp | 10 | ||||
-rwxr-xr-x | test/fs/private.exp | 8 | ||||
-rwxr-xr-x | test/fs/whitelist-double.exp | 4 | ||||
-rwxr-xr-x | test/fs/whitelist-empty.exp | 12 | ||||
-rwxr-xr-x | test/network/4bridges_arp.exp | 12 | ||||
-rwxr-xr-x | test/network/4bridges_ip.exp | 12 | ||||
-rwxr-xr-x | test/network/interface.exp | 8 | ||||
-rwxr-xr-x | test/network/net_defaultgw.exp | 3 | ||||
-rwxr-xr-x | test/network/net_defaultgw2.exp | 6 | ||||
-rwxr-xr-x | test/network/net_ip.exp | 3 | ||||
-rwxr-xr-x | test/network/net_profile.exp | 6 | ||||
-rwxr-xr-x | test/utils/audit.exp | 2 |
26 files changed, 118 insertions, 83 deletions
diff --git a/test/arguments/arguments.sh b/test/arguments/arguments.sh index db4c9b472..d9b7058bf 100755 --- a/test/arguments/arguments.sh +++ b/test/arguments/arguments.sh | |||
@@ -1,6 +1,11 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | [ -f argtest ] || make argtest | 3 | if [ -f /etc/debian_version ]; then |
4 | libdir=$(dirname "$(dpkg -L firejail | grep faudit)") | ||
5 | export PATH="$PATH:$libdir" | ||
6 | else | ||
7 | export PATH="$PATH:/usr/lib/firejail" | ||
8 | fi | ||
4 | 9 | ||
5 | echo "TESTING: 1. regular bash session" | 10 | echo "TESTING: 1. regular bash session" |
6 | ./bashrun.exp | 11 | ./bashrun.exp |
diff --git a/test/arguments/bashrun.sh b/test/arguments/bashrun.sh index 0797c92c2..a4773fd6c 100755 --- a/test/arguments/bashrun.sh +++ b/test/arguments/bashrun.sh | |||
@@ -1,22 +1,22 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | echo "TESTING: 1.1 - simple args" | 3 | echo "TESTING: 1.1 - simple args" |
4 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --quiet /usr/lib/firejail/faudit arg1 arg2 | 4 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --quiet faudit arg1 arg2 |
5 | 5 | ||
6 | # simple quotes, testing spaces in file names | 6 | # simple quotes, testing spaces in file names |
7 | echo "TESTING: 1.2 - args with space and \"" | 7 | echo "TESTING: 1.2 - args with space and \"" |
8 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --quiet /usr/lib/firejail/faudit "arg1 tail" "arg2 tail" | 8 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --quiet faudit "arg1 tail" "arg2 tail" |
9 | 9 | ||
10 | echo "TESTING: 1.3 - args with space and '" | 10 | echo "TESTING: 1.3 - args with space and '" |
11 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --quiet /usr/lib/firejail/faudit 'arg1 tail' 'arg2 tail' | 11 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --quiet faudit 'arg1 tail' 'arg2 tail' |
12 | 12 | ||
13 | # escaped space in file names | 13 | # escaped space in file names |
14 | echo "TESTING: 1.4 - args with space and \\" | 14 | echo "TESTING: 1.4 - args with space and \\" |
15 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --quiet /usr/lib/firejail/faudit arg1\ tail arg2\ tail | 15 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --quiet faudit arg1\ tail arg2\ tail |
16 | 16 | ||
17 | # & char appears in URLs - URLs should be quoted | 17 | # & char appears in URLs - URLs should be quoted |
18 | echo "TESTING: 1.5 - args with & and \"" | 18 | echo "TESTING: 1.5 - args with & and \"" |
19 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --quiet /usr/lib/firejail/faudit "arg1&tail" "arg2&tail" | 19 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --quiet faudit "arg1&tail" "arg2&tail" |
20 | 20 | ||
21 | echo "TESTING: 1.6 - args with & and '" | 21 | echo "TESTING: 1.6 - args with & and '" |
22 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --quiet /usr/lib/firejail/faudit 'arg1&tail' 'arg2&tail' | 22 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --quiet faudit 'arg1&tail' 'arg2&tail' |
diff --git a/test/arguments/joinrun.sh b/test/arguments/joinrun.sh index 2743d823e..3ed166839 100755 --- a/test/arguments/joinrun.sh +++ b/test/arguments/joinrun.sh | |||
@@ -1,22 +1,22 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | echo "TESTING: 3.1 - simple args" | 3 | echo "TESTING: 3.1 - simple args" |
4 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --join=joinrun /usr/lib/firejail/faudit arg1 arg2 | 4 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --join=joinrun faudit arg1 arg2 |
5 | 5 | ||
6 | # simple quotes, testing spaces in file names | 6 | # simple quotes, testing spaces in file names |
7 | echo "TESTING: 3.2 - args with space and \"" | 7 | echo "TESTING: 3.2 - args with space and \"" |
8 | firejail--env=FIREJAIL_TEST_ARGUMENTS=yes --quiet /usr/lib/firejail/faudit "arg1 tail" "arg2 tail" | 8 | firejail--env=FIREJAIL_TEST_ARGUMENTS=yes --quiet faudit "arg1 tail" "arg2 tail" |
9 | 9 | ||
10 | echo "TESTING: 3.3 - args with space and '" | 10 | echo "TESTING: 3.3 - args with space and '" |
11 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --quiet /usr/lib/firejail/faudit 'arg1 tail' 'arg2 tail' | 11 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --quiet faudit 'arg1 tail' 'arg2 tail' |
12 | 12 | ||
13 | # escaped space in file names | 13 | # escaped space in file names |
14 | echo "TESTING: 3.4 - args with space and \\" | 14 | echo "TESTING: 3.4 - args with space and \\" |
15 | firejail--env=FIREJAIL_TEST_ARGUMENTS=yes --quiet /usr/lib/firejail/faudit arg1\ tail arg2\ tail | 15 | firejail--env=FIREJAIL_TEST_ARGUMENTS=yes --quiet faudit arg1\ tail arg2\ tail |
16 | 16 | ||
17 | # & char appears in URLs - URLs should be quoted | 17 | # & char appears in URLs - URLs should be quoted |
18 | echo "TESTING: 3.5 - args with & and \"" | 18 | echo "TESTING: 3.5 - args with & and \"" |
19 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --quiet /usr/lib/firejail/faudit "arg1&tail" "arg2&tail" | 19 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --quiet faudit "arg1&tail" "arg2&tail" |
20 | 20 | ||
21 | echo "TESTING: 3.6 - args with & and '" | 21 | echo "TESTING: 3.6 - args with & and '" |
22 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --quiet /usr/lib/firejail/faudit 'arg1&tail' 'arg2&tail' | 22 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --quiet faudit 'arg1&tail' 'arg2&tail' |
diff --git a/test/arguments/outrun.sh b/test/arguments/outrun.sh index a21243873..e2b3046d6 100755 --- a/test/arguments/outrun.sh +++ b/test/arguments/outrun.sh | |||
@@ -1,22 +1,22 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | echo "TESTING: 4.1 - simple args" | 3 | echo "TESTING: 4.1 - simple args" |
4 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --output=out /usr/lib/firejail/faudit arg1 arg2 | 4 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --output=out faudit arg1 arg2 |
5 | 5 | ||
6 | # simple quotes, testing spaces in file names | 6 | # simple quotes, testing spaces in file names |
7 | echo "TESTING: 4.2 - args with space and \"" | 7 | echo "TESTING: 4.2 - args with space and \"" |
8 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --output=out /usr/lib/firejail/faudit "arg1 tail" "arg2 tail" | 8 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --output=out faudit "arg1 tail" "arg2 tail" |
9 | 9 | ||
10 | echo "TESTING: 4.3 - args with space and '" | 10 | echo "TESTING: 4.3 - args with space and '" |
11 | firejail--env=FIREJAIL_TEST_ARGUMENTS=yes --output=out /usr/lib/firejail/faudit 'arg1 tail' 'arg2 tail' | 11 | firejail--env=FIREJAIL_TEST_ARGUMENTS=yes --output=out faudit 'arg1 tail' 'arg2 tail' |
12 | 12 | ||
13 | # escaped space in file names | 13 | # escaped space in file names |
14 | echo "TESTING: 4.4 - args with space and \\" | 14 | echo "TESTING: 4.4 - args with space and \\" |
15 | firejail--env=FIREJAIL_TEST_ARGUMENTS=yes --output=out /usr/lib/firejail/faudit arg1\ tail arg2\ tail | 15 | firejail--env=FIREJAIL_TEST_ARGUMENTS=yes --output=out faudit arg1\ tail arg2\ tail |
16 | 16 | ||
17 | # & char appears in URLs - URLs should be quoted | 17 | # & char appears in URLs - URLs should be quoted |
18 | echo "TESTING: 4.5 - args with & and \"" | 18 | echo "TESTING: 4.5 - args with & and \"" |
19 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --output=out /usr/lib/firejail/faudit "arg1&tail" "arg2&tail" | 19 | firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --output=out faudit "arg1&tail" "arg2&tail" |
20 | 20 | ||
21 | echo "TESTING: 4.6 - args with & and '" | 21 | echo "TESTING: 4.6 - args with & and '" |
22 | firejail--env=FIREJAIL_TEST_ARGUMENTS=yes --output=out /usr/lib/firejail/faudit 'arg1&tail' 'arg2&tail' | 22 | firejail--env=FIREJAIL_TEST_ARGUMENTS=yes --output=out faudit 'arg1&tail' 'arg2&tail' |
diff --git a/test/environment/csh.exp b/test/environment/csh.exp index bd0cf8c86..89de94b3c 100755 --- a/test/environment/csh.exp +++ b/test/environment/csh.exp | |||
@@ -14,7 +14,7 @@ expect { | |||
14 | } | 14 | } |
15 | sleep 1 | 15 | sleep 1 |
16 | 16 | ||
17 | send -- "find /home\r" | 17 | send -- "find ~\r" |
18 | expect { | 18 | expect { |
19 | timeout {puts "TESTING ERROR 1\n";exit} | 19 | timeout {puts "TESTING ERROR 1\n";exit} |
20 | ".cshrc" | 20 | ".cshrc" |
diff --git a/test/environment/zsh.exp b/test/environment/zsh.exp index 4380f476c..1b6cdcdc5 100755 --- a/test/environment/zsh.exp +++ b/test/environment/zsh.exp | |||
@@ -14,7 +14,7 @@ expect { | |||
14 | } | 14 | } |
15 | sleep 1 | 15 | sleep 1 |
16 | 16 | ||
17 | send -- "find /home\r" | 17 | send -- "find ~\r" |
18 | expect { | 18 | expect { |
19 | timeout {puts "TESTING ERROR 1\n";exit} | 19 | timeout {puts "TESTING ERROR 1\n";exit} |
20 | ".zshrc" | 20 | ".zshrc" |
diff --git a/test/fcopy/cmdline.exp b/test/fcopy/cmdline.exp index 10dd8da58..798c9e718 100755 --- a/test/fcopy/cmdline.exp +++ b/test/fcopy/cmdline.exp | |||
@@ -7,7 +7,7 @@ set timeout 10 | |||
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | 9 | ||
10 | send -- "/usr/lib/firejail/fcopy\r" | 10 | send -- "fcopy\r" |
11 | expect { | 11 | expect { |
12 | timeout {puts "TESTING ERROR 0\n";exit} | 12 | timeout {puts "TESTING ERROR 0\n";exit} |
13 | "arguments missing" | 13 | "arguments missing" |
@@ -18,7 +18,7 @@ expect { | |||
18 | } | 18 | } |
19 | after 100 | 19 | after 100 |
20 | 20 | ||
21 | send -- "/usr/lib/firejail/fcopy foo\r" | 21 | send -- "fcopy foo\r" |
22 | expect { | 22 | expect { |
23 | timeout {puts "TESTING ERROR 2\n";exit} | 23 | timeout {puts "TESTING ERROR 2\n";exit} |
24 | "arguments missing" | 24 | "arguments missing" |
@@ -29,14 +29,14 @@ expect { | |||
29 | } | 29 | } |
30 | after 100 | 30 | after 100 |
31 | 31 | ||
32 | send -- "/usr/lib/firejail/fcopy f%oo1 foo2\r" | 32 | send -- "fcopy f%oo1 foo2\r" |
33 | expect { | 33 | expect { |
34 | timeout {puts "TESTING ERROR 4\n";exit} | 34 | timeout {puts "TESTING ERROR 4\n";exit} |
35 | "invalid source file name" | 35 | "invalid source file name" |
36 | } | 36 | } |
37 | after 100 | 37 | after 100 |
38 | 38 | ||
39 | send -- "/usr/lib/firejail/fcopy foo1 f,oo2\r" | 39 | send -- "fcopy foo1 f,oo2\r" |
40 | expect { | 40 | expect { |
41 | timeout {puts "TESTING ERROR 5\n";exit} | 41 | timeout {puts "TESTING ERROR 5\n";exit} |
42 | "invalid dest file name" | 42 | "invalid dest file name" |
diff --git a/test/fcopy/dircopy.exp b/test/fcopy/dircopy.exp index 573f454c8..e8462ae82 100755 --- a/test/fcopy/dircopy.exp +++ b/test/fcopy/dircopy.exp | |||
@@ -13,7 +13,7 @@ match_max 100000 | |||
13 | send -- "rm -fr dest/*\r" | 13 | send -- "rm -fr dest/*\r" |
14 | after 100 | 14 | after 100 |
15 | 15 | ||
16 | send -- "/usr/lib/firejail/fcopy src dest\r" | 16 | send -- "fcopy src dest\r" |
17 | after 100 | 17 | after 100 |
18 | 18 | ||
19 | send -- "find dest\r" | 19 | send -- "find dest\r" |
diff --git a/test/fcopy/fcopy.sh b/test/fcopy/fcopy.sh index 0ae50399a..d122eff5d 100755 --- a/test/fcopy/fcopy.sh +++ b/test/fcopy/fcopy.sh | |||
@@ -6,6 +6,13 @@ | |||
6 | export MALLOC_CHECK_=3 | 6 | export MALLOC_CHECK_=3 |
7 | export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) | 7 | export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) |
8 | 8 | ||
9 | if [ -f /etc/debian_version ]; then | ||
10 | libdir=$(dirname "$(dpkg -L firejail | grep fcopy)") | ||
11 | export PATH="$PATH:$libdir" | ||
12 | else | ||
13 | export PATH="$PATH:/usr/lib/firejail" | ||
14 | fi | ||
15 | |||
9 | mkdir dest | 16 | mkdir dest |
10 | 17 | ||
11 | echo "TESTING: fcopy cmdline (test/fcopy/cmdline.exp)" | 18 | echo "TESTING: fcopy cmdline (test/fcopy/cmdline.exp)" |
diff --git a/test/fcopy/filecopy.exp b/test/fcopy/filecopy.exp index e0d959c32..824a22bba 100755 --- a/test/fcopy/filecopy.exp +++ b/test/fcopy/filecopy.exp | |||
@@ -13,7 +13,7 @@ match_max 100000 | |||
13 | send -- "rm -fr dest/*\r" | 13 | send -- "rm -fr dest/*\r" |
14 | after 100 | 14 | after 100 |
15 | 15 | ||
16 | send -- "/usr/lib/firejail/fcopy dircopy.exp dest\r" | 16 | send -- "fcopy dircopy.exp dest\r" |
17 | after 100 | 17 | after 100 |
18 | 18 | ||
19 | send -- "find dest\r" | 19 | send -- "find dest\r" |
diff --git a/test/fcopy/linkcopy.exp b/test/fcopy/linkcopy.exp index beceb3675..46ee327cb 100755 --- a/test/fcopy/linkcopy.exp +++ b/test/fcopy/linkcopy.exp | |||
@@ -13,7 +13,7 @@ match_max 100000 | |||
13 | send -- "rm -fr dest/*\r" | 13 | send -- "rm -fr dest/*\r" |
14 | after 100 | 14 | after 100 |
15 | 15 | ||
16 | send -- "/usr/lib/firejail/fcopy src/dircopy.exp dest\r" | 16 | send -- "fcopy src/dircopy.exp dest\r" |
17 | after 100 | 17 | after 100 |
18 | 18 | ||
19 | send -- "find dest\r" | 19 | send -- "find dest\r" |
diff --git a/test/filters/filters.sh b/test/filters/filters.sh index 4996e6d66..59d7d7e7f 100755 --- a/test/filters/filters.sh +++ b/test/filters/filters.sh | |||
@@ -6,6 +6,13 @@ | |||
6 | export MALLOC_CHECK_=3 | 6 | export MALLOC_CHECK_=3 |
7 | export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) | 7 | export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) |
8 | 8 | ||
9 | if [ -f /etc/debian_version ]; then | ||
10 | libdir=$(dirname "$(dpkg -L firejail | grep fseccomp)") | ||
11 | export PATH="$PATH:$libdir" | ||
12 | else | ||
13 | export PATH="$PATH:/usr/lib/firejail" | ||
14 | fi | ||
15 | |||
9 | echo "TESTING: debug options (test/filters/debug.exp)" | 16 | echo "TESTING: debug options (test/filters/debug.exp)" |
10 | ./debug.exp | 17 | ./debug.exp |
11 | 18 | ||
diff --git a/test/filters/fseccomp.exp b/test/filters/fseccomp.exp index 4d876df08..433524680 100755 --- a/test/filters/fseccomp.exp +++ b/test/filters/fseccomp.exp | |||
@@ -8,39 +8,39 @@ spawn $env(SHELL) | |||
8 | match_max 100000 | 8 | match_max 100000 |
9 | 9 | ||
10 | after 100 | 10 | after 100 |
11 | send -- "/usr/lib/firejail/fseccomp debug-syscalls\r" | 11 | send -- "fseccomp debug-syscalls\r" |
12 | expect { | 12 | expect { |
13 | timeout {puts "TESTING ERROR 1\n";exit} | 13 | timeout {puts "TESTING ERROR 1\n";exit} |
14 | "1 - write" | 14 | "1 - write" |
15 | } | 15 | } |
16 | 16 | ||
17 | after 100 | 17 | after 100 |
18 | send -- "/usr/lib/firejail/fseccomp debug-errnos\r" | 18 | send -- "fseccomp debug-errnos\r" |
19 | expect { | 19 | expect { |
20 | timeout {puts "TESTING ERROR 2\n";exit} | 20 | timeout {puts "TESTING ERROR 2\n";exit} |
21 | "1 - EPERM" | 21 | "1 - EPERM" |
22 | } | 22 | } |
23 | 23 | ||
24 | after 100 | 24 | after 100 |
25 | send -- "/usr/lib/firejail/fseccomp debug-protocols\r" | 25 | send -- "fseccomp debug-protocols\r" |
26 | expect { | 26 | expect { |
27 | timeout {puts "TESTING ERROR 3\n";exit} | 27 | timeout {puts "TESTING ERROR 3\n";exit} |
28 | "unix, inet, inet6, netlink, packet," | 28 | "unix, inet, inet6, netlink, packet," |
29 | } | 29 | } |
30 | 30 | ||
31 | after 100 | 31 | after 100 |
32 | send -- "/usr/lib/firejail/fseccomp protocol build unix,inet seccomp-test-file\r" | 32 | send -- "fseccomp protocol build unix,inet seccomp-test-file\r" |
33 | after 100 | 33 | after 100 |
34 | send -- "/usr/lib/firejail/fseccomp print seccomp-test-file\r" | 34 | send -- "fseccomp print seccomp-test-file\r" |
35 | expect { | 35 | expect { |
36 | timeout {puts "TESTING ERROR 4.1\n";exit} | 36 | timeout {puts "TESTING ERROR 4.1\n";exit} |
37 | "WHITELIST 41 socket" | 37 | "WHITELIST 41 socket" |
38 | } | 38 | } |
39 | 39 | ||
40 | after 100 | 40 | after 100 |
41 | send -- "/usr/lib/firejail/fseccomp secondary 64 seccomp-test-file\r" | 41 | send -- "fseccomp secondary 64 seccomp-test-file\r" |
42 | after 100 | 42 | after 100 |
43 | send -- "/usr/lib/firejail/fseccomp print seccomp-test-file\r" | 43 | send -- "fseccomp print seccomp-test-file\r" |
44 | expect { | 44 | expect { |
45 | timeout {puts "TESTING ERROR 5.1\n";exit} | 45 | timeout {puts "TESTING ERROR 5.1\n";exit} |
46 | "BLACKLIST 165 mount" | 46 | "BLACKLIST 165 mount" |
@@ -55,9 +55,9 @@ expect { | |||
55 | } | 55 | } |
56 | 56 | ||
57 | after 100 | 57 | after 100 |
58 | send -- "/usr/lib/firejail/fseccomp default seccomp-test-file\r" | 58 | send -- "fseccomp default seccomp-test-file\r" |
59 | after 100 | 59 | after 100 |
60 | send -- "/usr/lib/firejail/fseccomp print seccomp-test-file\r" | 60 | send -- "fseccomp print seccomp-test-file\r" |
61 | expect { | 61 | expect { |
62 | timeout {puts "TESTING ERROR 6.1\n";exit} | 62 | timeout {puts "TESTING ERROR 6.1\n";exit} |
63 | "BLACKLIST 165 mount" | 63 | "BLACKLIST 165 mount" |
@@ -72,9 +72,9 @@ expect { | |||
72 | } | 72 | } |
73 | 73 | ||
74 | after 100 | 74 | after 100 |
75 | send -- "/usr/lib/firejail/fseccomp drop seccomp-test-file chmod,chown\r" | 75 | send -- "fseccomp drop seccomp-test-file chmod,chown\r" |
76 | after 100 | 76 | after 100 |
77 | send -- "/usr/lib/firejail/fseccomp print seccomp-test-file\r" | 77 | send -- "fseccomp print seccomp-test-file\r" |
78 | expect { | 78 | expect { |
79 | timeout {puts "TESTING ERROR 7.1\n";exit} | 79 | timeout {puts "TESTING ERROR 7.1\n";exit} |
80 | "BLACKLIST 165 mount" {puts "TESTING ERROR 7.2\n";exit} | 80 | "BLACKLIST 165 mount" {puts "TESTING ERROR 7.2\n";exit} |
@@ -91,9 +91,9 @@ expect { | |||
91 | } | 91 | } |
92 | 92 | ||
93 | after 100 | 93 | after 100 |
94 | send -- "/usr/lib/firejail/fseccomp default drop seccomp-test-file chmod,chown\r" | 94 | send -- "fseccomp default drop seccomp-test-file chmod,chown\r" |
95 | after 100 | 95 | after 100 |
96 | send -- "/usr/lib/firejail/fseccomp print seccomp-test-file\r" | 96 | send -- "fseccomp print seccomp-test-file\r" |
97 | expect { | 97 | expect { |
98 | timeout {puts "TESTING ERROR 8.1\n";exit} | 98 | timeout {puts "TESTING ERROR 8.1\n";exit} |
99 | "BLACKLIST 165 mount" | 99 | "BLACKLIST 165 mount" |
@@ -115,9 +115,9 @@ expect { | |||
115 | "RETURN_ALLOW" | 115 | "RETURN_ALLOW" |
116 | } | 116 | } |
117 | after 100 | 117 | after 100 |
118 | send -- "/usr/lib/firejail/fseccomp keep seccomp-test-file chmod,chown\r" | 118 | send -- "fseccomp keep seccomp-test-file chmod,chown\r" |
119 | after 100 | 119 | after 100 |
120 | send -- "/usr/lib/firejail/fseccomp print seccomp-test-file\r" | 120 | send -- "fseccomp print seccomp-test-file\r" |
121 | expect { | 121 | expect { |
122 | timeout {puts "TESTING ERROR 9.1\n";exit} | 122 | timeout {puts "TESTING ERROR 9.1\n";exit} |
123 | "WHITELIST 90 chmod" | 123 | "WHITELIST 90 chmod" |
diff --git a/test/fs/mkdir_mkfile.exp b/test/fs/mkdir_mkfile.exp index 28a5ae459..1faa913e0 100755 --- a/test/fs/mkdir_mkfile.exp +++ b/test/fs/mkdir_mkfile.exp | |||
@@ -16,11 +16,7 @@ expect { | |||
16 | } | 16 | } |
17 | sleep 1 | 17 | sleep 1 |
18 | 18 | ||
19 | send -- "find ~\r" | 19 | send -- "find ~ | LC_ALL=C sort\r" |
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 1\n";exit} | ||
22 | "_firejail_test_file" | ||
23 | } | ||
24 | expect { | 20 | expect { |
25 | timeout {puts "TESTING ERROR 1\n";exit} | 21 | timeout {puts "TESTING ERROR 1\n";exit} |
26 | "_firejail_test_dir" | 22 | "_firejail_test_dir" |
@@ -41,6 +37,10 @@ expect { | |||
41 | timeout {puts "TESTING ERROR 1\n";exit} | 37 | timeout {puts "TESTING ERROR 1\n";exit} |
42 | "_firejail_test_dir/dir1/dir2/dir3/file1" | 38 | "_firejail_test_dir/dir1/dir2/dir3/file1" |
43 | } | 39 | } |
40 | expect { | ||
41 | timeout {puts "TESTING ERROR 1\n";exit} | ||
42 | "_firejail_test_file" | ||
43 | } | ||
44 | after 100 | 44 | after 100 |
45 | send -- "exit\r" | 45 | send -- "exit\r" |
46 | after 100 | 46 | after 100 |
diff --git a/test/fs/private-home-dir.exp b/test/fs/private-home-dir.exp index 77baeeb5f..9c97ff4ea 100755 --- a/test/fs/private-home-dir.exp +++ b/test/fs/private-home-dir.exp | |||
@@ -41,7 +41,11 @@ expect { | |||
41 | } | 41 | } |
42 | after 100 | 42 | after 100 |
43 | 43 | ||
44 | send -- "ls -al ~\r" | 44 | send -- "find ~ | LC_ALL=C sort\r" |
45 | expect { | ||
46 | timeout {puts "TESTING ERROR 4\n";exit} | ||
47 | ".Xauthority" | ||
48 | } | ||
45 | expect { | 49 | expect { |
46 | timeout {puts "TESTING ERROR 2\n";exit} | 50 | timeout {puts "TESTING ERROR 2\n";exit} |
47 | ".asoundrc" | 51 | ".asoundrc" |
@@ -50,10 +54,6 @@ expect { | |||
50 | timeout {puts "TESTING ERROR 3\n";exit} | 54 | timeout {puts "TESTING ERROR 3\n";exit} |
51 | ".bashrc" | 55 | ".bashrc" |
52 | } | 56 | } |
53 | expect { | ||
54 | timeout {puts "TESTING ERROR 4\n";exit} | ||
55 | ".Xauthority" | ||
56 | } | ||
57 | after 100 | 57 | after 100 |
58 | 58 | ||
59 | send -- "exit\r" | 59 | send -- "exit\r" |
diff --git a/test/fs/private.exp b/test/fs/private.exp index c7059079d..e522ca5a1 100755 --- a/test/fs/private.exp +++ b/test/fs/private.exp | |||
@@ -37,18 +37,18 @@ expect { | |||
37 | } | 37 | } |
38 | after 100 | 38 | after 100 |
39 | 39 | ||
40 | send -- "ls -al ~\r" | 40 | send -- "find ~ | LC_ALL=C sort\r" |
41 | expect { | 41 | expect { |
42 | timeout {puts "TESTING ERROR 2\n";exit} | 42 | timeout {puts "TESTING ERROR 2\n";exit} |
43 | ".asoundrc" | 43 | ".Xauthority" |
44 | } | 44 | } |
45 | expect { | 45 | expect { |
46 | timeout {puts "TESTING ERROR 3\n";exit} | 46 | timeout {puts "TESTING ERROR 3\n";exit} |
47 | ".bashrc" | 47 | ".asoundrc" |
48 | } | 48 | } |
49 | expect { | 49 | expect { |
50 | timeout {puts "TESTING ERROR 4\n";exit} | 50 | timeout {puts "TESTING ERROR 4\n";exit} |
51 | ".Xauthority" | 51 | ".bashrc" |
52 | } | 52 | } |
53 | after 100 | 53 | after 100 |
54 | 54 | ||
diff --git a/test/fs/whitelist-double.exp b/test/fs/whitelist-double.exp index dd2336ce1..ac6adc165 100755 --- a/test/fs/whitelist-double.exp +++ b/test/fs/whitelist-double.exp | |||
@@ -32,10 +32,10 @@ expect { | |||
32 | "123" | 32 | "123" |
33 | } | 33 | } |
34 | 34 | ||
35 | send -- "rm /tmp/firejal-deleteme\r" | 35 | send -- "rm -v /tmp/firejal-deleteme\r" |
36 | expect { | 36 | expect { |
37 | timeout {puts "TESTING ERROR 3\n";exit} | 37 | timeout {puts "TESTING ERROR 3\n";exit} |
38 | "0" | 38 | "removed" |
39 | } | 39 | } |
40 | after 100 | 40 | after 100 |
41 | 41 | ||
diff --git a/test/fs/whitelist-empty.exp b/test/fs/whitelist-empty.exp index e1c3ffb4a..9e4406263 100755 --- a/test/fs/whitelist-empty.exp +++ b/test/fs/whitelist-empty.exp | |||
@@ -14,36 +14,36 @@ expect { | |||
14 | } | 14 | } |
15 | sleep 1 | 15 | sleep 1 |
16 | 16 | ||
17 | send -- "ls -l ~/ | wc -l\r" | 17 | send -- "ls -l ~\r" |
18 | expect { | 18 | expect { |
19 | timeout {puts "TESTING ERROR 1\n";exit} | 19 | timeout {puts "TESTING ERROR 1\n";exit} |
20 | "0" | 20 | "0" |
21 | } | 21 | } |
22 | 22 | ||
23 | send -- "ls -l /tmp | wc -l\r" | 23 | send -- "ls -l /tmp\r" |
24 | expect { | 24 | expect { |
25 | timeout {puts "TESTING ERROR 2\n";exit} | 25 | timeout {puts "TESTING ERROR 2\n";exit} |
26 | "0" | 26 | "0" |
27 | } | 27 | } |
28 | 28 | ||
29 | send -- "ls -l /media | wc -l\r" | 29 | send -- "ls -l /media\r" |
30 | expect { | 30 | expect { |
31 | timeout {puts "TESTING ERROR 3\n";exit} | 31 | timeout {puts "TESTING ERROR 3\n";exit} |
32 | "0" | 32 | "0" |
33 | } | 33 | } |
34 | 34 | ||
35 | send -- "ls -l /var | wc -l\r" | 35 | send -- "ls -l /var\r" |
36 | expect { | 36 | expect { |
37 | timeout {puts "TESTING ERROR 4\n";exit} | 37 | timeout {puts "TESTING ERROR 4\n";exit} |
38 | "0" | 38 | "0" |
39 | } | 39 | } |
40 | 40 | ||
41 | send -- "ls -l /dev | wc -l\r" | 41 | send -- "ls -l /dev\r" |
42 | expect { | 42 | expect { |
43 | timeout {puts "TESTING ERROR 5\n";exit} | 43 | timeout {puts "TESTING ERROR 5\n";exit} |
44 | "0" | 44 | "0" |
45 | } | 45 | } |
46 | send -- "ls -l /opt | wc -l\r" | 46 | send -- "ls -l /opt\r" |
47 | expect { | 47 | expect { |
48 | timeout {puts "TESTING ERROR 6\n";exit} | 48 | timeout {puts "TESTING ERROR 6\n";exit} |
49 | "0" | 49 | "0" |
diff --git a/test/network/4bridges_arp.exp b/test/network/4bridges_arp.exp index 80760eb3a..e84ec719c 100755 --- a/test/network/4bridges_arp.exp +++ b/test/network/4bridges_arp.exp | |||
@@ -150,22 +150,26 @@ expect { | |||
150 | send -- "ip route show\r" | 150 | send -- "ip route show\r" |
151 | expect { | 151 | expect { |
152 | timeout {puts "TESTING ERROR 10.2\n";exit} | 152 | timeout {puts "TESTING ERROR 10.2\n";exit} |
153 | "10.10.20.0/29 dev eth0 proto kernel scope link" | 153 | "10.10.20.0/29 dev eth0 proto kernel scope link" {puts "old iproute2\n";} |
154 | "10.10.20.0/29 dev eth0 proto kernel scope link" {puts "new iproute2\n";} | ||
154 | } | 155 | } |
155 | send -- "ip route show\r" | 156 | send -- "ip route show\r" |
156 | expect { | 157 | expect { |
157 | timeout {puts "TESTING ERROR 10.2\n";exit} | 158 | timeout {puts "TESTING ERROR 10.2\n";exit} |
158 | "10.10.30.0/24 dev eth1 proto kernel scope link" | 159 | "10.10.30.0/24 dev eth1 proto kernel scope link" {puts "old iproute2\n";} |
160 | "10.10.30.0/24 dev eth1 proto kernel scope link" {puts "new iproute2\n";} | ||
159 | } | 161 | } |
160 | send -- "ip route show\r" | 162 | send -- "ip route show\r" |
161 | expect { | 163 | expect { |
162 | timeout {puts "TESTING ERROR 10.2\n";exit} | 164 | timeout {puts "TESTING ERROR 10.2\n";exit} |
163 | "10.10.40.0/24 dev eth2 proto kernel scope link" | 165 | "10.10.40.0/24 dev eth2 proto kernel scope link" {puts "old iproute2\n";} |
166 | "10.10.40.0/24 dev eth2 proto kernel scope link" {puts "new iproute2\n";} | ||
164 | } | 167 | } |
165 | send -- "ip route show\r" | 168 | send -- "ip route show\r" |
166 | expect { | 169 | expect { |
167 | timeout {puts "TESTING ERROR 10.2\n";exit} | 170 | timeout {puts "TESTING ERROR 10.2\n";exit} |
168 | "10.10.50.0/24 dev eth3 proto kernel scope link" | 171 | "10.10.50.0/24 dev eth3 proto kernel scope link" {puts "old iproute2\n";} |
172 | "10.10.50.0/24 dev eth3 proto kernel scope link" {puts "new iproute2\n";} | ||
169 | } | 173 | } |
170 | send -- "exit\r" | 174 | send -- "exit\r" |
171 | after 100 | 175 | after 100 |
diff --git a/test/network/4bridges_ip.exp b/test/network/4bridges_ip.exp index 5e136926b..74a1e5d68 100755 --- a/test/network/4bridges_ip.exp +++ b/test/network/4bridges_ip.exp | |||
@@ -150,25 +150,29 @@ expect { | |||
150 | send -- "ip route show\r" | 150 | send -- "ip route show\r" |
151 | expect { | 151 | expect { |
152 | timeout {puts "TESTING ERROR 10.2\n";exit} | 152 | timeout {puts "TESTING ERROR 10.2\n";exit} |
153 | "10.10.20.0/29 dev eth0 proto kernel scope link" | 153 | "10.10.20.0/29 dev eth0 proto kernel scope link" {puts "old iproute2\n";} |
154 | "10.10.20.0/29 dev eth0 proto kernel scope link" {puts "new iproute2\n";} | ||
154 | } | 155 | } |
155 | 156 | ||
156 | send -- "ip route show\r" | 157 | send -- "ip route show\r" |
157 | expect { | 158 | expect { |
158 | timeout {puts "TESTING ERROR 10.3\n";exit} | 159 | timeout {puts "TESTING ERROR 10.3\n";exit} |
159 | "10.10.30.0/24 dev eth1 proto kernel scope link src 10.10.30.50" | 160 | "10.10.30.0/24 dev eth1 proto kernel scope link src 10.10.30.50" {puts "old iproute2\n";} |
161 | "10.10.30.0/24 dev eth1 proto kernel scope link src 10.10.30.50" {puts "new iproute2\n";} | ||
160 | } | 162 | } |
161 | 163 | ||
162 | send -- "ip route show\r" | 164 | send -- "ip route show\r" |
163 | expect { | 165 | expect { |
164 | timeout {puts "TESTING ERROR 10.4\n";exit} | 166 | timeout {puts "TESTING ERROR 10.4\n";exit} |
165 | "10.10.40.0/24 dev eth2 proto kernel scope link src 10.10.40.100" | 167 | "10.10.40.0/24 dev eth2 proto kernel scope link src 10.10.40.100" {puts "old iproute2\n";} |
168 | "10.10.40.0/24 dev eth2 proto kernel scope link src 10.10.40.100" {puts "new iproute2\n";} | ||
166 | } | 169 | } |
167 | 170 | ||
168 | send -- "ip route show\r" | 171 | send -- "ip route show\r" |
169 | expect { | 172 | expect { |
170 | timeout {puts "TESTING ERROR 10.5\n";exit} | 173 | timeout {puts "TESTING ERROR 10.5\n";exit} |
171 | "10.10.50.0/24 dev eth3 proto kernel scope link" | 174 | "10.10.50.0/24 dev eth3 proto kernel scope link" {puts "old iproute2\n";} |
175 | "10.10.50.0/24 dev eth3 proto kernel scope link" {puts "new iproute2\n";} | ||
172 | } | 176 | } |
173 | 177 | ||
174 | send -- "exit\r" | 178 | send -- "exit\r" |
diff --git a/test/network/interface.exp b/test/network/interface.exp index bd8777c33..638e6d32b 100755 --- a/test/network/interface.exp +++ b/test/network/interface.exp | |||
@@ -27,8 +27,9 @@ expect { | |||
27 | "eth0.5" | 27 | "eth0.5" |
28 | } | 28 | } |
29 | expect { | 29 | expect { |
30 | timeout {puts "TESTING ERROR 2n";exit} | 30 | timeout {puts "TESTING ERROR 2\n";exit} |
31 | "Link" | 31 | "Link" {puts "old net-tools\n";} |
32 | "flags" {puts "new net-tools\n";} | ||
32 | } | 33 | } |
33 | expect { | 34 | expect { |
34 | timeout {puts "TESTING ERROR 3\n";exit} | 35 | timeout {puts "TESTING ERROR 3\n";exit} |
@@ -47,7 +48,8 @@ expect { | |||
47 | } | 48 | } |
48 | expect { | 49 | expect { |
49 | timeout {puts "TESTING ERROR 6\n";exit} | 50 | timeout {puts "TESTING ERROR 6\n";exit} |
50 | "Link" | 51 | "Link" {puts "old net-tools\n";} |
52 | "flags" {puts "new net-tools\n";} | ||
51 | } | 53 | } |
52 | expect { | 54 | expect { |
53 | timeout {puts "TESTING ERROR 7\n";exit} | 55 | timeout {puts "TESTING ERROR 7\n";exit} |
diff --git a/test/network/net_defaultgw.exp b/test/network/net_defaultgw.exp index c7178616a..763eee38e 100755 --- a/test/network/net_defaultgw.exp +++ b/test/network/net_defaultgw.exp | |||
@@ -41,7 +41,8 @@ expect { | |||
41 | send -- "ip route show\r" | 41 | send -- "ip route show\r" |
42 | expect { | 42 | expect { |
43 | timeout {puts "TESTING ERROR 10.2\n";exit} | 43 | timeout {puts "TESTING ERROR 10.2\n";exit} |
44 | "10.10.20.0/29 dev eth0 proto kernel scope link" | 44 | "10.10.20.0/29 dev eth0 proto kernel scope link" {puts "old iproute2\n";} |
45 | "10.10.20.0/29 dev eth0 proto kernel scope link" {puts "new iproute2\n";} | ||
45 | } | 46 | } |
46 | send -- "exit\r" | 47 | send -- "exit\r" |
47 | after 100 | 48 | after 100 |
diff --git a/test/network/net_defaultgw2.exp b/test/network/net_defaultgw2.exp index 088dfeee8..e7483c921 100755 --- a/test/network/net_defaultgw2.exp +++ b/test/network/net_defaultgw2.exp | |||
@@ -29,13 +29,15 @@ expect { | |||
29 | send -- "ip route show\r" | 29 | send -- "ip route show\r" |
30 | expect { | 30 | expect { |
31 | timeout {puts "TESTING ERROR 10.2\n";exit} | 31 | timeout {puts "TESTING ERROR 10.2\n";exit} |
32 | "10.10.20.0/29 dev eth0 proto kernel scope link" | 32 | "10.10.20.0/29 dev eth0 proto kernel scope link" {puts "old iproute2\n";} |
33 | "10.10.20.0/29 dev eth0 proto kernel scope link" {puts "new iproute2\n";} | ||
33 | } | 34 | } |
34 | 35 | ||
35 | send -- "ip route show\r" | 36 | send -- "ip route show\r" |
36 | expect { | 37 | expect { |
37 | timeout {puts "TESTING ERROR 10.3\n";exit} | 38 | timeout {puts "TESTING ERROR 10.3\n";exit} |
38 | "10.10.30.0/24 dev eth1 proto kernel scope link" | 39 | "10.10.30.0/24 dev eth1 proto kernel scope link" {puts "old iproute2\n";} |
40 | "10.10.30.0/24 dev eth1 proto kernel scope link" {puts "new iproute2\n";} | ||
39 | } | 41 | } |
40 | send -- "exit\r" | 42 | send -- "exit\r" |
41 | after 100 | 43 | after 100 |
diff --git a/test/network/net_ip.exp b/test/network/net_ip.exp index c6b84781c..8ec676dd1 100755 --- a/test/network/net_ip.exp +++ b/test/network/net_ip.exp | |||
@@ -67,7 +67,8 @@ expect { | |||
67 | send -- "ip route show\r" | 67 | send -- "ip route show\r" |
68 | expect { | 68 | expect { |
69 | timeout {puts "TESTING ERROR 10\n";exit} | 69 | timeout {puts "TESTING ERROR 10\n";exit} |
70 | "10.10.20.0/29 dev eth0 proto kernel scope link" | 70 | "10.10.20.0/29 dev eth0 proto kernel scope link" {puts "old iproute2\n";} |
71 | "10.10.20.0/29 dev eth0 proto kernel scope link" {puts "new iproute2\n";} | ||
71 | } | 72 | } |
72 | send -- "exit\r" | 73 | send -- "exit\r" |
73 | after 100 | 74 | after 100 |
diff --git a/test/network/net_profile.exp b/test/network/net_profile.exp index febbcfcd7..b3bc9b441 100755 --- a/test/network/net_profile.exp +++ b/test/network/net_profile.exp | |||
@@ -38,13 +38,15 @@ sleep 1 | |||
38 | send -- "ip route show\r" | 38 | send -- "ip route show\r" |
39 | expect { | 39 | expect { |
40 | timeout {puts "TESTING ERROR 1\n";exit} | 40 | timeout {puts "TESTING ERROR 1\n";exit} |
41 | "10.10.30.0/24 dev eth1 proto kernel scope link src 10.10.30.50" | 41 | "10.10.30.0/24 dev eth1 proto kernel scope link src 10.10.30.50" {puts "old iproute2\n";} |
42 | "10.10.30.0/24 dev eth1 proto kernel scope link src 10.10.30.50" {puts "new iproute2\n";} | ||
42 | } | 43 | } |
43 | 44 | ||
44 | send -- "ip route show\r" | 45 | send -- "ip route show\r" |
45 | expect { | 46 | expect { |
46 | timeout {puts "TESTING ERROR 2\n";exit} | 47 | timeout {puts "TESTING ERROR 2\n";exit} |
47 | "10.10.40.0/24 dev eth2 proto kernel scope link src 10.10.40.100" | 48 | "10.10.40.0/24 dev eth2 proto kernel scope link src 10.10.40.100" {puts "old iproute2\n";} |
49 | "10.10.40.0/24 dev eth2 proto kernel scope link src 10.10.40.100" {puts "new iproute2\n";} | ||
48 | } | 50 | } |
49 | 51 | ||
50 | 52 | ||
diff --git a/test/utils/audit.exp b/test/utils/audit.exp index 566493947..f0c1906a0 100755 --- a/test/utils/audit.exp +++ b/test/utils/audit.exp | |||
@@ -35,7 +35,7 @@ expect { | |||
35 | after 100 | 35 | after 100 |
36 | 36 | ||
37 | 37 | ||
38 | send -- "firejail --audit=/usr/lib/firejail/faudit\r" | 38 | send -- "firejail --audit\r" |
39 | expect { | 39 | expect { |
40 | timeout {puts "TESTING ERROR 6\n";exit} | 40 | timeout {puts "TESTING ERROR 6\n";exit} |
41 | "Firejail Audit" | 41 | "Firejail Audit" |