diff options
author | 2023-02-28 09:51:26 -0500 | |
---|---|---|
committer | 2023-02-28 09:51:26 -0500 | |
commit | 27c4d069f322fbeca07c88e0e96208233103a5db (patch) | |
tree | fb4b4fdc75eb5e633ab55b8228a60f54176446a0 /test/features/2.2.exp | |
parent | fix cppcheck/scan-build problems (diff) | |
download | firejail-27c4d069f322fbeca07c88e0e96208233103a5db.tar.gz firejail-27c4d069f322fbeca07c88e0e96208233103a5db.tar.zst firejail-27c4d069f322fbeca07c88e0e96208233103a5db.zip |
chroot testing
Diffstat (limited to 'test/features/2.2.exp')
-rwxr-xr-x | test/features/2.2.exp | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/test/features/2.2.exp b/test/features/2.2.exp deleted file mode 100755 index 94bd6f4db..000000000 --- a/test/features/2.2.exp +++ /dev/null | |||
@@ -1,103 +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 | # DNS | ||
7 | # | ||
8 | |||
9 | set timeout 10 | ||
10 | spawn $env(SHELL) | ||
11 | match_max 100000 | ||
12 | set overlay [lindex $argv 0] | ||
13 | set chroot [lindex $argv 1] | ||
14 | |||
15 | # | ||
16 | # N | ||
17 | # | ||
18 | send -- "firejail --noprofile --dns=4.2.2.1\r" | ||
19 | expect { | ||
20 | timeout {puts "TESTING ERROR 0\n";exit} | ||
21 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
22 | } | ||
23 | sleep 1 | ||
24 | |||
25 | send -- "dig google.com\r" | ||
26 | expect { | ||
27 | timeout {puts "TESTING ERROR 1\n";exit} | ||
28 | "ANSWER SECTION" | ||
29 | } | ||
30 | expect { | ||
31 | timeout {puts "TESTING ERROR 1.1\n";exit} | ||
32 | "google.com" | ||
33 | } | ||
34 | expect { | ||
35 | timeout {puts "TESTING ERROR 1.3\n";exit} | ||
36 | "SERVER: 4.2.2.1" | ||
37 | } | ||
38 | after 100 | ||
39 | send -- "exit\r" | ||
40 | sleep 1 | ||
41 | |||
42 | |||
43 | # | ||
44 | # O | ||
45 | # | ||
46 | if { $overlay == "overlay" } { | ||
47 | send -- "firejail --noprofile --dns=4.2.2.1 --overlay\r" | ||
48 | expect { | ||
49 | timeout {puts "TESTING ERROR 2\n";exit} | ||
50 | "overlay option is not available" {puts "grsecurity\n"; exit} | ||
51 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} | ||
52 | } | ||
53 | sleep 1 | ||
54 | |||
55 | send -- "dig google.com\r" | ||
56 | expect { | ||
57 | timeout {puts "TESTING ERROR 3\n";exit} | ||
58 | "ANSWER SECTION" | ||
59 | } | ||
60 | expect { | ||
61 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
62 | "google.com" | ||
63 | } | ||
64 | expect { | ||
65 | timeout {puts "TESTING ERROR 3.3\n";exit} | ||
66 | "SERVER: 4.2.2.1" | ||
67 | } | ||
68 | after 100 | ||
69 | send -- "exit\r" | ||
70 | sleep 1 | ||
71 | } | ||
72 | |||
73 | # | ||
74 | # C | ||
75 | # | ||
76 | if { $chroot == "chroot" } { | ||
77 | send -- "firejail --noprofile --dns=4.2.2.1 --chroot=/tmp/chroot\r" | ||
78 | expect { | ||
79 | timeout {puts "TESTING ERROR 4\n";exit} | ||
80 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
81 | } | ||
82 | sleep 1 | ||
83 | |||
84 | send -- "dig google.com\r" | ||
85 | expect { | ||
86 | timeout {puts "TESTING ERROR 5\n";exit} | ||
87 | "ANSWER SECTION" | ||
88 | } | ||
89 | expect { | ||
90 | timeout {puts "TESTING ERROR 5.1\n";exit} | ||
91 | "google.com" | ||
92 | } | ||
93 | expect { | ||
94 | timeout {puts "TESTING ERROR 5.3\n";exit} | ||
95 | "SERVER: 4.2.2.1" | ||
96 | } | ||
97 | after 100 | ||
98 | send -- "exit\r" | ||
99 | sleep 1 | ||
100 | } | ||
101 | |||
102 | |||
103 | puts "\nall done\n" | ||