aboutsummaryrefslogtreecommitdiffstats
path: root/test/chk_config.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/chk_config.exp')
-rwxr-xr-xtest/chk_config.exp86
1 files changed, 86 insertions, 0 deletions
diff --git a/test/chk_config.exp b/test/chk_config.exp
new file mode 100755
index 000000000..ada59d655
--- /dev/null
+++ b/test/chk_config.exp
@@ -0,0 +1,86 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7# check br0
8send -- "/sbin/ifconfig;pwd\r"
9expect {
10 timeout {puts "TESTING ERROR 0 - please run ./configure\n";exit}
11 "br0"
12}
13expect {
14 timeout {puts "TESTING ERROR 0 - please run ./configure\n";exit}
15 "10.10.20.1"
16}
17expect {
18 timeout {puts "TESTING ERROR 0 - please run ./configure\n";exit}
19 "home"
20}
21
22# check br1
23send -- "/sbin/ifconfig;pwd\r"
24expect {
25 timeout {puts "TESTING ERROR 1\n";exit}
26 "br1"
27}
28expect {
29 timeout {puts "TESTING ERROR 1\n";exit}
30 "10.10.30.1"
31}
32expect {
33 timeout {puts "TESTING ERROR 1\n";exit}
34 "home"
35}
36
37# check br2
38send -- "/sbin/ifconfig;pwd\r"
39expect {
40 timeout {puts "TESTING ERROR 2\n";exit}
41 "br2"
42}
43expect {
44 timeout {puts "TESTING ERROR 2\n";exit}
45 "10.10.40.1"
46}
47expect {
48 timeout {puts "TESTING ERROR 2\n";exit}
49 "home"
50}
51
52# check br3
53send -- "/sbin/ifconfig;pwd\r"
54expect {
55 timeout {puts "TESTING ERROR 3\n";exit}
56 "br3"
57}
58expect {
59 timeout {puts "TESTING ERROR 3\n";exit}
60 "10.10.50.1"
61}
62expect {
63 timeout {puts "TESTING ERROR 3\n";exit}
64 "home"
65}
66
67# start a sandbox and check MALLOC_PERTURB
68send -- "firejail\r"
69expect {
70 timeout {puts "TESTING ERROR 4\n";exit}
71 "Child process initialized"
72}
73sleep 1
74
75set timeout 2
76send -- "env | grep MALLOC;pwd\r"
77expect {
78 timeout {puts "\nTESTING: MALLOC_PERTURB_ disabled\n"}
79 "MALLOC_PERTURB_" {puts "\nTESTING: MALLOC_PERTURB_ enabled\n"}
80}
81expect {
82 timeout {puts "TESTING ERROR 5\n";exit}
83 "home"
84}
85
86