From 94ad4edd5e41a26161fdf0c44f8a0dea77e3d120 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Thu, 17 Nov 2016 13:12:15 -0500 Subject: testing appimage --- test/appimage/appimage-v1.exp | 2 +- test/appimage/appimage.sh | 4 +++- test/appimage/filename.exp | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100755 test/appimage/filename.exp (limited to 'test/appimage') diff --git a/test/appimage/appimage-v1.exp b/test/appimage/appimage-v1.exp index 503da2b9b..f1c1c10f5 100755 --- a/test/appimage/appimage-v1.exp +++ b/test/appimage/appimage-v1.exp @@ -7,7 +7,7 @@ set timeout 10 spawn $env(SHELL) match_max 100000 -send -- "firejail --name=appimage-test --appimage Leafpad-0.8.17-x86_64.AppImage\r" +send -- "firejail --name=appimage-test --debug --appimage Leafpad-0.8.17-x86_64.AppImage\r" expect { timeout {puts "TESTING ERROR 1\n";exit} "Child process initialized" diff --git a/test/appimage/appimage.sh b/test/appimage/appimage.sh index 6a73d0a7e..db221ec8a 100755 --- a/test/appimage/appimage.sh +++ b/test/appimage/appimage.sh @@ -10,5 +10,7 @@ echo "TESTING: AppImage v1 (test/appimage/appimage-v1.exp)" ./appimage-v1.exp echo "TESTING: AppImage v2 (test/appimage/appimage-v2.exp)" -./appimage-v1.exp +./appimage-v2.exp +echo "TESTING: AppImage file name (test/appimage/filename.exp)"; +./filename.exp \ No newline at end of file diff --git a/test/appimage/filename.exp b/test/appimage/filename.exp new file mode 100755 index 000000000..ce8d70464 --- /dev/null +++ b/test/appimage/filename.exp @@ -0,0 +1,35 @@ +#!/usr/bin/expect -f +# This file is part of Firejail project +# Copyright (C) 2014-2016 Firejail Authors +# License GPL v2 + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +send -- "firejail --appimage \"bla;bla\"\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "is an invalid filename" +} +after 100 + +send -- "firejail --appimage /etc/shadow\r" +expect { + timeout {puts "TESTING ERROR 2\n";exit} + "cannot access" +} +after 100 + +send -- "firejail --appimage appimage.sh\r" +expect { + timeout {puts "TESTING ERROR 2\n";exit} + "Error mounting appimage" +} +after 100 + + + + +puts "\nall done\n" + -- cgit v1.2.3-54-g00ecf