summaryrefslogtreecommitdiffstats
path: root/test/apps-x11/x11-none.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-11-13 10:47:20 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2016-11-13 10:47:20 -0500
commit63e16bfcd9f79c63f3801f51df4840f74fa6f41b (patch)
treefa62784ad7ff5becbb4856ed84264cb5d4de8828 /test/apps-x11/x11-none.exp
parentset_perms cleanup (diff)
downloadfirejail-63e16bfcd9f79c63f3801f51df4840f74fa6f41b.tar.gz
firejail-63e16bfcd9f79c63f3801f51df4840f74fa6f41b.tar.zst
firejail-63e16bfcd9f79c63f3801f51df4840f74fa6f41b.zip
major cleanup and testing
Diffstat (limited to 'test/apps-x11/x11-none.exp')
-rwxr-xr-xtest/apps-x11/x11-none.exp48
1 files changed, 48 insertions, 0 deletions
diff --git a/test/apps-x11/x11-none.exp b/test/apps-x11/x11-none.exp
new file mode 100755
index 000000000..e9908839b
--- /dev/null
+++ b/test/apps-x11/x11-none.exp
@@ -0,0 +1,48 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --name=test --x11=none\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "use network namespace in firejail"
14}
15sleep 1
16
17send -- "firejail --name=test --net=none --x11=none\r"
18expect {
19 timeout {puts "TESTING ERROR 1\n";exit}
20 "Child process initialized"
21}
22sleep 1
23
24send -- "ls -al /tmp/.X11-unix\r"
25expect {
26 timeout {puts "TESTING ERROR 2\n";exit}
27 "cannot open directory"
28}
29after 100
30
31send -- "xterm\r"
32expect {
33 timeout {puts "TESTING ERROR 3\n";exit}
34 "DISPLAY is not set"
35}
36after 100
37
38send -- "export DISPLAY=:0.0\r"
39after 100
40send -- "xterm\r"
41expect {
42 timeout {puts "TESTING ERROR 4\n";exit}
43 "Xt error"
44}
45after 100
46
47puts "\nall done\n"
48