aboutsummaryrefslogtreecommitdiffstats
path: root/test/root/snmpd.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/root/snmpd.exp')
-rwxr-xr-xtest/root/snmpd.exp47
1 files changed, 47 insertions, 0 deletions
diff --git a/test/root/snmpd.exp b/test/root/snmpd.exp
new file mode 100755
index 000000000..610fdb13a
--- /dev/null
+++ b/test/root/snmpd.exp
@@ -0,0 +1,47 @@
1#!/usr/bin/expect -f
2
3set timeout 5
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail --name=snmpd /etc/init.d/snmpd start\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Child process initialized"
11}
12sleep 2
13
14spawn $env(SHELL)
15send -- "firejail --tree\r"
16expect {
17 timeout {puts "TESTING ERROR 2\n";exit}
18 "snmp:/usr/sbin/snmpd"
19}
20sleep 2
21
22send -- "tail /var/log/syslog\r"
23expect {
24 timeout {puts "TESTING ERROR 3\n";exit}
25 "snmpd"
26}
27expect {
28 timeout {puts "TESTING ERROR 4\n";exit}
29 "NET-SNMP version"
30}
31
32send -- "firejail --join=snmpd\r"
33sleep 2
34
35send -- "ls /dev\r"
36expect {
37 timeout {puts "TESTING ERROR 5\n";exit}
38 "tty0" {puts "TESTING ERROR 6\n";exit}
39 "ttyS0" {puts "TESTING ERROR 6\n";exit}
40 "audio" {puts "TESTING ERROR 6\n";exit}
41 "ppp" {puts "TESTING ERROR 6\n";exit}
42 "log"
43}
44sleep 2
45
46sleep 2
47puts "\nall done\n"