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