diff options
Diffstat (limited to 'test/utils')
-rwxr-xr-x | test/utils/trace.exp | 18 | ||||
-rwxr-xr-x | test/utils/trace2.exp | 25 | ||||
-rwxr-xr-x | test/utils/utils.sh | 5 |
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 | ||
3 | set timeout 30 | 6 | set timeout 30 |
4 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
@@ -90,5 +93,20 @@ expect { | |||
90 | } | 93 | } |
91 | sleep 1 | 94 | sleep 1 |
92 | 95 | ||
96 | send -- "firejail --trace\r" | ||
97 | expect { | ||
98 | timeout {puts "TESTING ERROR 0\n";exit} | ||
99 | "Child process initialized" | ||
100 | } | ||
101 | expect { | ||
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 | } | ||
106 | expect { | ||
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 | ||
94 | puts "\nall done\n" | 112 | puts "\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 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail --trace\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 0\n";exit} | ||
10 | "Child process initialized" | ||
11 | } | ||
12 | expect { | ||
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 | } | ||
17 | expect { | ||
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 | |||
23 | sleep 1 | ||
24 | |||
25 | puts "\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)" | |||
64 | echo "TESTING: join profile (test/utils/join-profile.exp)" | 64 | echo "TESTING: join profile (test/utils/join-profile.exp)" |
65 | ./join-profile.exp | 65 | ./join-profile.exp |
66 | 66 | ||
67 | echo "TESTING: trace (test/utils/trace.exp)" | ||
68 | rm -f index.html* | ||
69 | ./trace.exp | ||
70 | rm -f index.html* | ||
71 | |||