aboutsummaryrefslogtreecommitdiffstats
path: root/test/root/isc-dhcp.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/root/isc-dhcp.exp')
-rwxr-xr-xtest/root/isc-dhcp.exp49
1 files changed, 49 insertions, 0 deletions
diff --git a/test/root/isc-dhcp.exp b/test/root/isc-dhcp.exp
new file mode 100755
index 000000000..5d9597e7c
--- /dev/null
+++ b/test/root/isc-dhcp.exp
@@ -0,0 +1,49 @@
1#!/usr/bin/expect -f
2
3set timeout 5
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail --name=dhcpd /etc/init.d/isc-dhcp-server 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 "root:/usr/sbin/dhcpd"
19}
20sleep 2
21
22send -- "tail -n 200 /var/log/syslog\r"
23expect {
24 timeout {puts "TESTING ERROR 3\n";exit}
25 "Internet Systems Consortium DHCP Server"
26}
27expect {
28 timeout {puts "TESTING ERROR 4\n";exit}
29 "Wrote 0 leases to leases file"
30}
31sleep 2
32
33send -- "firejail --join=dhcpd\r"
34sleep 2
35
36send -- "ls /dev\r"
37expect {
38 timeout {puts "TESTING ERROR 5\n";exit}
39 "tty0" {puts "TESTING ERROR 6\n";exit}
40 "ttyS0" {puts "TESTING ERROR 6\n";exit}
41 "ppp" {puts "TESTING ERROR 6\n";exit}
42 "audio" {puts "TESTING ERROR 6\n";exit}
43 "log"
44}
45sleep 2
46
47
48puts "\nall done\n"
49