From 396eb2ec7c99ca8b14be04bcce94984a1237c314 Mon Sep 17 00:00:00 2001 From: Reiner Herrmann Date: Mon, 1 Mar 2021 20:44:31 +0100 Subject: tests: also remove arguments tests which also depend on faudit --- test/arguments/arguments.sh | 30 --------------- test/arguments/bashrun.exp | 89 ------------------------------------------- test/arguments/bashrun.sh | 25 ------------ test/arguments/joinrun.exp | 92 -------------------------------------------- test/arguments/joinrun.sh | 25 ------------ test/arguments/outrun.exp | 93 --------------------------------------------- test/arguments/outrun.sh | 25 ------------ test/arguments/symrun.exp | 74 ------------------------------------ test/arguments/symrun.sh | 34 ----------------- 9 files changed, 487 deletions(-) delete mode 100755 test/arguments/arguments.sh delete mode 100755 test/arguments/bashrun.exp delete mode 100755 test/arguments/bashrun.sh delete mode 100755 test/arguments/joinrun.exp delete mode 100755 test/arguments/joinrun.sh delete mode 100755 test/arguments/outrun.exp delete mode 100755 test/arguments/outrun.sh delete mode 100755 test/arguments/symrun.exp delete mode 100755 test/arguments/symrun.sh (limited to 'test') diff --git a/test/arguments/arguments.sh b/test/arguments/arguments.sh deleted file mode 100755 index 749e1b500..000000000 --- a/test/arguments/arguments.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -# This file is part of Firejail project -# Copyright (C) 2014-2021 Firejail Authors -# License GPL v2 - -export LC_ALL=C - -if [ -f /etc/debian_version ]; then - libdir=$(dirname "$(dpkg -L firejail | grep fcopy)") - export PATH="$PATH:$libdir" -fi -export PATH="$PATH:/usr/lib/firejail:/usr/lib64/firejail" - -echo "TESTING: 1. regular bash session" -./bashrun.exp -sleep 1 - -echo "TESTING: 2. symbolic link to firejail" -./symrun.exp -rm -fr symtest -sleep 1 - -echo "TESTING: 3. --join option" -./joinrun.exp -sleep 1 - -echo "TESTING: 4. --output option" -./outrun.exp -rm out -rm out.* diff --git a/test/arguments/bashrun.exp b/test/arguments/bashrun.exp deleted file mode 100755 index 22c38bd4c..000000000 --- a/test/arguments/bashrun.exp +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2021 Firejail Authors -# License GPL v2 - -set timeout 10 -spawn $env(SHELL) -match_max 100000 - -send -- "./bashrun.sh\r" -expect { - timeout {puts "TESTING ERROR 1.1.1\n";exit} - "Arguments:" -} -expect { - timeout {puts "TESTING ERROR 1.1.2\n";exit} - "#arg1#" -} -expect { - timeout {puts "TESTING ERROR 1.1.3\n";exit} - "#arg2#" -} - -expect { - timeout {puts "TESTING ERROR 1.2.1\n";exit} - "Arguments:" -} -expect { - timeout {puts "TESTING ERROR 1.2.2\n";exit} - "#arg1 tail#" -} -expect { - timeout {puts "TESTING ERROR 1.2.3\n";exit} - "#arg2 tail#" -} - -expect { - timeout {puts "TESTING ERROR 1.3.1\n";exit} - "Arguments:" -} -expect { - timeout {puts "TESTING ERROR 1.3.2\n";exit} - "#arg1 tail#" -} -expect { - timeout {puts "TESTING ERROR 1.3.3\n";exit} - "#arg2 tail#" -} - -expect { - timeout {puts "TESTING ERROR 1.4.1\n";exit} - "Arguments:" -} -expect { - timeout {puts "TESTING ERROR 1.4.2\n";exit} - "#arg1 tail#" -} -expect { - timeout {puts "TESTING ERROR 1.4.3\n";exit} - "#arg2 tail#" -} - -expect { - timeout {puts "TESTING ERROR 1.5.1\n";exit} - "Arguments:" -} -expect { - timeout {puts "TESTING ERROR 1.5.2\n";exit} - "#arg1&tail#" -} -expect { - timeout {puts "TESTING ERROR 1.5.3\n";exit} - "#arg2&tail#" -} - -expect { - timeout {puts "TESTING ERROR 1.6.1\n";exit} - "Arguments:" -} -expect { - timeout {puts "TESTING ERROR 1.6.2\n";exit} - "#arg1&tail#" -} -expect { - timeout {puts "TESTING ERROR 1.6.3\n";exit} - "#arg2&tail#" -} - -puts "\nall done\n" diff --git a/test/arguments/bashrun.sh b/test/arguments/bashrun.sh deleted file mode 100755 index ba4118cdd..000000000 --- a/test/arguments/bashrun.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -# This file is part of Firejail project -# Copyright (C) 2014-2021 Firejail Authors -# License GPL v2 - -echo "TESTING: 1.1 - simple args" -firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --quiet faudit arg1 arg2 - -# simple quotes, testing spaces in file names -echo "TESTING: 1.2 - args with space and \"" -firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --quiet faudit "arg1 tail" "arg2 tail" - -echo "TESTING: 1.3 - args with space and '" -firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --quiet faudit 'arg1 tail' 'arg2 tail' - -# escaped space in file names -echo "TESTING: 1.4 - args with space and \\" -firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --quiet faudit arg1\ tail arg2\ tail - -# & char appears in URLs - URLs should be quoted -echo "TESTING: 1.5 - args with & and \"" -firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --quiet faudit "arg1&tail" "arg2&tail" - -echo "TESTING: 1.6 - args with & and '" -firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --quiet faudit 'arg1&tail' 'arg2&tail' diff --git a/test/arguments/joinrun.exp b/test/arguments/joinrun.exp deleted file mode 100755 index 6095f0e55..000000000 --- a/test/arguments/joinrun.exp +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2021 Firejail Authors -# License GPL v2 - -set timeout 10 -spawn $env(SHELL) -match_max 100000 - - -send -- "firejail --name=joinrun\r" -sleep 2 - -spawn $env(SHELL) -send -- "./joinrun.sh\r" -expect { - timeout {puts "TESTING ERROR 3.1.1\n";exit} - "Arguments:" -} -expect { - timeout {puts "TESTING ERROR 3.1.2\n";exit} - "#arg1#" -} -expect { - timeout {puts "TESTING ERROR 3.1.3\n";exit} - "#arg2#" -} - -expect { - timeout {puts "TESTING ERROR 3.2.1\n";exit} - "Arguments:" -} -expect { - timeout {puts "TESTING ERROR 3.2.2\n";exit} - "#arg1 tail#" -} -expect { - timeout {puts "TESTING ERROR 3.2.3\n";exit} - "#arg2 tail#" -} -expect { - timeout {puts "TESTING ERROR 3.3.1\n";exit} - "Arguments:" -} -expect { - timeout {puts "TESTING ERROR 3.3.2\n";exit} - "#arg1 tail#" -} -expect { - timeout {puts "TESTING ERROR 3.3.3\n";exit} - "#arg2 tail#" -} -expect { - timeout {puts "TESTING ERROR 3.4.1\n";exit} - "Arguments:" -} -expect { - timeout {puts "TESTING ERROR 3.4.2\n";exit} - "#arg1 tail#" -} -expect { - timeout {puts "TESTING ERROR 3.4.3\n";exit} - "#arg2 tail#" -} - -expect { - timeout {puts "TESTING ERROR 3.5.1\n";exit} - "Arguments:" -} -expect { - timeout {puts "TESTING ERROR 3.5.2\n";exit} - "#arg1&tail#" -} -expect { - timeout {puts "TESTING ERROR 3.5.3\n";exit} - "#arg2&tail#" -} - -expect { - timeout {puts "TESTING ERROR 3.6.1\n";exit} - "Arguments:" -} -expect { - timeout {puts "TESTING ERROR 3.6.2\n";exit} - "#arg1&tail#" -} -expect { - timeout {puts "TESTING ERROR 3.6.3\n";exit} - "#arg2&tail#" -} - -puts "\nall done\n" diff --git a/test/arguments/joinrun.sh b/test/arguments/joinrun.sh deleted file mode 100755 index c929f0879..000000000 --- a/test/arguments/joinrun.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -# This file is part of Firejail project -# Copyright (C) 2014-2021 Firejail Authors -# License GPL v2 - -echo "TESTING: 3.1 - simple args" -firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --join=joinrun faudit arg1 arg2 - -# simple quotes, testing spaces in file names -echo "TESTING: 3.2 - args with space and \"" -firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --join=joinrun faudit "arg1 tail" "arg2 tail" - -echo "TESTING: 3.3 - args with space and '" -firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --join=joinrun faudit 'arg1 tail' 'arg2 tail' - -# escaped space in file names -echo "TESTING: 3.4 - args with space and \\" -firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --join=joinrun faudit arg1\ tail arg2\ tail - -# & char appears in URLs - URLs should be quoted -echo "TESTING: 3.5 - args with & and \"" -firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --join=joinrun faudit "arg1&tail" "arg2&tail" - -echo "TESTING: 3.6 - args with & and '" -firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --join=joinrun faudit 'arg1&tail' 'arg2&tail' diff --git a/test/arguments/outrun.exp b/test/arguments/outrun.exp deleted file mode 100755 index e727d44fb..000000000 --- a/test/arguments/outrun.exp +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2021 Firejail Authors -# License GPL v2 - -set timeout 10 -spawn $env(SHELL) -match_max 100000 - -send -- "./outrun.sh\r" -expect { - timeout {puts "TESTING ERROR 4.1.1\n";exit} - "Arguments:" -} -expect { - timeout {puts "TESTING ERROR 4.1.2\n";exit} - "#arg1#" -} -expect { - timeout {puts "TESTING ERROR 4.1.3\n";exit} - "#arg2#" -} - -exit -#*************************************************** -# breaking down from here on - bug to fix -#*************************************************** -expect { - timeout {puts "TESTING ERROR 4.2.1\n";exit} - "Arguments:" -} -expect { - timeout {puts "TESTING ERROR 4.2.2\n";exit} - "#arg1 tail#" -} -expect { - timeout {puts "TESTING ERROR 4.2.3\n";exit} - "#arg2 tail#" -} - -expect { - timeout {puts "TESTING ERROR 4.3.1\n";exit} - "Arguments:" -} -expect { - timeout {puts "TESTING ERROR 4.3.2\n";exit} - "#arg1 tail#" -} -expect { - timeout {puts "TESTING ERROR 4.3.3\n";exit} - "#arg2 tail#" -} - -expect { - timeout {puts "TESTING ERROR 4.4.1\n";exit} - "Arguments:" -} -expect { - timeout {puts "TESTING ERROR 4.4.2\n";exit} - "#arg1 tail#" -} -expect { - timeout {puts "TESTING ERROR 4.4.3\n";exit} - "#arg2 tail#" -} - -expect { - timeout {puts "TESTING ERROR 4.5.1\n";exit} - "Arguments:" -} -expect { - timeout {puts "TESTING ERROR 4.5.2\n";exit} - "#arg1&tail#" -} -expect { - timeout {puts "TESTING ERROR 4.5.3\n";exit} - "#arg2&tail#" -} - -expect { - timeout {puts "TESTING ERROR 4.6.1\n";exit} - "Arguments:" -} -expect { - timeout {puts "TESTING ERROR 4.6.2\n";exit} - "#arg1&tail#" -} -expect { - timeout {puts "TESTING ERROR 4.6.3\n";exit} - "#arg2&tail#" -} - -puts "\nall done\n" diff --git a/test/arguments/outrun.sh b/test/arguments/outrun.sh deleted file mode 100755 index b7870bb70..000000000 --- a/test/arguments/outrun.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -# This file is part of Firejail project -# Copyright (C) 2014-2021 Firejail Authors -# License GPL v2 - -echo "TESTING: 4.1 - simple args" -firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --output=out faudit arg1 arg2 - -# simple quotes, testing spaces in file names -echo "TESTING: 4.2 - args with space and \"" -firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --output=out faudit "arg1 tail" "arg2 tail" - -echo "TESTING: 4.3 - args with space and '" -firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --output=out faudit 'arg1 tail' 'arg2 tail' - -# escaped space in file names -echo "TESTING: 4.4 - args with space and \\" -firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --output=out faudit arg1\ tail arg2\ tail - -# & char appears in URLs - URLs should be quoted -echo "TESTING: 4.5 - args with & and \"" -firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --output=out faudit "arg1&tail" "arg2&tail" - -echo "TESTING: 4.6 - args with & and '" -firejail --env=FIREJAIL_TEST_ARGUMENTS=yes --output=out faudit 'arg1&tail' 'arg2&tail' diff --git a/test/arguments/symrun.exp b/test/arguments/symrun.exp deleted file mode 100755 index b1f660715..000000000 --- a/test/arguments/symrun.exp +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2021 Firejail Authors -# License GPL v2 - -set timeout 10 -spawn $env(SHELL) -match_max 100000 - -send -- "./symrun.sh\r" -expect { - timeout {puts "TESTING ERROR 2.1.1\n";exit} - "Arguments:" -} -expect { - timeout {puts "TESTING ERROR 2.1.2\n";exit} - "#arg1#" -} -expect { - timeout {puts "TESTING ERROR 2.1.3\n";exit} - "#arg2#" -} - -expect { - timeout {puts "TESTING ERROR 2.3.1\n";exit} - "Arguments:" -} -expect { - timeout {puts "TESTING ERROR 2.3.2\n";exit} - "#arg1 tail#" -} -expect { - timeout {puts "TESTING ERROR 2.3.3\n";exit} - "#arg2 tail#" -} - -expect { - timeout {puts "TESTING ERROR 2.4.1\n";exit} - "Arguments:" -} -expect { - timeout {puts "TESTING ERROR 2.4.2\n";exit} - "#arg1 tail#" -} -expect { - timeout {puts "TESTING ERROR 2.4.3\n";exit} - "#arg2 tail#" -} - -expect { - timeout {puts "TESTING ERROR 2.5.1\n";exit} - "Arguments:" -} -expect { - timeout {puts "TESTING ERROR 2.5.2\n";exit} - "#arg1&tail#" -} -expect { - timeout {puts "TESTING ERROR 2.5.3\n";exit} - "#arg2&tail#" -} - -expect { - timeout {puts "TESTING ERROR 2.6.1\n";exit} - "Arguments:" -} -expect { - timeout {puts "TESTING ERROR 2.6.2\n";exit} - "#arg1&tail#" -} -expect { - timeout {puts "TESTING ERROR 2.6.3\n";exit} - "#arg2&tail#" -} diff --git a/test/arguments/symrun.sh b/test/arguments/symrun.sh deleted file mode 100755 index 7bc4d21cf..000000000 --- a/test/arguments/symrun.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# This file is part of Firejail project -# Copyright (C) 2014-2021 Firejail Authors -# License GPL v2 - -mkdir symtest -ln -s /usr/bin/firejail symtest/faudit - -# search for faudit in current directory -export PATH=$PATH:. -export FIREJAIL_TEST_ARGUMENTS=yes - -echo "TESTING: 2.1 - simple args" -symtest/faudit arg1 arg2 - -# simple quotes, testing spaces in file names -echo "TESTING: 2.2 - args with space and \"" -symtest/faudit "arg1 tail" "arg2 tail" - -echo "TESTING: 2.3 - args with space and '" -symtest/faudit 'arg1 tail' 'arg2 tail' - -# escaped space in file names -echo "TESTING: 2.4 - args with space and \\" -symtest/faudit arg1\ tail arg2\ tail - -# & char appears in URLs - URLs should be quoted -echo "TESTING: 2.5 - args with & and \"" -symtest/faudit "arg1&tail" "arg2&tail" - -echo "TESTING: 2.6 - args with & and '" -symtest/faudit 'arg1&tail' 'arg2&tail' - -rm -fr symtest -- cgit v1.2.3-54-g00ecf