aboutsummaryrefslogtreecommitdiffstats
path: root/test/features/1.7.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/features/1.7.exp
parentfix cppcheck/scan-build problems (diff)
downloadfirejail-27c4d069f322fbeca07c88e0e96208233103a5db.tar.gz
firejail-27c4d069f322fbeca07c88e0e96208233103a5db.tar.zst
firejail-27c4d069f322fbeca07c88e0e96208233103a5db.zip
chroot testing
Diffstat (limited to 'test/features/1.7.exp')
-rwxr-xr-xtest/features/1.7.exp81
1 files changed, 0 insertions, 81 deletions
diff --git a/test/features/1.7.exp b/test/features/1.7.exp
deleted file mode 100755
index b3264970d..000000000
--- a/test/features/1.7.exp
+++ /dev/null
@@ -1,81 +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# new /var/tmp
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 -- "touch /var/tmp/somefile\r"
19sleep 1
20send -- "firejail --noprofile\r"
21expect {
22 timeout {puts "TESTING ERROR 0\n";exit}
23 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
24}
25sleep 1
26
27send -- "ls -l /var/tmp/somefile | wc -l\r"
28expect {
29 timeout {puts "TESTING ERROR 1\n";exit}
30 "0"
31}
32after 100
33send -- "exit\r"
34sleep 1
35
36
37#
38# O
39#
40if { $overlay == "overlay" } {
41 send -- "firejail --noprofile --overlay\r"
42 expect {
43 timeout {puts "TESTING ERROR 2\n";exit}
44 "overlay option is not available" {puts "grsecurity\n"; exit}
45 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
46 }
47 sleep 1
48
49 send -- "ls -l /var/tmp/somefile | wc -l\r"
50 expect {
51 timeout {puts "TESTING ERROR 3\n";exit}
52 "0"
53 }
54 after 100
55 send -- "exit\r"
56 sleep 1
57}
58
59#
60# C
61#
62if { $chroot == "chroot" } {
63 send -- "firejail --noprofile --chroot=/tmp/chroot\r"
64 expect {
65 timeout {puts "TESTING ERROR 4\n";exit}
66 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
67 }
68 sleep 1
69
70 send -- "ls -l /var/tmp/somefile | wc -l\r"
71 expect {
72 timeout {puts "TESTING ERROR 5\n";exit}
73 "0"
74 }
75 after 100
76 send -- "exit\r"
77 sleep 1
78}
79
80
81puts "\nall done\n"