aboutsummaryrefslogtreecommitdiffstats
path: root/test/private-lib/private-lib.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@protonmail.com>2023-01-12 11:33:47 -0500
committerLibravatar netblue30 <netblue30@protonmail.com>2023-01-12 11:33:47 -0500
commit2d0d9a4080a5fd54c4914227843ae3e609bad1cb (patch)
tree1c69de02e21b42a652bad4a650b259635dd7ccdf /test/private-lib/private-lib.exp
parentgeary: fix opening hyperlinks via D-Bus (#5565) (diff)
downloadfirejail-2d0d9a4080a5fd54c4914227843ae3e609bad1cb.tar.gz
firejail-2d0d9a4080a5fd54c4914227843ae3e609bad1cb.tar.zst
firejail-2d0d9a4080a5fd54c4914227843ae3e609bad1cb.zip
rel 0.9.72 testing: cleanup make test-private-lib
Diffstat (limited to 'test/private-lib/private-lib.exp')
-rwxr-xr-xtest/private-lib/private-lib.exp48
1 files changed, 48 insertions, 0 deletions
diff --git a/test/private-lib/private-lib.exp b/test/private-lib/private-lib.exp
new file mode 100755
index 000000000..5290def35
--- /dev/null
+++ b/test/private-lib/private-lib.exp
@@ -0,0 +1,48 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2
5
6
7set timeout 10
8spawn $env(SHELL)
9match_max 100000
10
11send -- "firejail --private-lib --private-bin=sh,bash,dash,ps,grep,ls,find,echo,stty \r"
12expect {
13 timeout {puts "TESTING ERROR 1\n";exit}
14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15}
16after 100
17send -- "stty -echo\r"
18after 100
19
20send -- "cd /bin; find .\; echo done\r"
21expect {
22 timeout {puts "TESTING ERROR 2\n";exit}
23# "grep" {puts "TESTING ERROR 3\n";exit}
24 "rm" {puts "TESTING ERROR 3\n";exit}
25 "cp" {puts "TESTING ERROR 4\n";exit}
26 "done"
27}
28after 100
29
30send -- "cd /lib; find .\r"
31expect {
32 timeout {puts "TESTING ERROR 5\n";exit}
33 "./modules" {puts "TESTING ERROR 6\n";exit}
34 "./firmware" {puts "TESTING ERROR 7\n";exit}
35 "libc.so"
36}
37after 100
38
39send -- "cd /usr/lib; find .\r"
40expect {
41 timeout {puts "TESTING ERROR 8\n";exit}
42 "grub" {puts "TESTING ERROR 9\n";exit}
43 "mozilla" {puts "TESTING ERROR 10\n";exit}
44 "libdl.so"
45}
46after 100
47
48puts "\nall done\n"