diff options
author | netblue30 <netblue30@yahoo.com> | 2019-10-31 15:49:41 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2019-10-31 15:49:41 -0400 |
commit | 0e723a8391caac5fec655747a58ba837abe3f4ce (patch) | |
tree | 4d34087d444155ca384a588ef7eb55af853780f7 | |
parent | testing (diff) | |
download | firejail-0e723a8391caac5fec655747a58ba837abe3f4ce.tar.gz firejail-0e723a8391caac5fec655747a58ba837abe3f4ce.tar.zst firejail-0e723a8391caac5fec655747a58ba837abe3f4ce.zip |
testing
-rw-r--r-- | Makefile.in | 3 | ||||
-rwxr-xr-x | test/apps/transmission-qt.exp | 6 | ||||
-rwxr-xr-x | test/private-lib/transmission-gtk.exp | 6 | ||||
-rwxr-xr-x | test/utils/build.exp | 38 | ||||
-rwxr-xr-x | test/utils/utils.sh | 1 |
5 files changed, 37 insertions, 17 deletions
diff --git a/Makefile.in b/Makefile.in index 44137c0bc..e065741f5 100644 --- a/Makefile.in +++ b/Makefile.in | |||
@@ -285,6 +285,9 @@ test-fnetfilter: | |||
285 | test: test-profiles test-private-lib test-fcopy test-fnetfilter test-fs test-utils test-sysutils test-environment test-apps test-apps-x11 test-apps-x11-xorg test-filters test-arguments | 285 | test: test-profiles test-private-lib test-fcopy test-fnetfilter test-fs test-utils test-sysutils test-environment test-apps test-apps-x11 test-apps-x11-xorg test-filters test-arguments |
286 | echo "TEST COMPLETE" | 286 | echo "TEST COMPLETE" |
287 | 287 | ||
288 | test-noprofiles: test-private-lib test-fcopy test-fnetfilter test-fs test-utils test-sysutils test-environment test-apps test-apps-x11 test-apps-x11-xorg test-filters test-arguments | ||
289 | echo "TEST COMPLETE" | ||
290 | |||
288 | test-travis: test-profiles test-fcopy test-fnetfilter test-fs test-utils test-sysutils test-environment test-filters test-arguments | 291 | test-travis: test-profiles test-fcopy test-fnetfilter test-fs test-utils test-sysutils test-environment test-filters test-arguments |
289 | echo "TEST COMPLETE" | 292 | echo "TEST COMPLETE" |
290 | 293 | ||
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 | |||
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | 9 | ||
10 | send -- "firejail transmission-qt\r" | 10 | send -- "firejail --ignore=quiet transmission-qt\r" |
11 | expect { | 11 | expect { |
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" | |||
50 | expect { | 50 | expect { |
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 | } |
55 | expect { | 55 | expect { |
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 | |||
64 | send -- "firemon --caps\r" | 64 | send -- "firemon --caps\r" |
65 | expect { | 65 | expect { |
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 | } |
69 | expect { | 69 | expect { |
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 | |||
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | 9 | ||
10 | send -- "firejail transmission-gtk\r" | 10 | send -- "firejail --ignore=quiet transmission-gtk\r" |
11 | expect { | 11 | expect { |
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" | |||
50 | expect { | 50 | expect { |
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 | } |
55 | expect { | 55 | expect { |
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 | |||
64 | send -- "firemon --caps\r" | 64 | send -- "firemon --caps\r" |
65 | expect { | 65 | expect { |
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 | } |
69 | expect { | 69 | expect { |
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 | } |
62 | after 100 | 62 | after 100 |
63 | 63 | ||
64 | send -- "firejail --build cat /var/tmp/firejail-test-file-7699\r" | 64 | send -- "rm firejail-test-file-4388\r" |
65 | expect { | ||
66 | timeout {puts "TESTING ERROR 11\n";exit} | ||
67 | "whitelist /var/tmp/firejail-test-file-7699" | ||
68 | } | ||
69 | after 100 | 65 | after 100 |
70 | 66 | send -- "firejail --build=firejail-test-file-4388 cat /etc/passwd\r" | |
71 | send -- "firejail --build man firejail\r" | 67 | after 100 |
68 | send -- "cat firejail-test-file-4388\r" | ||
72 | expect { | 69 | expect { |
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 | } |
76 | after 100 | 73 | after 100 |
77 | 74 | ||
78 | send -- "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 | |||
90 | send -- "firejail --build wget --output-document=~ debian.org\r" | ||
79 | expect { | 91 | expect { |
80 | timeout {puts "TESTING ERROR 13\n";exit} | 92 | timeout {puts "TESTING ERROR 13\n";exit} |
81 | "protocol inet" | 93 | "protocol" |
94 | } | ||
95 | expect { | ||
96 | timeout {puts "TESTING ERROR 13.1\n";exit} | ||
97 | "inet" | ||
82 | } | 98 | } |
83 | after 100 | 99 | after 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)" | |||
21 | rm -f ~/firejail-test-file-7699 | 21 | rm -f ~/firejail-test-file-7699 |
22 | rm -f /tmp/firejail-test-file-7699 | 22 | rm -f /tmp/firejail-test-file-7699 |
23 | rm -f /var/tmp/firejail-test-file-7699 | 23 | rm -f /var/tmp/firejail-test-file-7699 |
24 | rm -f firejail-test-file-4388 | ||
24 | 25 | ||
25 | if [ $(readlink /proc/self) -lt 100 ]; then | 26 | if [ $(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)" |