aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2019-10-31 15:49:41 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2019-10-31 15:49:41 -0400
commit0e723a8391caac5fec655747a58ba837abe3f4ce (patch)
tree4d34087d444155ca384a588ef7eb55af853780f7 /test
parenttesting (diff)
downloadfirejail-0e723a8391caac5fec655747a58ba837abe3f4ce.tar.gz
firejail-0e723a8391caac5fec655747a58ba837abe3f4ce.tar.zst
firejail-0e723a8391caac5fec655747a58ba837abe3f4ce.zip
testing
Diffstat (limited to 'test')
-rwxr-xr-xtest/apps/transmission-qt.exp6
-rwxr-xr-xtest/private-lib/transmission-gtk.exp6
-rwxr-xr-xtest/utils/build.exp38
-rwxr-xr-xtest/utils/utils.sh1
4 files changed, 34 insertions, 17 deletions
diff --git a/test/apps/transmission-qt.exp b/test/apps/transmission-qt.exp
index 4ef9ec8b5..0fe70f659 100755
--- a/test/apps/transmission-qt.exp
+++ b/test/apps/transmission-qt.exp
@@ -7,7 +7,7 @@ set timeout 10
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10send -- "firejail transmission-qt\r" 10send -- "firejail --ignore=quiet transmission-qt\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Reading profile /etc/firejail/transmission-qt.profile" 13 "Reading profile /etc/firejail/transmission-qt.profile"
@@ -50,7 +50,7 @@ send -- "firemon --seccomp\r"
50expect { 50expect {
51 timeout {puts "TESTING ERROR 5\n";exit} 51 timeout {puts "TESTING ERROR 5\n";exit}
52 "need to be root" {puts "/proc mounted as hidepid, exiting...\n"; exit} 52 "need to be root" {puts "/proc mounted as hidepid, exiting...\n"; exit}
53 ":firejail transmission-qt" 53 ":firejail --ignore=quiet transmission-qt"
54} 54}
55expect { 55expect {
56 timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} 56 timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit}
@@ -64,7 +64,7 @@ after 100
64send -- "firemon --caps\r" 64send -- "firemon --caps\r"
65expect { 65expect {
66 timeout {puts "TESTING ERROR 6\n";exit} 66 timeout {puts "TESTING ERROR 6\n";exit}
67 ":firejail transmission-qt" 67 ":firejail --ignore=quiet transmission-qt"
68} 68}
69expect { 69expect {
70 timeout {puts "TESTING ERROR 6.1\n";exit} 70 timeout {puts "TESTING ERROR 6.1\n";exit}
diff --git a/test/private-lib/transmission-gtk.exp b/test/private-lib/transmission-gtk.exp
index b288b8504..394e2a58e 100755
--- a/test/private-lib/transmission-gtk.exp
+++ b/test/private-lib/transmission-gtk.exp
@@ -7,7 +7,7 @@ set timeout 10
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10send -- "firejail transmission-gtk\r" 10send -- "firejail --ignore=quiet transmission-gtk\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Reading profile /etc/firejail/transmission-gtk.profile" 13 "Reading profile /etc/firejail/transmission-gtk.profile"
@@ -50,7 +50,7 @@ send -- "firemon --seccomp\r"
50expect { 50expect {
51 timeout {puts "TESTING ERROR 5\n";exit} 51 timeout {puts "TESTING ERROR 5\n";exit}
52 "need to be root" {puts "/proc mounted as hidepid, exiting...\n"; exit} 52 "need to be root" {puts "/proc mounted as hidepid, exiting...\n"; exit}
53 ":firejail transmission-gtk" 53 ":firejail --ignore=quiet transmission-gtk"
54} 54}
55expect { 55expect {
56 timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} 56 timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit}
@@ -64,7 +64,7 @@ after 100
64send -- "firemon --caps\r" 64send -- "firemon --caps\r"
65expect { 65expect {
66 timeout {puts "TESTING ERROR 6\n";exit} 66 timeout {puts "TESTING ERROR 6\n";exit}
67 ":firejail transmission-gtk" 67 ":firejail --ignore=quiet transmission-gtk"
68} 68}
69expect { 69expect {
70 timeout {puts "TESTING ERROR 6.1\n";exit} 70 timeout {puts "TESTING ERROR 6.1\n";exit}
diff --git a/test/utils/build.exp b/test/utils/build.exp
index e8dd2bbbc..44b73179c 100755
--- a/test/utils/build.exp
+++ b/test/utils/build.exp
@@ -61,24 +61,40 @@ expect {
61} 61}
62after 100 62after 100
63 63
64send -- "firejail --build cat /var/tmp/firejail-test-file-7699\r" 64send -- "rm firejail-test-file-4388\r"
65expect {
66 timeout {puts "TESTING ERROR 11\n";exit}
67 "whitelist /var/tmp/firejail-test-file-7699"
68}
69after 100 65after 100
70 66send -- "firejail --build=firejail-test-file-4388 cat /etc/passwd\r"
71send -- "firejail --build man firejail\r" 67after 100
68send -- "cat firejail-test-file-4388\r"
72expect { 69expect {
73 timeout {puts "TESTING ERROR 12\n";exit} 70 timeout {puts "TESTING ERROR 10.1\n";exit}
74 "whitelist /usr/share/man" 71 "private-etc passwd,"
75} 72}
76after 100 73after 100
77 74
78send -- "firejail --build wget blablabla\r" 75
76#send -- "firejail --build cat /var/tmp/firejail-test-file-7699\r"
77#expect {
78# timeout {puts "TESTING ERROR 11\n";exit}
79# "whitelist /var/tmp/firejail-test-file-7699"
80#}
81#after 100
82
83#send -- "firejail --build man firejail\r"
84#expect {
85# timeout {puts "TESTING ERROR 12\n";exit}
86# "whitelist /usr/share/man"
87#}
88#after 100
89
90send -- "firejail --build wget --output-document=~ debian.org\r"
79expect { 91expect {
80 timeout {puts "TESTING ERROR 13\n";exit} 92 timeout {puts "TESTING ERROR 13\n";exit}
81 "protocol inet" 93 "protocol"
94}
95expect {
96 timeout {puts "TESTING ERROR 13.1\n";exit}
97 "inet"
82} 98}
83after 100 99after 100
84 100
diff --git a/test/utils/utils.sh b/test/utils/utils.sh
index 7ebd5a1d5..b5b90a22d 100755
--- a/test/utils/utils.sh
+++ b/test/utils/utils.sh
@@ -21,6 +21,7 @@ echo "TESTING: build (test/utils/build.exp)"
21rm -f ~/firejail-test-file-7699 21rm -f ~/firejail-test-file-7699
22rm -f /tmp/firejail-test-file-7699 22rm -f /tmp/firejail-test-file-7699
23rm -f /var/tmp/firejail-test-file-7699 23rm -f /var/tmp/firejail-test-file-7699
24rm -f firejail-test-file-4388
24 25
25if [ $(readlink /proc/self) -lt 100 ]; then 26if [ $(readlink /proc/self) -lt 100 ]; then
26 echo "TESTING SKIP: already running in pid namespace (test/utils/audit.exp)" 27 echo "TESTING SKIP: already running in pid namespace (test/utils/audit.exp)"