aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-11-10 07:18:24 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2016-11-10 07:18:24 -0500
commit334c79edd83377a09c138800c0a2fefaf9c7981f (patch)
tree4511f4a41338d8a59c302b10588c974aeffd5a46 /test
parentfixed --top (diff)
downloadfirejail-334c79edd83377a09c138800c0a2fefaf9c7981f.tar.gz
firejail-334c79edd83377a09c138800c0a2fefaf9c7981f.tar.zst
firejail-334c79edd83377a09c138800c0a2fefaf9c7981f.zip
testing
Diffstat (limited to 'test')
-rwxr-xr-xtest/network/firemon-arp.exp2
-rwxr-xr-xtest/network/firemon-interfaces.exp67
-rwxr-xr-xtest/network/netstats.exp39
-rwxr-xr-xtest/network/network.sh6
-rwxr-xr-xtest/utils/firemon-cpu.exp44
-rwxr-xr-xtest/utils/top.exp40
-rwxr-xr-xtest/utils/utils.sh9
7 files changed, 206 insertions, 1 deletions
diff --git a/test/network/firemon-arp.exp b/test/network/firemon-arp.exp
index 0a543c3b4..e40ffb609 100755
--- a/test/network/firemon-arp.exp
+++ b/test/network/firemon-arp.exp
@@ -47,4 +47,4 @@ expect {
47} 47}
48after 100 48after 100
49 49
50puts "\nall done\n"" 50puts "\nall done\n"
diff --git a/test/network/firemon-interfaces.exp b/test/network/firemon-interfaces.exp
new file mode 100755
index 000000000..deb8594af
--- /dev/null
+++ b/test/network/firemon-interfaces.exp
@@ -0,0 +1,67 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --net=eth0 --name=test1\r"
11expect {
12 timeout {puts "TESTING ERROR 9\n";exit}
13 "Child process initialized"
14}
15sleep 1
16
17spawn $env(SHELL)
18send -- "firejail --net=eth0 --name=test2\r"
19expect {
20 timeout {puts "TESTING ERROR 9\n";exit}
21 "Child process initialized"
22}
23sleep 1
24
25spawn $env(SHELL)
26send -- "firemon --interface\r"
27expect {
28 timeout {puts "TESTING ERROR 9\n";exit}
29 "Link status"
30}
31expect {
32 timeout {puts "TESTING ERROR 9\n";exit}
33 "lo UP"
34}
35expect {
36 timeout {puts "TESTING ERROR 9\n";exit}
37 "eth0-"
38}
39expect {
40 timeout {puts "TESTING ERROR 9\n";exit}
41 "IPv4 status"
42}
43expect {
44 timeout {puts "TESTING ERROR 9\n";exit}
45 "lo UP"
46}
47expect {
48 timeout {puts "TESTING ERROR 9\n";exit}
49 "eth0-"
50}
51expect {
52 timeout {puts "TESTING ERROR 9\n";exit}
53 "IPv6 status"
54}
55expect {
56 timeout {puts "TESTING ERROR 9\n";exit}
57 "lo UP"
58}
59expect {
60 timeout {puts "TESTING ERROR 9\n";exit}
61 "eth0-"
62}
63
64after 100
65
66puts "\n"
67
diff --git a/test/network/netstats.exp b/test/network/netstats.exp
new file mode 100755
index 000000000..41232061d
--- /dev/null
+++ b/test/network/netstats.exp
@@ -0,0 +1,39 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --net=eth0 --name=test1\r"
11expect {
12 timeout {puts "TESTING ERROR 9\n";exit}
13 "Child process initialized"
14}
15sleep 1
16
17spawn $env(SHELL)
18send -- "firejail --net=eth0 --name=test2\r"
19expect {
20 timeout {puts "TESTING ERROR 9\n";exit}
21 "Child process initialized"
22}
23sleep 1
24
25spawn $env(SHELL)
26send -- "firejail --netstats\r"
27sleep 4
28expect {
29 timeout {puts "TESTING ERROR 9\n";exit}
30 "name=test1"
31}
32expect {
33 timeout {puts "TESTING ERROR 9\n";exit}
34 "name=test2"
35}
36after 100
37
38puts "\n"
39
diff --git a/test/network/network.sh b/test/network/network.sh
index 28f707952..e1646d64a 100755
--- a/test/network/network.sh
+++ b/test/network/network.sh
@@ -8,9 +8,15 @@ export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
8 8
9sudo ./configure 9sudo ./configure
10 10
11echo "TESTING: firemon interface (firemon-interfaces.exp)"
12sudo ./firemon-interfaces.exp
13
11echo "TESTING: firemon arp (firemon-arp.exp)" 14echo "TESTING: firemon arp (firemon-arp.exp)"
12./firemon-arp.exp 15./firemon-arp.exp
13 16
17echo "TESTING: firemon netstats (netstats.exp)"
18./netstats.exp
19
14echo "TESTING: firemon route (firemon-route.exp)" 20echo "TESTING: firemon route (firemon-route.exp)"
15./firemon-route.exp 21./firemon-route.exp
16 22
diff --git a/test/utils/firemon-cpu.exp b/test/utils/firemon-cpu.exp
new file mode 100755
index 000000000..22e44512c
--- /dev/null
+++ b/test/utils/firemon-cpu.exp
@@ -0,0 +1,44 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --name=test1\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized"
14}
15sleep 1
16
17spawn $env(SHELL)
18send -- "firejail --name=test2\r"
19expect {
20 timeout {puts "TESTING ERROR 1\n";exit}
21 "Child process initialized"
22}
23sleep 1
24
25spawn $env(SHELL)
26send -- "firemon --cpu\r"
27sleep 4
28expect {
29 timeout {puts "TESTING ERROR 2\n";exit}
30 "name=test1"
31}
32expect {
33 timeout {puts "TESTING ERROR 3\n";exit}
34 "Cpus_allowed_list"
35}
36expect {
37 timeout {puts "TESTING ERROR 4\n";exit}
38 "name=test2"
39}
40
41after 100
42
43puts "\nall done\n"
44
diff --git a/test/utils/top.exp b/test/utils/top.exp
new file mode 100755
index 000000000..d530e5a85
--- /dev/null
+++ b/test/utils/top.exp
@@ -0,0 +1,40 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --name=test1\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized"
14}
15sleep 1
16
17spawn $env(SHELL)
18send -- "firejail --name=test2\r"
19expect {
20 timeout {puts "TESTING ERROR 1\n";exit}
21 "Child process initialized"
22}
23sleep 1
24
25spawn $env(SHELL)
26send -- "firejail --top\r"
27sleep 4
28expect {
29 timeout {puts "TESTING ERROR 2\n";exit}
30 "name=test1"
31}
32expect {
33 timeout {puts "TESTING ERROR 2\n";exit}
34 "name=test2"
35}
36
37after 100
38
39puts "\nall done\n"
40
diff --git a/test/utils/utils.sh b/test/utils/utils.sh
index ff4e5e086..557f2c961 100755
--- a/test/utils/utils.sh
+++ b/test/utils/utils.sh
@@ -88,6 +88,15 @@ echo "TESTING: firemon --seccomp (test/utils/seccomp.exp)"
88echo "TESTING: firemon --caps (test/utils/caps.exp)" 88echo "TESTING: firemon --caps (test/utils/caps.exp)"
89./caps.exp 89./caps.exp
90 90
91echo "TESTING: top (test/utils/top.exp)"
92./top.exp
93
91echo "TESTING: file transfer (test/utils/ls.exp)" 94echo "TESTING: file transfer (test/utils/ls.exp)"
92./ls.exp 95./ls.exp
93 96
97echo "TESTING: firemon cpu (test/utils/firemon-cpu.exp)"
98./firemon-cpu.exp
99
100echo "TESTING: firemon cgroup (test/utils/firemon-cgroup.exp)"
101./firemon-cgroup.exp
102