aboutsummaryrefslogtreecommitdiffstats
path: root/test/features/2.6.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2015-11-24 11:11:04 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2015-11-24 11:11:04 -0500
commit12317dbbf67c1adcaf0d4fec267896d5951d8418 (patch)
tree6c93a0ad98ebeaffca02fc22b79e9b4ec61b01ec /test/features/2.6.exp
parentfixes (diff)
downloadfirejail-12317dbbf67c1adcaf0d4fec267896d5951d8418.tar.gz
firejail-12317dbbf67c1adcaf0d4fec267896d5951d8418.tar.zst
firejail-12317dbbf67c1adcaf0d4fec267896d5951d8418.zip
feature test
Diffstat (limited to 'test/features/2.6.exp')
-rwxr-xr-xtest/features/2.6.exp68
1 files changed, 68 insertions, 0 deletions
diff --git a/test/features/2.6.exp b/test/features/2.6.exp
new file mode 100755
index 000000000..dc2381393
--- /dev/null
+++ b/test/features/2.6.exp
@@ -0,0 +1,68 @@
1#!/usr/bin/expect -f
2#
3# default gateway
4#
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10#
11# N
12#
13send -- "firejail --noprofile --net=eth0 --defaultgw=192.168.1.10\r"
14expect {
15 timeout {puts "TESTING ERROR 0\n";exit}
16 "Child process initialized"
17}
18sleep 1
19
20send -- "netstat -rn\r"
21expect {
22 timeout {puts "TESTING ERROR 1\n";exit}
23 "0.0.0.0 192.168.1.10"
24}
25after 100
26send -- "exit\r"
27sleep 1
28
29#
30# O
31#
32send -- "firejail --noprofile --overlay --net=eth0 --defaultgw=192.168.1.10\r"
33expect {
34 timeout {puts "TESTING ERROR 2\n";exit}
35 "Child process initialized"
36}
37sleep 1
38
39send -- "netstat -rn\r"
40expect {
41 timeout {puts "TESTING ERROR 3\n";exit}
42 "0.0.0.0 192.168.1.10"
43}
44after 100
45send -- "exit\r"
46sleep 1
47
48#
49# C
50#
51send -- "firejail --noprofile --chroot=/tmp/chroot --net=eth0 --defaultgw=192.168.1.10\r"
52expect {
53 timeout {puts "TESTING ERROR 4\n";exit}
54 "Child process initialized"
55}
56sleep 1
57
58send -- "netstat -rn\r"
59expect {
60 timeout {puts "TESTING ERROR 5\n";exit}
61 "0.0.0.0 192.168.1.10"
62}
63after 100
64send -- "exit\r"
65sleep 1
66
67
68puts "\nall done\n"