aboutsummaryrefslogtreecommitdiffstats
path: root/test/capabilities/firemon-caps.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/capabilities/firemon-caps.exp')
-rwxr-xr-xtest/capabilities/firemon-caps.exp47
1 files changed, 47 insertions, 0 deletions
diff --git a/test/capabilities/firemon-caps.exp b/test/capabilities/firemon-caps.exp
new file mode 100755
index 000000000..905c8cba9
--- /dev/null
+++ b/test/capabilities/firemon-caps.exp
@@ -0,0 +1,47 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2023 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --name=bingo1 --noprofile --caps\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14}
15sleep 1
16
17spawn $env(SHELL)
18send -- "firejail --name=bingo2 --noprofile\r"
19expect {
20 timeout {puts "TESTING ERROR 1\n";exit}
21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22}
23sleep 1
24
25spawn $env(SHELL)
26send -- "firemon --caps\r"
27expect {
28 timeout {puts "TESTING ERROR 2\n";exit}
29 "need to be root" {puts "TESTING SKIP: /proc mounted as hidepid\n"; exit}
30 "bingo1"
31}
32expect {
33 timeout {puts "TESTING ERROR 3\n";exit}
34 "31cffff"
35}
36expect {
37 timeout {puts "TESTING ERROR 4\n";exit}
38 "bingo2"
39}
40expect {
41 timeout {puts "TESTING ERROR 5\n";exit}
42 "fffffff"
43}
44
45after 500
46
47puts "all done\n"