diff options
Diffstat (limited to 'test/arguments')
-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 |
4 files changed, 25 insertions, 18 deletions
diff --git a/test/arguments/arguments.sh b/test/arguments/arguments.sh index 3864b65d8..d9b7058bf 100755 --- a/test/arguments/arguments.sh +++ b/test/arguments/arguments.sh | |||
@@ -1,5 +1,12 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
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 | ||
9 | |||
3 | echo "TESTING: 1. regular bash session" | 10 | echo "TESTING: 1. regular bash session" |
4 | ./bashrun.exp | 11 | ./bashrun.exp |
5 | sleep 1 | 12 | sleep 1 |
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' |