aboutsummaryrefslogtreecommitdiffstats
path: root/test/environment
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-11-19 07:10:51 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2016-11-19 07:10:51 -0500
commit1c539a83dd277a7627af995f90565dadc73872a2 (patch)
tree493b6338c165354e9d6fd983542d700ad01c041e /test/environment
parentMerge pull request #916 from valoq/master (diff)
downloadfirejail-1c539a83dd277a7627af995f90565dadc73872a2.tar.gz
firejail-1c539a83dd277a7627af995f90565dadc73872a2.tar.zst
firejail-1c539a83dd277a7627af995f90565dadc73872a2.zip
testing
Diffstat (limited to 'test/environment')
-rwxr-xr-xtest/environment/environment.sh11
-rwxr-xr-xtest/environment/ibus.exp28
2 files changed, 39 insertions, 0 deletions
diff --git a/test/environment/environment.sh b/test/environment/environment.sh
index 5c4d49331..c2a6c435a 100755
--- a/test/environment/environment.sh
+++ b/test/environment/environment.sh
@@ -6,6 +6,7 @@
6export MALLOC_CHECK_=3 6export MALLOC_CHECK_=3
7export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) 7export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
8 8
9
9echo "TESTING: DNS (test/environment/dns.exp)" 10echo "TESTING: DNS (test/environment/dns.exp)"
10./dns.exp 11./dns.exp
11 12
@@ -85,3 +86,13 @@ else
85 echo "TESTING SKIP: strace not found" 86 echo "TESTING SKIP: strace not found"
86fi 87fi
87 88
89# to install ibus:
90# $ sudo apt-get install ibus-table-array30
91# $ ibus-setup
92
93find ~/.config/ibus/bus | grep unix-0
94if [ "$?" -eq 0 ];
95then
96 echo "TESTING: ibus (test/environment/ibus.exp)"
97 ./ibus.exp
98fi
diff --git a/test/environment/ibus.exp b/test/environment/ibus.exp
new file mode 100755
index 000000000..4344011a6
--- /dev/null
+++ b/test/environment/ibus.exp
@@ -0,0 +1,28 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4cd /home
5spawn $env(SHELL)
6match_max 100000
7
8send -- "firejail\r"
9expect {
10 timeout {puts "TESTING ERROR 0\n";exit}
11 "Child process initialized"
12}
13after 100
14
15send -- "env | grep IBUS\r"
16expect {
17 timeout {puts "TESTING ERROR 1\n";exit}
18 "IBUS_ADDRESS"
19}
20expect {
21 timeout {puts "TESTING ERROR 2\n";exit}
22 "IBUS_DAEMON_PID"
23}
24after 100
25
26
27puts "\nall done\n"
28