aboutsummaryrefslogtreecommitdiffstats
path: root/test/servers2.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/servers2.exp')
-rwxr-xr-xtest/servers2.exp31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/servers2.exp b/test/servers2.exp
new file mode 100755
index 000000000..28bcae207
--- /dev/null
+++ b/test/servers2.exp
@@ -0,0 +1,31 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "sudo ls; sudo whoami; sudo pwd\r"
8expect {
9 timeout {puts "TESTING ERROR: you need to root run this test as root\n";exit}
10 "root"
11}
12
13send -- "firejail --net=br0 --ip=10.10.20.5--seccomp\r"
14expect {
15 timeout {puts "TESTING ERROR 0\n";exit}
16 "Child process initialized"
17}
18sleep 2
19
20send -- "/etc/init.d/snmpd start"
21sleep 2
22
23send -- "ps aux; pwd\r"
24expect {
25 timeout {puts "TESTING ERROR 1\n";exit}
26 "snmpd"
27}
28
29send -- "exit\r"
30sleep 1
31puts "\n"