aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2019-09-10 17:26:22 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2019-09-10 17:26:22 -0400
commit1df4bbba52854d2505bcd810e9e72b5e0980ebd3 (patch)
tree338ec49db125f7c37a8d004d77f2ffd12abedf1d /test
parentAdd ar profile (#2949) (diff)
downloadfirejail-1df4bbba52854d2505bcd810e9e72b5e0980ebd3.tar.gz
firejail-1df4bbba52854d2505bcd810e9e72b5e0980ebd3.tar.zst
firejail-1df4bbba52854d2505bcd810e9e72b5e0980ebd3.zip
appimage --trace testing
Diffstat (limited to 'test')
-rwxr-xr-xtest/appimage/appimage-args.exp2
-rwxr-xr-xtest/appimage/appimage-trace.exp68
-rwxr-xr-xtest/appimage/appimage-v1.exp2
-rwxr-xr-xtest/appimage/appimage-v2.exp2
-rwxr-xr-xtest/appimage/appimage.sh3
5 files changed, 74 insertions, 3 deletions
diff --git a/test/appimage/appimage-args.exp b/test/appimage/appimage-args.exp
index b8c7ee850..4c6a778b2 100755
--- a/test/appimage/appimage-args.exp
+++ b/test/appimage/appimage-args.exp
@@ -95,7 +95,7 @@ send -- "firejail --shutdown=appimage-test\r"
95 95
96set spawn_id $appimage_id 96set spawn_id $appimage_id
97expect { 97expect {
98 timeout {puts "TESTING ERROR 15\n";exit} 98 timeout {puts "shutdown\n";exit}
99 "AppImage unmounted" 99 "AppImage unmounted"
100} 100}
101 101
diff --git a/test/appimage/appimage-trace.exp b/test/appimage/appimage-trace.exp
new file mode 100755
index 000000000..574bd5a97
--- /dev/null
+++ b/test/appimage/appimage-trace.exp
@@ -0,0 +1,68 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2019 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9set appimage_id $spawn_id
10
11send -- "firejail --trace --timeout=00:00:05 --appimage Leafpad-0.8.17-x86_64.AppImage\r"
12expect {
13 timeout {puts "TESTING ERROR 1\n";exit}
14 "Child process initialized"
15}
16expect {
17 timeout {puts "TESTING ERROR 2\n";exit}
18 "leafpad:socket"
19}
20expect {
21 timeout {puts "TESTING ERROR 3\n";exit}
22 "leafpad:connect"
23}
24expect {
25 timeout {puts "TESTING ERROR 4\n";exit}
26 "X11-unix/X0"
27}
28expect {
29 timeout {puts "TESTING ERROR 5\n";exit}
30 "Parent is shutting down, bye"
31}
32expect {
33 timeout {puts "shutdown\n"}
34 "AppImage unmounted"
35}
36sleep 1
37
38send -- "firejail --trace --timeout=00:00:05 --appimage Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage\r"
39expect {
40 timeout {puts "TESTING ERROR 11\n";exit}
41 "Child process initialized"
42}
43expect {
44 timeout {puts "TESTING ERROR 12\n";exit}
45 "leafpad:socket"
46}
47expect {
48 timeout {puts "TESTING ERROR 13\n";exit}
49 "leafpad:connect"
50}
51expect {
52 timeout {puts "TESTING ERROR 14\n";exit}
53 "X11-unix/X0"
54}
55expect {
56 timeout {puts "TESTING ERROR 15\n";exit}
57 "Parent is shutting down, bye"
58}
59expect {
60 timeout {puts "shutdown\n"}
61 "AppImage unmounted"
62}
63sleep 1
64
65
66after 100
67
68puts "\nall done\n"
diff --git a/test/appimage/appimage-v1.exp b/test/appimage/appimage-v1.exp
index 07f7d0d17..4522afa9b 100755
--- a/test/appimage/appimage-v1.exp
+++ b/test/appimage/appimage-v1.exp
@@ -83,7 +83,7 @@ send -- "firejail --shutdown=appimage-test\r"
83 83
84set spawn_id $appimage_id 84set spawn_id $appimage_id
85expect { 85expect {
86 timeout {puts "TESTING ERROR 7\n";exit} 86 timeout {puts "shutdown\n"}
87 "AppImage unmounted" 87 "AppImage unmounted"
88} 88}
89 89
diff --git a/test/appimage/appimage-v2.exp b/test/appimage/appimage-v2.exp
index 7d3ba36c2..50466958d 100755
--- a/test/appimage/appimage-v2.exp
+++ b/test/appimage/appimage-v2.exp
@@ -82,7 +82,7 @@ spawn $env(SHELL)
82send -- "firejail --shutdown=appimage-test\r" 82send -- "firejail --shutdown=appimage-test\r"
83set spawn_id $appimage_id 83set spawn_id $appimage_id
84expect { 84expect {
85 timeout {puts "TESTING ERROR 7\n";exit} 85 timeout {puts "shutdown\n"}
86 "AppImage unmounted" 86 "AppImage unmounted"
87} 87}
88 88
diff --git a/test/appimage/appimage.sh b/test/appimage/appimage.sh
index bcd82750e..39c288199 100755
--- a/test/appimage/appimage.sh
+++ b/test/appimage/appimage.sh
@@ -17,3 +17,6 @@ echo "TESTING: AppImage file name (test/appimage/filename.exp)";
17 17
18echo "TESTING: AppImage argsv1 (test/appimage/appimage-args.exp)" 18echo "TESTING: AppImage argsv1 (test/appimage/appimage-args.exp)"
19./appimage-args.exp 19./appimage-args.exp
20
21echo "TESTING: AppImage trace (test/appimage/appimage-trace.exp)"
22./appimage-args.exp