diff options
author | netblue30 <netblue30@yahoo.com> | 2016-11-10 07:18:24 -0500 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-11-10 07:18:24 -0500 |
commit | 334c79edd83377a09c138800c0a2fefaf9c7981f (patch) | |
tree | 4511f4a41338d8a59c302b10588c974aeffd5a46 /test/utils | |
parent | fixed --top (diff) | |
download | firejail-334c79edd83377a09c138800c0a2fefaf9c7981f.tar.gz firejail-334c79edd83377a09c138800c0a2fefaf9c7981f.tar.zst firejail-334c79edd83377a09c138800c0a2fefaf9c7981f.zip |
testing
Diffstat (limited to 'test/utils')
-rwxr-xr-x | test/utils/firemon-cpu.exp | 44 | ||||
-rwxr-xr-x | test/utils/top.exp | 40 | ||||
-rwxr-xr-x | test/utils/utils.sh | 9 |
3 files changed, 93 insertions, 0 deletions
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 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --name=test1\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "Child process initialized" | ||
14 | } | ||
15 | sleep 1 | ||
16 | |||
17 | spawn $env(SHELL) | ||
18 | send -- "firejail --name=test2\r" | ||
19 | expect { | ||
20 | timeout {puts "TESTING ERROR 1\n";exit} | ||
21 | "Child process initialized" | ||
22 | } | ||
23 | sleep 1 | ||
24 | |||
25 | spawn $env(SHELL) | ||
26 | send -- "firemon --cpu\r" | ||
27 | sleep 4 | ||
28 | expect { | ||
29 | timeout {puts "TESTING ERROR 2\n";exit} | ||
30 | "name=test1" | ||
31 | } | ||
32 | expect { | ||
33 | timeout {puts "TESTING ERROR 3\n";exit} | ||
34 | "Cpus_allowed_list" | ||
35 | } | ||
36 | expect { | ||
37 | timeout {puts "TESTING ERROR 4\n";exit} | ||
38 | "name=test2" | ||
39 | } | ||
40 | |||
41 | after 100 | ||
42 | |||
43 | puts "\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 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --name=test1\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "Child process initialized" | ||
14 | } | ||
15 | sleep 1 | ||
16 | |||
17 | spawn $env(SHELL) | ||
18 | send -- "firejail --name=test2\r" | ||
19 | expect { | ||
20 | timeout {puts "TESTING ERROR 1\n";exit} | ||
21 | "Child process initialized" | ||
22 | } | ||
23 | sleep 1 | ||
24 | |||
25 | spawn $env(SHELL) | ||
26 | send -- "firejail --top\r" | ||
27 | sleep 4 | ||
28 | expect { | ||
29 | timeout {puts "TESTING ERROR 2\n";exit} | ||
30 | "name=test1" | ||
31 | } | ||
32 | expect { | ||
33 | timeout {puts "TESTING ERROR 2\n";exit} | ||
34 | "name=test2" | ||
35 | } | ||
36 | |||
37 | after 100 | ||
38 | |||
39 | puts "\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)" | |||
88 | echo "TESTING: firemon --caps (test/utils/caps.exp)" | 88 | echo "TESTING: firemon --caps (test/utils/caps.exp)" |
89 | ./caps.exp | 89 | ./caps.exp |
90 | 90 | ||
91 | echo "TESTING: top (test/utils/top.exp)" | ||
92 | ./top.exp | ||
93 | |||
91 | echo "TESTING: file transfer (test/utils/ls.exp)" | 94 | echo "TESTING: file transfer (test/utils/ls.exp)" |
92 | ./ls.exp | 95 | ./ls.exp |
93 | 96 | ||
97 | echo "TESTING: firemon cpu (test/utils/firemon-cpu.exp)" | ||
98 | ./firemon-cpu.exp | ||
99 | |||
100 | echo "TESTING: firemon cgroup (test/utils/firemon-cgroup.exp)" | ||
101 | ./firemon-cgroup.exp | ||
102 | |||