aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLibravatar startx2017 <vradu.startx@yandex.com>2018-09-27 08:43:21 -0400
committerLibravatar startx2017 <vradu.startx@yandex.com>2018-09-27 08:43:21 -0400
commitd0dc2196dff8ef1ea1b02c9b236f52e2dfbb89fa (patch)
tree6c10d1b87f32bde69324c14f1315a2131da6922f /test
parentfixed test-arguments (diff)
downloadfirejail-d0dc2196dff8ef1ea1b02c9b236f52e2dfbb89fa.tar.gz
firejail-d0dc2196dff8ef1ea1b02c9b236f52e2dfbb89fa.tar.zst
firejail-d0dc2196dff8ef1ea1b02c9b236f52e2dfbb89fa.zip
fixed test-arguments
Diffstat (limited to 'test')
-rwxr-xr-xtest/arguments/bashrun.exp24
-rwxr-xr-xtest/arguments/bashrun.sh12
-rwxr-xr-xtest/arguments/joinrun.exp26
-rwxr-xr-xtest/arguments/symrun.exp20
4 files changed, 76 insertions, 6 deletions
diff --git a/test/arguments/bashrun.exp b/test/arguments/bashrun.exp
index a3c9e382d..de9b4d7e3 100755
--- a/test/arguments/bashrun.exp
+++ b/test/arguments/bashrun.exp
@@ -6,6 +6,10 @@ match_max 100000
6 6
7send -- "./bashrun.sh\r" 7send -- "./bashrun.sh\r"
8expect { 8expect {
9 timeout {puts "TESTING ERROR 1.1.0\n";exit}
10 "Child process initialized"
11}
12expect {
9 timeout {puts "TESTING ERROR 1.1.1\n";exit} 13 timeout {puts "TESTING ERROR 1.1.1\n";exit}
10 "Arguments:" 14 "Arguments:"
11} 15}
@@ -19,6 +23,10 @@ expect {
19} 23}
20 24
21expect { 25expect {
26 timeout {puts "TESTING ERROR 1.2.0\n";exit}
27 "Child process initialized"
28}
29expect {
22 timeout {puts "TESTING ERROR 1.2.1\n";exit} 30 timeout {puts "TESTING ERROR 1.2.1\n";exit}
23 "Arguments:" 31 "Arguments:"
24} 32}
@@ -32,6 +40,10 @@ expect {
32} 40}
33 41
34expect { 42expect {
43 timeout {puts "TESTING ERROR 1.3.0\n";exit}
44 "Child process initialized"
45}
46expect {
35 timeout {puts "TESTING ERROR 1.3.1\n";exit} 47 timeout {puts "TESTING ERROR 1.3.1\n";exit}
36 "Arguments:" 48 "Arguments:"
37} 49}
@@ -45,6 +57,10 @@ expect {
45} 57}
46 58
47expect { 59expect {
60 timeout {puts "TESTING ERROR 1.4.0\n";exit}
61 "Child process initialized"
62}
63expect {
48 timeout {puts "TESTING ERROR 1.4.1\n";exit} 64 timeout {puts "TESTING ERROR 1.4.1\n";exit}
49 "Arguments:" 65 "Arguments:"
50} 66}
@@ -58,6 +74,10 @@ expect {
58} 74}
59 75
60expect { 76expect {
77 timeout {puts "TESTING ERROR 1.5.0\n";exit}
78 "Child process initialized"
79}
80expect {
61 timeout {puts "TESTING ERROR 1.5.1\n";exit} 81 timeout {puts "TESTING ERROR 1.5.1\n";exit}
62 "Arguments:" 82 "Arguments:"
63} 83}
@@ -71,6 +91,10 @@ expect {
71} 91}
72 92
73expect { 93expect {
94 timeout {puts "TESTING ERROR 1.6.0\n";exit}
95 "Child process initialized"
96}
97expect {
74 timeout {puts "TESTING ERROR 1.6.1\n";exit} 98 timeout {puts "TESTING ERROR 1.6.1\n";exit}
75 "Arguments:" 99 "Arguments:"
76} 100}
diff --git a/test/arguments/bashrun.sh b/test/arguments/bashrun.sh
index 8128ae37d..51a904e92 100755
--- a/test/arguments/bashrun.sh
+++ b/test/arguments/bashrun.sh
@@ -1,22 +1,22 @@
1#!/bin/bash 1#!/bin/bash
2 2
3echo "TESTING: 1.1 - simple args" 3echo "TESTING: 1.1 - simple args"
4firejail --quiet ./args arg1 arg2 4firejail ./args arg1 arg2
5 5
6# simple quotes, testing spaces in file names 6# simple quotes, testing spaces in file names
7echo "TESTING: 1.2 - args with space and \"" 7echo "TESTING: 1.2 - args with space and \""
8firejail --quiet ./args "arg1 tail" "arg2 tail" 8firejail ./args "arg1 tail" "arg2 tail"
9 9
10echo "TESTING: 1.3 - args with space and '" 10echo "TESTING: 1.3 - args with space and '"
11firejail --quiet ./args 'arg1 tail' 'arg2 tail' 11firejail ./args 'arg1 tail' 'arg2 tail'
12 12
13# escaped space in file names 13# escaped space in file names
14echo "TESTING: 1.4 - args with space and \\" 14echo "TESTING: 1.4 - args with space and \\"
15firejail --quiet ./args arg1\ tail arg2\ tail 15firejail ./args arg1\ tail arg2\ tail
16 16
17# & char appears in URLs - URLs should be quoted 17# & char appears in URLs - URLs should be quoted
18echo "TESTING: 1.5 - args with & and \"" 18echo "TESTING: 1.5 - args with & and \""
19firejail --quiet ./args "arg1&tail" "arg2&tail" 19firejail ./args "arg1&tail" "arg2&tail"
20 20
21echo "TESTING: 1.6 - args with & and '" 21echo "TESTING: 1.6 - args with & and '"
22firejail --quiet ./args 'arg1&tail' 'arg2&tail' 22firejail ./args 'arg1&tail' 'arg2&tail'
diff --git a/test/arguments/joinrun.exp b/test/arguments/joinrun.exp
index 97972e5e8..e99cb20c6 100755
--- a/test/arguments/joinrun.exp
+++ b/test/arguments/joinrun.exp
@@ -11,6 +11,10 @@ sleep 2
11spawn $env(SHELL) 11spawn $env(SHELL)
12send -- "./joinrun.sh\r" 12send -- "./joinrun.sh\r"
13expect { 13expect {
14 timeout {puts "TESTING ERROR 3.1.0\n";exit}
15 "Child process initialized"
16}
17expect {
14 timeout {puts "TESTING ERROR 3.1.1\n";exit} 18 timeout {puts "TESTING ERROR 3.1.1\n";exit}
15 "Arguments:" 19 "Arguments:"
16} 20}
@@ -24,6 +28,10 @@ expect {
24} 28}
25 29
26expect { 30expect {
31 timeout {puts "TESTING ERROR 3.2.0\n";exit}
32 "Child process initialized"
33}
34expect {
27 timeout {puts "TESTING ERROR 3.2.1\n";exit} 35 timeout {puts "TESTING ERROR 3.2.1\n";exit}
28 "Arguments:" 36 "Arguments:"
29} 37}
@@ -35,6 +43,11 @@ expect {
35 timeout {puts "TESTING ERROR 3.2.3\n";exit} 43 timeout {puts "TESTING ERROR 3.2.3\n";exit}
36 "#arg2 tail#" 44 "#arg2 tail#"
37} 45}
46
47expect {
48 timeout {puts "TESTING ERROR 3.3.0\n";exit}
49 "Child process initialized"
50}
38expect { 51expect {
39 timeout {puts "TESTING ERROR 3.3.1\n";exit} 52 timeout {puts "TESTING ERROR 3.3.1\n";exit}
40 "Arguments:" 53 "Arguments:"
@@ -47,6 +60,11 @@ expect {
47 timeout {puts "TESTING ERROR 3.3.3\n";exit} 60 timeout {puts "TESTING ERROR 3.3.3\n";exit}
48 "#arg2 tail#" 61 "#arg2 tail#"
49} 62}
63
64expect {
65 timeout {puts "TESTING ERROR 3.4.0\n";exit}
66 "Child process initialized"
67}
50expect { 68expect {
51 timeout {puts "TESTING ERROR 3.4.1\n";exit} 69 timeout {puts "TESTING ERROR 3.4.1\n";exit}
52 "Arguments:" 70 "Arguments:"
@@ -61,6 +79,10 @@ expect {
61} 79}
62 80
63expect { 81expect {
82 timeout {puts "TESTING ERROR 3.5.0\n";exit}
83 "Child process initialized"
84}
85expect {
64 timeout {puts "TESTING ERROR 3.5.1\n";exit} 86 timeout {puts "TESTING ERROR 3.5.1\n";exit}
65 "Arguments:" 87 "Arguments:"
66} 88}
@@ -74,6 +96,10 @@ expect {
74} 96}
75 97
76expect { 98expect {
99 timeout {puts "TESTING ERROR 3.6.0\n";exit}
100 "Child process initialized"
101}
102expect {
77 timeout {puts "TESTING ERROR 3.6.1\n";exit} 103 timeout {puts "TESTING ERROR 3.6.1\n";exit}
78 "Arguments:" 104 "Arguments:"
79} 105}
diff --git a/test/arguments/symrun.exp b/test/arguments/symrun.exp
index 10e7ac6c8..f9095bd3c 100755
--- a/test/arguments/symrun.exp
+++ b/test/arguments/symrun.exp
@@ -6,6 +6,10 @@ match_max 100000
6 6
7send -- "./symrun.sh\r" 7send -- "./symrun.sh\r"
8expect { 8expect {
9 timeout {puts "TESTING ERROR 2.1.0\n";exit}
10 "Child process initialized"
11}
12expect {
9 timeout {puts "TESTING ERROR 2.1.1\n";exit} 13 timeout {puts "TESTING ERROR 2.1.1\n";exit}
10 "Arguments:" 14 "Arguments:"
11} 15}
@@ -19,6 +23,10 @@ expect {
19} 23}
20 24
21expect { 25expect {
26 timeout {puts "TESTING ERROR 2.3.0\n";exit}
27 "Child process initialized"
28}
29expect {
22 timeout {puts "TESTING ERROR 2.3.1\n";exit} 30 timeout {puts "TESTING ERROR 2.3.1\n";exit}
23 "Arguments:" 31 "Arguments:"
24} 32}
@@ -32,6 +40,10 @@ expect {
32} 40}
33 41
34expect { 42expect {
43 timeout {puts "TESTING ERROR 2.4.0\n";exit}
44 "Child process initialized"
45}
46expect {
35 timeout {puts "TESTING ERROR 2.4.1\n";exit} 47 timeout {puts "TESTING ERROR 2.4.1\n";exit}
36 "Arguments:" 48 "Arguments:"
37} 49}
@@ -45,6 +57,10 @@ expect {
45} 57}
46 58
47expect { 59expect {
60 timeout {puts "TESTING ERROR 2.5.0\n";exit}
61 "Child process initialized"
62}
63expect {
48 timeout {puts "TESTING ERROR 2.5.1\n";exit} 64 timeout {puts "TESTING ERROR 2.5.1\n";exit}
49 "Arguments:" 65 "Arguments:"
50} 66}
@@ -58,6 +74,10 @@ expect {
58} 74}
59 75
60expect { 76expect {
77 timeout {puts "TESTING ERROR 2.6.0\n";exit}
78 "Child process initialized"
79}
80expect {
61 timeout {puts "TESTING ERROR 2.6.1\n";exit} 81 timeout {puts "TESTING ERROR 2.6.1\n";exit}
62 "Arguments:" 82 "Arguments:"
63} 83}