diff options
author | netblue30 <netblue30@yahoo.com> | 2019-09-10 17:26:22 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2019-09-10 17:26:22 -0400 |
commit | 1df4bbba52854d2505bcd810e9e72b5e0980ebd3 (patch) | |
tree | 338ec49db125f7c37a8d004d77f2ffd12abedf1d | |
parent | Add ar profile (#2949) (diff) | |
download | firejail-1df4bbba52854d2505bcd810e9e72b5e0980ebd3.tar.gz firejail-1df4bbba52854d2505bcd810e9e72b5e0980ebd3.tar.zst firejail-1df4bbba52854d2505bcd810e9e72b5e0980ebd3.zip |
appimage --trace testing
-rwxr-xr-x | test/appimage/appimage-args.exp | 2 | ||||
-rwxr-xr-x | test/appimage/appimage-trace.exp | 68 | ||||
-rwxr-xr-x | test/appimage/appimage-v1.exp | 2 | ||||
-rwxr-xr-x | test/appimage/appimage-v2.exp | 2 | ||||
-rwxr-xr-x | test/appimage/appimage.sh | 3 |
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 | ||
96 | set spawn_id $appimage_id | 96 | set spawn_id $appimage_id |
97 | expect { | 97 | expect { |
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 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | set appimage_id $spawn_id | ||
10 | |||
11 | send -- "firejail --trace --timeout=00:00:05 --appimage Leafpad-0.8.17-x86_64.AppImage\r" | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 1\n";exit} | ||
14 | "Child process initialized" | ||
15 | } | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 2\n";exit} | ||
18 | "leafpad:socket" | ||
19 | } | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 3\n";exit} | ||
22 | "leafpad:connect" | ||
23 | } | ||
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 4\n";exit} | ||
26 | "X11-unix/X0" | ||
27 | } | ||
28 | expect { | ||
29 | timeout {puts "TESTING ERROR 5\n";exit} | ||
30 | "Parent is shutting down, bye" | ||
31 | } | ||
32 | expect { | ||
33 | timeout {puts "shutdown\n"} | ||
34 | "AppImage unmounted" | ||
35 | } | ||
36 | sleep 1 | ||
37 | |||
38 | send -- "firejail --trace --timeout=00:00:05 --appimage Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage\r" | ||
39 | expect { | ||
40 | timeout {puts "TESTING ERROR 11\n";exit} | ||
41 | "Child process initialized" | ||
42 | } | ||
43 | expect { | ||
44 | timeout {puts "TESTING ERROR 12\n";exit} | ||
45 | "leafpad:socket" | ||
46 | } | ||
47 | expect { | ||
48 | timeout {puts "TESTING ERROR 13\n";exit} | ||
49 | "leafpad:connect" | ||
50 | } | ||
51 | expect { | ||
52 | timeout {puts "TESTING ERROR 14\n";exit} | ||
53 | "X11-unix/X0" | ||
54 | } | ||
55 | expect { | ||
56 | timeout {puts "TESTING ERROR 15\n";exit} | ||
57 | "Parent is shutting down, bye" | ||
58 | } | ||
59 | expect { | ||
60 | timeout {puts "shutdown\n"} | ||
61 | "AppImage unmounted" | ||
62 | } | ||
63 | sleep 1 | ||
64 | |||
65 | |||
66 | after 100 | ||
67 | |||
68 | puts "\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 | ||
84 | set spawn_id $appimage_id | 84 | set spawn_id $appimage_id |
85 | expect { | 85 | expect { |
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) | |||
82 | send -- "firejail --shutdown=appimage-test\r" | 82 | send -- "firejail --shutdown=appimage-test\r" |
83 | set spawn_id $appimage_id | 83 | set spawn_id $appimage_id |
84 | expect { | 84 | expect { |
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 | ||
18 | echo "TESTING: AppImage argsv1 (test/appimage/appimage-args.exp)" | 18 | echo "TESTING: AppImage argsv1 (test/appimage/appimage-args.exp)" |
19 | ./appimage-args.exp | 19 | ./appimage-args.exp |
20 | |||
21 | echo "TESTING: AppImage trace (test/appimage/appimage-trace.exp)" | ||
22 | ./appimage-args.exp | ||