aboutsummaryrefslogtreecommitdiffstats
path: root/test/features/2.6.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/features/2.6.exp')
-rwxr-xr-xtest/features/2.6.exp77
1 files changed, 0 insertions, 77 deletions
diff --git a/test/features/2.6.exp b/test/features/2.6.exp
deleted file mode 100755
index 7fdb69052..000000000
--- a/test/features/2.6.exp
+++ /dev/null
@@ -1,77 +0,0 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2023 Firejail Authors
4# License GPL v2
5#
6# default gateway
7#
8
9set timeout 10
10spawn $env(SHELL)
11match_max 100000
12set overlay [lindex $argv 0]
13set chroot [lindex $argv 1]
14
15#
16# N
17#
18send -- "firejail --noprofile --net=eth0 --defaultgw=192.168.1.10 --protocol=unix,inet,netlink\r"
19expect {
20 timeout {puts "TESTING ERROR 0\n";exit}
21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22}
23sleep 1
24
25send -- "ip route show\r"
26expect {
27 timeout {puts "TESTING ERROR 1\n";exit}
28 "default via 192.168.1.10 dev eth0"
29}
30after 100
31send -- "exit\r"
32sleep 1
33
34#
35# O
36#
37if { $overlay == "overlay" } {
38 send -- "firejail --noprofile --overlay --net=eth0 --defaultgw=192.168.1.10 --protocol=unix,inet,netlink\r"
39 expect {
40 timeout {puts "TESTING ERROR 2\n";exit}
41 "overlay option is not available" {puts "grsecurity\n"; exit}
42 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
43 }
44 sleep 1
45
46 send -- "ip route show\r"
47 expect {
48 timeout {puts "TESTING ERROR 3\n";exit}
49 "default via 192.168.1.10 dev eth0"
50 }
51 after 100
52 send -- "exit\r"
53 sleep 1
54}
55
56#
57# C
58#
59if { $chroot == "chroot" } {
60 send -- "firejail --noprofile --chroot=/tmp/chroot --net=eth0 --defaultgw=192.168.1.10 --protocol=unix,inet,netlink\r"
61 expect {
62 timeout {puts "TESTING ERROR 4\n";exit}
63 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
64 }
65 sleep 1
66
67 send -- "ip route show\r"
68 expect {
69 timeout {puts "TESTING ERROR 5\n";exit}
70 "default via 192.168.1.10 dev eth0"
71 }
72 after 100
73 send -- "exit\r"
74 sleep 1
75}
76
77puts "\nall done\n"