aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils
diff options
context:
space:
mode:
Diffstat (limited to 'test/utils')
-rwxr-xr-xtest/utils/firemon-cpu.exp1
-rwxr-xr-xtest/utils/firemon-interface.exp18
-rwxr-xr-xtest/utils/firemon-name.exp28
-rwxr-xr-xtest/utils/firemon-version.exp18
-rwxr-xr-xtest/utils/utils.sh9
5 files changed, 73 insertions, 1 deletions
diff --git a/test/utils/firemon-cpu.exp b/test/utils/firemon-cpu.exp
index f2ecd4a5c..00156c909 100755
--- a/test/utils/firemon-cpu.exp
+++ b/test/utils/firemon-cpu.exp
@@ -24,7 +24,6 @@ sleep 1
24 24
25spawn $env(SHELL) 25spawn $env(SHELL)
26send -- "firemon --cpu\r" 26send -- "firemon --cpu\r"
27sleep 4
28expect { 27expect {
29 timeout {puts "TESTING ERROR 2\n";exit} 28 timeout {puts "TESTING ERROR 2\n";exit}
30 "need to be root" {puts "TESTING SKIP: /proc mounted as hidepid\n"; exit} 29 "need to be root" {puts "TESTING SKIP: /proc mounted as hidepid\n"; exit}
diff --git a/test/utils/firemon-interface.exp b/test/utils/firemon-interface.exp
new file mode 100755
index 000000000..edafd1639
--- /dev/null
+++ b/test/utils/firemon-interface.exp
@@ -0,0 +1,18 @@
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 -- "firemon --interface\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "you need to be root"
14}
15after 100
16
17puts "\nall done\n"
18
diff --git a/test/utils/firemon-name.exp b/test/utils/firemon-name.exp
new file mode 100755
index 000000000..c5dbfabab
--- /dev/null
+++ b/test/utils/firemon-name.exp
@@ -0,0 +1,28 @@
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=test\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized"
14}
15sleep 1
16
17spawn $env(SHELL)
18send -- "firemon --cpu --name=test\r"
19expect {
20 timeout {puts "TESTING ERROR 2\n";exit}
21 "need to be root" {puts "TESTING SKIP: /proc mounted as hidepid\n"; exit}
22 "Cpus_allowed_list"
23}
24
25after 100
26
27puts "\nall done\n"
28
diff --git a/test/utils/firemon-version.exp b/test/utils/firemon-version.exp
new file mode 100755
index 000000000..639c15c29
--- /dev/null
+++ b/test/utils/firemon-version.exp
@@ -0,0 +1,18 @@
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 -- "firemon --version\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "firemon version"
14}
15after 100
16
17puts "\nall done\n"
18
diff --git a/test/utils/utils.sh b/test/utils/utils.sh
index bd91110f7..804e5ae0f 100755
--- a/test/utils/utils.sh
+++ b/test/utils/utils.sh
@@ -100,3 +100,12 @@ echo "TESTING: firemon cpu (test/utils/firemon-cpu.exp)"
100echo "TESTING: firemon cgroup (test/utils/firemon-cgroup.exp)" 100echo "TESTING: firemon cgroup (test/utils/firemon-cgroup.exp)"
101./firemon-cgroup.exp 101./firemon-cgroup.exp
102 102
103echo "TESTING: firemon version (test/utils/firemon-version.exp)"
104./firemon-version.exp
105
106echo "TESTING: firemon interface (test/utils/firemon-interface.exp)"
107./firemon-interface.exp
108
109echo "TESTING: firemon name (test/utils/firemon-name.exp)"
110./firemon-name.exp
111