aboutsummaryrefslogtreecommitdiffstats
path: root/test/root/nginx.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@protonmail.com>2023-02-28 09:51:26 -0500
committerLibravatar netblue30 <netblue30@protonmail.com>2023-02-28 09:51:26 -0500
commit27c4d069f322fbeca07c88e0e96208233103a5db (patch)
treefb4b4fdc75eb5e633ab55b8228a60f54176446a0 /test/root/nginx.exp
parentfix cppcheck/scan-build problems (diff)
downloadfirejail-27c4d069f322fbeca07c88e0e96208233103a5db.tar.gz
firejail-27c4d069f322fbeca07c88e0e96208233103a5db.tar.zst
firejail-27c4d069f322fbeca07c88e0e96208233103a5db.zip
chroot testing
Diffstat (limited to 'test/root/nginx.exp')
-rwxr-xr-xtest/root/nginx.exp68
1 files changed, 0 insertions, 68 deletions
diff --git a/test/root/nginx.exp b/test/root/nginx.exp
deleted file mode 100755
index cb7367729..000000000
--- a/test/root/nginx.exp
+++ /dev/null
@@ -1,68 +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
6set timeout 5
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --name=nginx /etc/init.d/nginx start\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14}
15sleep 2
16
17
18spawn $env(SHELL)
19send -- "firejail --tree\r"
20expect {
21 timeout {puts "TESTING ERROR 1\n";exit}
22 "root::nginx: master process /usr/sbin/nginx"
23}
24expect {
25 timeout {puts "TESTING ERROR 2\n";exit}
26 "www-data::nginx: worker process"
27}
28sleep 2
29
30
31send -- "rm index.html\r"
32sleep 1
33send -- "wget 127.0.0.1\r"
34expect {
35 timeout {puts "TESTING ERROR 3\n";exit}
36 "saved"
37}
38send -- "cat index.html\r"
39expect {
40 timeout {puts "TESTING ERROR 4\n";exit}
41 "DOCTYPE html PUBLIC"
42}
43
44sleep 1
45send -- "rm index.html\r"
46
47send -- "firejail --join=nginx\r"
48sleep 2
49
50send -- "ls /dev\r"
51expect {
52 timeout {puts "TESTING ERROR 5\n";exit}
53 "tty0" {puts "TESTING ERROR 6\n";exit}
54 "ttyS0" {puts "TESTING ERROR 6\n";exit}
55 "audio" {puts "TESTING ERROR 6\n";exit}
56 "ppp" {puts "TESTING ERROR 6\n";exit}
57 "log"
58}
59sleep 1
60send -- "ls -al /tmp;pwd\r"
61expect {
62 timeout {puts "TESTING ERROR 10\n";exit}
63 "X11-unix" {puts "TESTING ERROR 11\n";exit}
64 "/root"
65}
66sleep 2
67
68puts "\nall done\n"