aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils/firemon-cpu.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/utils/firemon-cpu.exp')
-rwxr-xr-xtest/utils/firemon-cpu.exp45
1 files changed, 45 insertions, 0 deletions
diff --git a/test/utils/firemon-cpu.exp b/test/utils/firemon-cpu.exp
new file mode 100755
index 000000000..f2ecd4a5c
--- /dev/null
+++ b/test/utils/firemon-cpu.exp
@@ -0,0 +1,45 @@
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 "need to be root" {puts "TESTING SKIP: /proc mounted as hidepid\n"; exit}
31 "name=test1"
32}
33expect {
34 timeout {puts "TESTING ERROR 3\n";exit}
35 "Cpus_allowed_list"
36}
37expect {
38 timeout {puts "TESTING ERROR 4\n";exit}
39 "name=test2"
40}
41
42after 100
43
44puts "\nall done\n"
45