From 118afb4479662881160b96b0cdfa2f07825ae910 Mon Sep 17 00:00:00 2001 From: Reiner Herrmann Date: Sat, 25 Mar 2017 12:44:45 +0100 Subject: Use thunderbird instead of icedove for testing Thunderbird is back in Debian, and Icedove is gone. Tests will then also run in more distributions. --- test/apps-x11-xorg/apps-x11-xorg.sh | 8 ++-- test/apps-x11-xorg/icedove.exp | 86 ------------------------------------- test/apps-x11-xorg/thunderbird.exp | 86 +++++++++++++++++++++++++++++++++++++ test/apps-x11/apps-x11.sh | 8 ++-- test/apps-x11/icedove.exp | 86 ------------------------------------- test/apps-x11/thunderbird.exp | 86 +++++++++++++++++++++++++++++++++++++ test/apps/apps.sh | 8 ++-- test/apps/icedove.exp | 84 ------------------------------------ test/apps/thunderbird.exp | 84 ++++++++++++++++++++++++++++++++++++ 9 files changed, 268 insertions(+), 268 deletions(-) delete mode 100755 test/apps-x11-xorg/icedove.exp create mode 100755 test/apps-x11-xorg/thunderbird.exp delete mode 100755 test/apps-x11/icedove.exp create mode 100755 test/apps-x11/thunderbird.exp delete mode 100755 test/apps/icedove.exp create mode 100755 test/apps/thunderbird.exp (limited to 'test') diff --git a/test/apps-x11-xorg/apps-x11-xorg.sh b/test/apps-x11-xorg/apps-x11-xorg.sh index d39d8390e..7d1d681ab 100755 --- a/test/apps-x11-xorg/apps-x11-xorg.sh +++ b/test/apps-x11-xorg/apps-x11-xorg.sh @@ -24,12 +24,12 @@ else echo "TESTING SKIP: transmission-gtk not found" fi -which icedove +which thunderbird if [ "$?" -eq 0 ]; then - echo "TESTING: icedove x11 xorg" - ./icedove.exp + echo "TESTING: thunderbird x11 xorg" + ./thunderbird.exp else - echo "TESTING SKIP: icedove not found" + echo "TESTING SKIP: thunderbird not found" fi diff --git a/test/apps-x11-xorg/icedove.exp b/test/apps-x11-xorg/icedove.exp deleted file mode 100755 index 8f6722cd7..000000000 --- a/test/apps-x11-xorg/icedove.exp +++ /dev/null @@ -1,86 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2017 Firejail Authors -# License GPL v2 - -set timeout 10 -spawn $env(SHELL) -match_max 100000 - -send -- "firejail --name=test --x11=xorg --ignore=net --ignore=netfilter --ignore=iprange icedove\r" -sleep 10 - -spawn $env(SHELL) -send -- "firejail --list\r" -expect { - timeout {puts "TESTING ERROR 3\n";exit} - ":firejail" -} -expect { - timeout {puts "TESTING ERROR 3.1\n";exit} - "icedove" -} -sleep 1 - -# grsecurity exit -send -- "file /proc/sys/kernel/grsecurity\r" -expect { - timeout {puts "TESTING ERROR - grsecurity detection\n";exit} - "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit} - "cannot open" {puts "grsecurity not present\n"} -} - -send -- "firejail --name=blablabla\r" -expect { - timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" -} -sleep 2 - -spawn $env(SHELL) -send -- "firemon --seccomp --nowrap\r" -expect { - timeout {puts "TESTING ERROR 5\n";exit} - "need to be root" {puts "/proc mounted as hidepid, exiting...\n"; exit} - ":firejail" -} -expect { - timeout {puts "TESTING ERROR 5.0\n";exit} - "icedove" -} -expect { - timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} - "Seccomp: 2" -} -expect { - timeout {puts "TESTING ERROR 5.1\n";exit} - "name=blablabla" -} -sleep 2 -send -- "firemon --caps --nowrap\r" -expect { - timeout {puts "TESTING ERROR 6\n";exit} - ":firejail" -} -expect { - timeout {puts "TESTING ERROR 6.0\n";exit} - "icedove" -} -expect { - timeout {puts "TESTING ERROR 6.1\n";exit} - "CapBnd" -} -expect { - timeout {puts "TESTING ERROR 6.2\n";exit} - "0000000000000000" -} -expect { - timeout {puts "TESTING ERROR 6.3\n";exit} - "name=blablabla" -} -sleep 1 -send -- "firejail --shutdown=test\r" -sleep 3 - -puts "\nall done\n" - diff --git a/test/apps-x11-xorg/thunderbird.exp b/test/apps-x11-xorg/thunderbird.exp new file mode 100755 index 000000000..1626c732b --- /dev/null +++ b/test/apps-x11-xorg/thunderbird.exp @@ -0,0 +1,86 @@ +#!/usr/bin/expect -f +# This file is part of Firejail project +# Copyright (C) 2014-2017 Firejail Authors +# License GPL v2 + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +send -- "firejail --name=test --x11=xorg --ignore=net --ignore=netfilter --ignore=iprange thunderbird\r" +sleep 10 + +spawn $env(SHELL) +send -- "firejail --list\r" +expect { + timeout {puts "TESTING ERROR 3\n";exit} + ":firejail" +} +expect { + timeout {puts "TESTING ERROR 3.1\n";exit} + "thunderbird" +} +sleep 1 + +# grsecurity exit +send -- "file /proc/sys/kernel/grsecurity\r" +expect { + timeout {puts "TESTING ERROR - grsecurity detection\n";exit} + "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit} + "cannot open" {puts "grsecurity not present\n"} +} + +send -- "firejail --name=blablabla\r" +expect { + timeout {puts "TESTING ERROR 4\n";exit} + "Child process initialized" +} +sleep 2 + +spawn $env(SHELL) +send -- "firemon --seccomp --nowrap\r" +expect { + timeout {puts "TESTING ERROR 5\n";exit} + "need to be root" {puts "/proc mounted as hidepid, exiting...\n"; exit} + ":firejail" +} +expect { + timeout {puts "TESTING ERROR 5.0\n";exit} + "thunderbird" +} +expect { + timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} + "Seccomp: 2" +} +expect { + timeout {puts "TESTING ERROR 5.1\n";exit} + "name=blablabla" +} +sleep 2 +send -- "firemon --caps --nowrap\r" +expect { + timeout {puts "TESTING ERROR 6\n";exit} + ":firejail" +} +expect { + timeout {puts "TESTING ERROR 6.0\n";exit} + "thunderbird" +} +expect { + timeout {puts "TESTING ERROR 6.1\n";exit} + "CapBnd" +} +expect { + timeout {puts "TESTING ERROR 6.2\n";exit} + "0000000000000000" +} +expect { + timeout {puts "TESTING ERROR 6.3\n";exit} + "name=blablabla" +} +sleep 1 +send -- "firejail --shutdown=test\r" +sleep 3 + +puts "\nall done\n" + diff --git a/test/apps-x11/apps-x11.sh b/test/apps-x11/apps-x11.sh index 739a94f2e..965f1a56b 100755 --- a/test/apps-x11/apps-x11.sh +++ b/test/apps-x11/apps-x11.sh @@ -77,12 +77,12 @@ else echo "TESTING SKIP: transmission-gtk not found" fi -which icedove +which thunderbird if [ "$?" -eq 0 ]; then - echo "TESTING: icedove x11" - ./icedove.exp + echo "TESTING: thunderbird x11" + ./thunderbird.exp else - echo "TESTING SKIP: icedove not found" + echo "TESTING SKIP: thunderbird not found" fi diff --git a/test/apps-x11/icedove.exp b/test/apps-x11/icedove.exp deleted file mode 100755 index f81d814a7..000000000 --- a/test/apps-x11/icedove.exp +++ /dev/null @@ -1,86 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2017 Firejail Authors -# License GPL v2 - -set timeout 10 -spawn $env(SHELL) -match_max 100000 - -send -- "firejail --name=test --x11 icedove\r" -sleep 10 - -spawn $env(SHELL) -send -- "firejail --list\r" -expect { - timeout {puts "TESTING ERROR 3\n";exit} - ":firejail" -} -expect { - timeout {puts "TESTING ERROR 3.1\n";exit} - "icedove" -} -sleep 1 - -# grsecurity exit -send -- "file /proc/sys/kernel/grsecurity\r" -expect { - timeout {puts "TESTING ERROR - grsecurity detection\n";exit} - "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit} - "cannot open" {puts "grsecurity not present\n"} -} - -send -- "firejail --name=blablabla\r" -expect { - timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" -} -sleep 2 - -spawn $env(SHELL) -send -- "firemon --seccomp\r" -expect { - timeout {puts "TESTING ERROR 5\n";exit} - "need to be root" {puts "/proc mounted as hidepid, exiting...\n"; exit} - ":firejail" -} -expect { - timeout {puts "TESTING ERROR 5.0\n";exit} - "icedove" -} -expect { - timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} - "Seccomp: 2" -} -expect { - timeout {puts "TESTING ERROR 5.1\n";exit} - "name=blablabla" -} -sleep 2 -send -- "firemon --caps\r" -expect { - timeout {puts "TESTING ERROR 6\n";exit} - ":firejail" -} -expect { - timeout {puts "TESTING ERROR 6.0\n";exit} - "icedove" -} -expect { - timeout {puts "TESTING ERROR 6.1\n";exit} - "CapBnd" -} -expect { - timeout {puts "TESTING ERROR 6.2\n";exit} - "0000000000000000" -} -expect { - timeout {puts "TESTING ERROR 6.3\n";exit} - "name=blablabla" -} -sleep 1 -send -- "firejail --shutdown=test\r" -sleep 3 - -puts "\nall done\n" - diff --git a/test/apps-x11/thunderbird.exp b/test/apps-x11/thunderbird.exp new file mode 100755 index 000000000..060b5a760 --- /dev/null +++ b/test/apps-x11/thunderbird.exp @@ -0,0 +1,86 @@ +#!/usr/bin/expect -f +# This file is part of Firejail project +# Copyright (C) 2014-2017 Firejail Authors +# License GPL v2 + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +send -- "firejail --name=test --x11 thunderbird\r" +sleep 10 + +spawn $env(SHELL) +send -- "firejail --list\r" +expect { + timeout {puts "TESTING ERROR 3\n";exit} + ":firejail" +} +expect { + timeout {puts "TESTING ERROR 3.1\n";exit} + "thunderbird" +} +sleep 1 + +# grsecurity exit +send -- "file /proc/sys/kernel/grsecurity\r" +expect { + timeout {puts "TESTING ERROR - grsecurity detection\n";exit} + "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit} + "cannot open" {puts "grsecurity not present\n"} +} + +send -- "firejail --name=blablabla\r" +expect { + timeout {puts "TESTING ERROR 4\n";exit} + "Child process initialized" +} +sleep 2 + +spawn $env(SHELL) +send -- "firemon --seccomp\r" +expect { + timeout {puts "TESTING ERROR 5\n";exit} + "need to be root" {puts "/proc mounted as hidepid, exiting...\n"; exit} + ":firejail" +} +expect { + timeout {puts "TESTING ERROR 5.0\n";exit} + "thunderbird" +} +expect { + timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} + "Seccomp: 2" +} +expect { + timeout {puts "TESTING ERROR 5.1\n";exit} + "name=blablabla" +} +sleep 2 +send -- "firemon --caps\r" +expect { + timeout {puts "TESTING ERROR 6\n";exit} + ":firejail" +} +expect { + timeout {puts "TESTING ERROR 6.0\n";exit} + "thunderbird" +} +expect { + timeout {puts "TESTING ERROR 6.1\n";exit} + "CapBnd" +} +expect { + timeout {puts "TESTING ERROR 6.2\n";exit} + "0000000000000000" +} +expect { + timeout {puts "TESTING ERROR 6.3\n";exit} + "name=blablabla" +} +sleep 1 +send -- "firejail --shutdown=test\r" +sleep 3 + +puts "\nall done\n" + diff --git a/test/apps/apps.sh b/test/apps/apps.sh index 4b7afe1a9..fc04f188b 100755 --- a/test/apps/apps.sh +++ b/test/apps/apps.sh @@ -106,13 +106,13 @@ else echo "TESTING SKIP: gthumb not found" fi -which icedove +which thunderbird if [ "$?" -eq 0 ]; then - echo "TESTING: icedove" - ./icedove.exp + echo "TESTING: thunderbird" + ./thunderbird.exp else - echo "TESTING SKIP: icedove not found" + echo "TESTING SKIP: thunderbird not found" fi which vlc diff --git a/test/apps/icedove.exp b/test/apps/icedove.exp deleted file mode 100755 index 1acb59112..000000000 --- a/test/apps/icedove.exp +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2017 Firejail Authors -# License GPL v2 - -set timeout 10 -spawn $env(SHELL) -match_max 100000 - -send -- "firejail icedove\r" -expect { - timeout {puts "TESTING ERROR 0\n";exit} - "Reading profile /etc/firejail/icedove.profile" -} -expect { - timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" -} -sleep 5 - -spawn $env(SHELL) -send -- "firejail --list\r" -expect { - timeout {puts "TESTING ERROR 3\n";exit} - ":firejail" -} -expect { - timeout {puts "TESTING ERROR 3.1\n";exit} - "icedove" -} -after 100 - -# grsecurity exit -send -- "file /proc/sys/kernel/grsecurity\r" -expect { - timeout {puts "TESTING ERROR - grsecurity detection\n";exit} - "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit} - "cannot open" {puts "grsecurity not present\n"} -} - -send -- "firejail --name=blablabla\r" -expect { - timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" -} -sleep 2 - -spawn $env(SHELL) -send -- "firemon --seccomp\r" -expect { - timeout {puts "TESTING ERROR 5\n";exit} - "need to be root" {puts "/proc mounted as hidepid, exiting...\n"; exit} - ":firejail icedove" -} -expect { - timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} - "Seccomp: 2" -} -expect { - timeout {puts "TESTING ERROR 5.1\n";exit} - "name=blablabla" -} -after 100 -send -- "firemon --caps\r" -expect { - timeout {puts "TESTING ERROR 6\n";exit} - ":firejail icedove" -} -expect { - timeout {puts "TESTING ERROR 6.1\n";exit} - "CapBnd:" -} -expect { - timeout {puts "TESTING ERROR 6.2\n";exit} - "0000000000000000" -} -expect { - timeout {puts "TESTING ERROR 6.3\n";exit} - "name=blablabla" -} -after 100 - -puts "\nall done\n" - diff --git a/test/apps/thunderbird.exp b/test/apps/thunderbird.exp new file mode 100755 index 000000000..16b0dc60e --- /dev/null +++ b/test/apps/thunderbird.exp @@ -0,0 +1,84 @@ +#!/usr/bin/expect -f +# This file is part of Firejail project +# Copyright (C) 2014-2017 Firejail Authors +# License GPL v2 + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +send -- "firejail thunderbird\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Reading profile /etc/firejail/thunderbird.profile" +} +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "Child process initialized" +} +sleep 5 + +spawn $env(SHELL) +send -- "firejail --list\r" +expect { + timeout {puts "TESTING ERROR 3\n";exit} + ":firejail" +} +expect { + timeout {puts "TESTING ERROR 3.1\n";exit} + "thunderbird" +} +after 100 + +# grsecurity exit +send -- "file /proc/sys/kernel/grsecurity\r" +expect { + timeout {puts "TESTING ERROR - grsecurity detection\n";exit} + "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit} + "cannot open" {puts "grsecurity not present\n"} +} + +send -- "firejail --name=blablabla\r" +expect { + timeout {puts "TESTING ERROR 4\n";exit} + "Child process initialized" +} +sleep 2 + +spawn $env(SHELL) +send -- "firemon --seccomp\r" +expect { + timeout {puts "TESTING ERROR 5\n";exit} + "need to be root" {puts "/proc mounted as hidepid, exiting...\n"; exit} + ":firejail thunderbird" +} +expect { + timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} + "Seccomp: 2" +} +expect { + timeout {puts "TESTING ERROR 5.1\n";exit} + "name=blablabla" +} +after 100 +send -- "firemon --caps\r" +expect { + timeout {puts "TESTING ERROR 6\n";exit} + ":firejail thunderbird" +} +expect { + timeout {puts "TESTING ERROR 6.1\n";exit} + "CapBnd:" +} +expect { + timeout {puts "TESTING ERROR 6.2\n";exit} + "0000000000000000" +} +expect { + timeout {puts "TESTING ERROR 6.3\n";exit} + "name=blablabla" +} +after 100 + +puts "\nall done\n" + -- cgit v1.2.3-54-g00ecf