aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-04-24 06:41:28 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-04-24 06:41:28 -0400
commit83f626d79489985152156eee6ecca52c7da8b5ba (patch)
treee4d982f6f451c2fed0a3a50deeb1616e611f3484 /test/utils
parenttesting (diff)
downloadfirejail-83f626d79489985152156eee6ecca52c7da8b5ba.tar.gz
firejail-83f626d79489985152156eee6ecca52c7da8b5ba.tar.zst
firejail-83f626d79489985152156eee6ecca52c7da8b5ba.zip
testing
Diffstat (limited to 'test/utils')
-rwxr-xr-xtest/utils/trace.exp18
-rwxr-xr-xtest/utils/trace2.exp25
-rwxr-xr-xtest/utils/utils.sh5
3 files changed, 23 insertions, 25 deletions
diff --git a/test/utils/trace.exp b/test/utils/trace.exp
index 21dd6a559..c08925101 100755
--- a/test/utils/trace.exp
+++ b/test/utils/trace.exp
@@ -1,4 +1,7 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3set timeout 30 6set timeout 30
4spawn $env(SHELL) 7spawn $env(SHELL)
@@ -90,5 +93,20 @@ expect {
90} 93}
91sleep 1 94sleep 1
92 95
96send -- "firejail --trace\r"
97expect {
98 timeout {puts "TESTING ERROR 0\n";exit}
99 "Child process initialized"
100}
101expect {
102 timeout {puts "TESTING ERROR 1\n";exit}
103 "bash:open /dev/tty" {puts "64bit\n"}
104 "bash:open64 /dev/tty" {puts "32bit\n"}
105}
106expect {
107 timeout {puts "TESTING ERROR 3\n";exit}
108 "bash:access /etc/terminfo/x/xterm" {puts "debian\n"}
109 "bash:access /usr/share/terminfo/x/xterm" {puts "arch\n"}
110}
93 111
94puts "\nall done\n" 112puts "\nall done\n"
diff --git a/test/utils/trace2.exp b/test/utils/trace2.exp
deleted file mode 100755
index 38038b58e..000000000
--- a/test/utils/trace2.exp
+++ /dev/null
@@ -1,25 +0,0 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail --trace\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Child process initialized"
11}
12expect {
13 timeout {puts "TESTING ERROR 1\n";exit}
14 "bash:open /dev/tty" {puts "64bit\n"}
15 "bash:open64 /dev/tty" {puts "32bit\n"}
16}
17expect {
18 timeout {puts "TESTING ERROR 3\n";exit}
19 "bash:access /etc/terminfo/x/xterm" {puts "debian\n"}
20 "bash:access /usr/share/terminfo/x/xterm" {puts "arch\n"}
21}
22
23sleep 1
24
25puts "\nall done\n"
diff --git a/test/utils/utils.sh b/test/utils/utils.sh
index 9a1b6601a..8c53feab3 100755
--- a/test/utils/utils.sh
+++ b/test/utils/utils.sh
@@ -64,3 +64,8 @@ echo "TESTING: join3 (test/utils/join3.exp)"
64echo "TESTING: join profile (test/utils/join-profile.exp)" 64echo "TESTING: join profile (test/utils/join-profile.exp)"
65./join-profile.exp 65./join-profile.exp
66 66
67echo "TESTING: trace (test/utils/trace.exp)"
68rm -f index.html*
69./trace.exp
70rm -f index.html*
71