aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/apps/apps.sh3
-rwxr-xr-xtest/apps/chromium.exp3
-rwxr-xr-xtest/apps/deluge.exp3
-rwxr-xr-xtest/apps/evince.exp3
-rwxr-xr-xtest/apps/fbreader.exp3
-rwxr-xr-xtest/apps/firefox.exp3
-rwxr-xr-xtest/apps/gnome-mplayer.exp3
-rwxr-xr-xtest/apps/hexchat.exp3
-rwxr-xr-xtest/apps/icedove.exp3
-rwxr-xr-xtest/apps/midori.exp3
-rwxr-xr-xtest/apps/opera.exp3
-rwxr-xr-xtest/apps/transmission-gtk.exp3
-rwxr-xr-xtest/apps/transmission-qt.exp3
-rwxr-xr-xtest/apps/vlc.exp3
-rwxr-xr-xtest/apps/weechat.exp3
-rwxr-xr-xtest/apps/wine.exp3
-rwxr-xr-xtest/apps/xchat.exp3
-rwxr-xr-xtest/profiles/ignore.exp (renamed from test/ignore.exp)3
-rw-r--r--test/profiles/ignore.profile (renamed from test/ignore.profile)0
-rw-r--r--test/profiles/ignore2.profile (renamed from test/ignore2.profile)0
-rwxr-xr-xtest/profiles/profiles.sh7
-rwxr-xr-xtest/test.sh35
-rwxr-xr-xtest/utils/caps-print.exp (renamed from test/caps-print.exp)3
-rwxr-xr-xtest/utils/cpu-print.exp (renamed from test/cpu-print.exp)3
-rwxr-xr-xtest/utils/dns-print.exp (renamed from test/dns-print.exp)3
-rwxr-xr-xtest/utils/fs-print.exp (renamed from test/fs-print.exp)3
-rwxr-xr-xtest/utils/help.exp (renamed from test/option_help.exp)3
-rwxr-xr-xtest/utils/list.exp (renamed from test/option_list.exp)3
-rwxr-xr-xtest/utils/man.exp (renamed from test/option_man.exp)3
-rwxr-xr-xtest/utils/protocol-print.exp (renamed from test/protocol-print.exp)3
-rwxr-xr-xtest/utils/seccomp-print.exp (renamed from test/seccomp-print.exp)3
-rwxr-xr-xtest/utils/tree.exp (renamed from test/option_tree.exp)3
-rwxr-xr-xtest/utils/utils.sh42
-rwxr-xr-xtest/utils/version.exp (renamed from test/option_version.exp)3
34 files changed, 134 insertions, 37 deletions
diff --git a/test/apps/apps.sh b/test/apps/apps.sh
index ff561ef31..2410a0d92 100755
--- a/test/apps/apps.sh
+++ b/test/apps/apps.sh
@@ -1,4 +1,7 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3export MALLOC_CHECK_=3 6export MALLOC_CHECK_=3
4export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) 7export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
diff --git a/test/apps/chromium.exp b/test/apps/chromium.exp
index 676f7e314..98ea66a51 100755
--- a/test/apps/chromium.exp
+++ b/test/apps/chromium.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/apps/deluge.exp b/test/apps/deluge.exp
index 9f5063495..5142ac184 100755
--- a/test/apps/deluge.exp
+++ b/test/apps/deluge.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/apps/evince.exp b/test/apps/evince.exp
index 3c3ad4bdd..e129a00fa 100755
--- a/test/apps/evince.exp
+++ b/test/apps/evince.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/apps/fbreader.exp b/test/apps/fbreader.exp
index d2bee880e..aa9d77c1c 100755
--- a/test/apps/fbreader.exp
+++ b/test/apps/fbreader.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/apps/firefox.exp b/test/apps/firefox.exp
index 2585e4b5c..5ac6b125e 100755
--- a/test/apps/firefox.exp
+++ b/test/apps/firefox.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/apps/gnome-mplayer.exp b/test/apps/gnome-mplayer.exp
index 6965322fc..b460a5d79 100755
--- a/test/apps/gnome-mplayer.exp
+++ b/test/apps/gnome-mplayer.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/apps/hexchat.exp b/test/apps/hexchat.exp
index 7e99c8cdf..a24ccbf91 100755
--- a/test/apps/hexchat.exp
+++ b/test/apps/hexchat.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/apps/icedove.exp b/test/apps/icedove.exp
index 344febb93..9ae89535e 100755
--- a/test/apps/icedove.exp
+++ b/test/apps/icedove.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/apps/midori.exp b/test/apps/midori.exp
index 470f5de77..2225942e8 100755
--- a/test/apps/midori.exp
+++ b/test/apps/midori.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/apps/opera.exp b/test/apps/opera.exp
index 23eed5504..bfb2d6f83 100755
--- a/test/apps/opera.exp
+++ b/test/apps/opera.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/apps/transmission-gtk.exp b/test/apps/transmission-gtk.exp
index 1acfc6f94..92ed05cc4 100755
--- a/test/apps/transmission-gtk.exp
+++ b/test/apps/transmission-gtk.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/apps/transmission-qt.exp b/test/apps/transmission-qt.exp
index 944fd28a2..3ea2a112f 100755
--- a/test/apps/transmission-qt.exp
+++ b/test/apps/transmission-qt.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/apps/vlc.exp b/test/apps/vlc.exp
index 290c0fc2f..762e1fbd9 100755
--- a/test/apps/vlc.exp
+++ b/test/apps/vlc.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/apps/weechat.exp b/test/apps/weechat.exp
index 630af55ee..af2eab1cc 100755
--- a/test/apps/weechat.exp
+++ b/test/apps/weechat.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/apps/wine.exp b/test/apps/wine.exp
index f5b7d12b4..a2f465acb 100755
--- a/test/apps/wine.exp
+++ b/test/apps/wine.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/apps/xchat.exp b/test/apps/xchat.exp
index cde89d754..bfdf581be 100755
--- a/test/apps/xchat.exp
+++ b/test/apps/xchat.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/ignore.exp b/test/profiles/ignore.exp
index c5ea25684..281697b26 100755
--- a/test/ignore.exp
+++ b/test/profiles/ignore.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/ignore.profile b/test/profiles/ignore.profile
index aec231ad2..aec231ad2 100644
--- a/test/ignore.profile
+++ b/test/profiles/ignore.profile
diff --git a/test/ignore2.profile b/test/profiles/ignore2.profile
index 49fcd8324..49fcd8324 100644
--- a/test/ignore2.profile
+++ b/test/profiles/ignore2.profile
diff --git a/test/profiles/profiles.sh b/test/profiles/profiles.sh
index a20ed5432..e3adc8a4f 100755
--- a/test/profiles/profiles.sh
+++ b/test/profiles/profiles.sh
@@ -14,9 +14,12 @@ do
14 ./test-profile.exp $PROFILE 14 ./test-profile.exp $PROFILE
15done 15done
16 16
17echo "TESTING: profile syntax (profiles/profile_syntax.exp)" 17echo "TESTING: profile syntax (test/profiles/profile_syntax.exp)"
18./profile_syntax.exp 18./profile_syntax.exp
19 19
20echo "TESTING: profile syntax 2 (profiles/profile_syntax2.exp)" 20echo "TESTING: profile syntax 2 (test/profiles/profile_syntax2.exp)"
21./profile_syntax2.exp 21./profile_syntax2.exp
22 22
23echo "TESTING: ignore command (test/profiles/ignore.exp)"
24./ignore.exp
25
diff --git a/test/test.sh b/test/test.sh
index 1204d8208..24827de9f 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -4,10 +4,6 @@
4 4
5./fscheck.sh 5./fscheck.sh
6 6
7echo "TESTING: cpu.print (cpu-print.exp)"
8echo "TESTING: failing under VirtualBox where there is only one CPU"
9./cpu-print.exp
10
11echo "TESTING: network profile (net_profile.exp)" 7echo "TESTING: network profile (net_profile.exp)"
12./net_profile.exp 8./net_profile.exp
13 9
@@ -17,18 +13,6 @@ echo "TESTING: bandwidth (bandwidth.exp)"
17echo "TESTING: file transfer (ls.exp)" 13echo "TESTING: file transfer (ls.exp)"
18./ls.exp 14./ls.exp
19 15
20echo "TESTING: fs.print (fs-print.exp)"
21./fs-print.exp
22
23echo "TESTING: dns.print (dns-print.exp)"
24./dns-print.exp
25
26echo "TESTING: caps.print (caps-print.exp)"
27./caps-print.exp
28
29echo "TESTING: seccomp.print (seccomp-print.exp)"
30./seccomp-print.exp
31
32echo "TESTING: protocol.print (protocol-print.exp)" 16echo "TESTING: protocol.print (protocol-print.exp)"
33./protocol-print.exp 17./protocol-print.exp
34 18
@@ -53,9 +37,6 @@ echo "TESTING: environment variables (env.exp)"
53echo "TESTING: whitelist empty (whitelist-empty.exp)" 37echo "TESTING: whitelist empty (whitelist-empty.exp)"
54./whitelist-empty.exp 38./whitelist-empty.exp
55 39
56echo "TESTING: ignore command (ignore.exp)"
57./ignore.exp
58
59echo "TESTING: private-etc (private-etc.exp)" 40echo "TESTING: private-etc (private-etc.exp)"
60./private-etc.exp 41./private-etc.exp
61 42
@@ -83,22 +64,6 @@ rm -fr auto2
83rm -fr auto3 64rm -fr auto3
84rm -fr auto4 65rm -fr auto4
85 66
86
87echo "TESTING: version (option_version.exp)"
88./option_version.exp
89
90echo "TESTING: help (option_help.exp)"
91./option_help.exp
92
93echo "TESTING: man (option_man.exp)"
94./option_man.exp
95
96echo "TESTING: list (option_list.exp)"
97./option_list.exp
98
99echo "TESTING: tree (option_tree.exp)"
100./option_tree.exp
101
102if [ -f /proc/self/uid_map ]; 67if [ -f /proc/self/uid_map ];
103then 68then
104 echo "TESTING: noroot (noroot.exp)" 69 echo "TESTING: noroot (noroot.exp)"
diff --git a/test/caps-print.exp b/test/utils/caps-print.exp
index 39e5ec50a..9cc4b1872 100755
--- a/test/caps-print.exp
+++ b/test/utils/caps-print.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/cpu-print.exp b/test/utils/cpu-print.exp
index d8e3fbb04..4a9ffa0ac 100755
--- a/test/cpu-print.exp
+++ b/test/utils/cpu-print.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/dns-print.exp b/test/utils/dns-print.exp
index ee7b08e5e..51dcab508 100755
--- a/test/dns-print.exp
+++ b/test/utils/dns-print.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/fs-print.exp b/test/utils/fs-print.exp
index 48056a3bf..fa0eab95b 100755
--- a/test/fs-print.exp
+++ b/test/utils/fs-print.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/option_help.exp b/test/utils/help.exp
index f4518219c..5b9864578 100755
--- a/test/option_help.exp
+++ b/test/utils/help.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/option_list.exp b/test/utils/list.exp
index b9c73e52b..69db1f568 100755
--- a/test/option_list.exp
+++ b/test/utils/list.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/option_man.exp b/test/utils/man.exp
index d941a2432..d29f760b0 100755
--- a/test/option_man.exp
+++ b/test/utils/man.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/protocol-print.exp b/test/utils/protocol-print.exp
index 4d1ae34d6..152a64467 100755
--- a/test/protocol-print.exp
+++ b/test/utils/protocol-print.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/seccomp-print.exp b/test/utils/seccomp-print.exp
index b4e6ed35e..d0531a9c3 100755
--- a/test/seccomp-print.exp
+++ b/test/utils/seccomp-print.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/option_tree.exp b/test/utils/tree.exp
index 1841907d1..a8ef763f1 100755
--- a/test/option_tree.exp
+++ b/test/utils/tree.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)
diff --git a/test/utils/utils.sh b/test/utils/utils.sh
new file mode 100755
index 000000000..02aaa57c0
--- /dev/null
+++ b/test/utils/utils.sh
@@ -0,0 +1,42 @@
1#!/bin/bash
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6export MALLOC_CHECK_=3
7export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
8
9echo "TESTING: version (test/utils/version.exp)"
10./version.exp
11
12echo "TESTING: help (test/utils/help.exp)"
13./help.exp
14
15echo "TESTING: man (test/utils/man.exp)"
16./man.exp
17
18echo "TESTING: list (test/utils/list.exp)"
19./list.exp
20
21echo "TESTING: tree (test/utils/tree.exp)"
22./tree.exp
23
24echo "TESTING: cpu.print (test/utils/cpu-print.exp)"
25echo "TESTING: failing under VirtualBox where there is only one CPU"
26./cpu-print.exp
27
28echo "TESTING: fs.print (test/utils/fs-print.exp)"
29./fs-print.exp
30
31echo "TESTING: dns.print (test/utils/dns-print.exp)"
32./dns-print.exp
33
34echo "TESTING: caps.print (test/utils/caps-print.exp)"
35./caps-print.exp
36
37echo "TESTING: seccomp.print (test/utils/seccomp-print.exp)"
38./seccomp-print.exp
39
40echo "TESTING: protocol.print (test/utils/protocol-print.exp)"
41./protocol-print.exp
42
diff --git a/test/option_version.exp b/test/utils/version.exp
index 44c0c217f..2ce6f1680 100755
--- a/test/option_version.exp
+++ b/test/utils/version.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 10 6set timeout 10
4spawn $env(SHELL) 7spawn $env(SHELL)