aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar a1346054 <36859588+a1346054@users.noreply.github.com>2022-09-13 19:59:01 +0000
committerLibravatar a1346054 <36859588+a1346054@users.noreply.github.com>2022-09-13 22:37:19 +0000
commitc47ad8b82a52a5648bdabfd8713ba0dda3df2c16 (patch)
treec2368dfba944b73e5fcfee8b9e45d3ad283e70ad
parenttests: use an array (diff)
downloadfirejail-c47ad8b82a52a5648bdabfd8713ba0dda3df2c16.tar.gz
firejail-c47ad8b82a52a5648bdabfd8713ba0dda3df2c16.tar.zst
firejail-c47ad8b82a52a5648bdabfd8713ba0dda3df2c16.zip
tests: fix underquoting
-rwxr-xr-xtest/compile/compile.sh46
-rwxr-xr-xtest/environment/output.sh6
-rwxr-xr-xtest/features/test.sh48
3 files changed, 50 insertions, 50 deletions
diff --git a/test/compile/compile.sh b/test/compile/compile.sh
index 27e5b2d77..96a14d0cb 100755
--- a/test/compile/compile.sh
+++ b/test/compile/compile.sh
@@ -47,7 +47,7 @@ print_title() {
47 echo 47 echo
48 echo 48 echo
49 echo "**************************************************" 49 echo "**************************************************"
50 echo $1 50 echo "$1"
51 echo "**************************************************" 51 echo "**************************************************"
52} 52}
53 53
@@ -76,8 +76,8 @@ cleanup
76#***************************************************************** 76#*****************************************************************
77print_title "${arr[1]}" 77print_title "${arr[1]}"
78echo "$DIST" 78echo "$DIST"
79tar -xJvf ../../$DIST.tar.xz 79tar -xJvf ../../"$DIST.tar.xz"
80mv $DIST firejail 80mv "$DIST" firejail
81 81
82cd firejail 82cd firejail
83./configure --prefix=/usr --enable-fatal-warnings 2>&1 | tee ../output-configure 83./configure --prefix=/usr --enable-fatal-warnings 2>&1 | tee ../output-configure
@@ -410,23 +410,23 @@ echo "**********************************************************"
410 410
411wc -l report-test* 411wc -l report-test*
412echo 412echo
413echo "Legend:" 413echo "Legend:"
414echo ${arr[1]} 414echo "${arr[1]}"
415echo ${arr[2]} 415echo "${arr[2]}"
416echo ${arr[3]} 416echo "${arr[3]}"
417echo ${arr[4]} 417echo "${arr[4]}"
418echo ${arr[5]} 418echo "${arr[5]}"
419echo ${arr[6]} 419echo "${arr[6]}"
420echo ${arr[7]} 420echo "${arr[7]}"
421echo ${arr[8]} 421echo "${arr[8]}"
422echo ${arr[9]} 422echo "${arr[9]}"
423echo ${arr[10]} 423echo "${arr[10]}"
424echo ${arr[11]} 424echo "${arr[11]}"
425echo ${arr[12]} 425echo "${arr[12]}"
426echo ${arr[13]} 426echo "${arr[13]}"
427echo ${arr[14]} 427echo "${arr[14]}"
428echo ${arr[15]} 428echo "${arr[15]}"
429echo ${arr[16]} 429echo "${arr[16]}"
430echo ${arr[17]} 430echo "${arr[17]}"
431echo ${arr[18]} 431echo "${arr[18]}"
432echo ${arr[19]} 432echo "${arr[19]}"
diff --git a/test/environment/output.sh b/test/environment/output.sh
index 329cb40c7..0872dc276 100755
--- a/test/environment/output.sh
+++ b/test/environment/output.sh
@@ -5,8 +5,8 @@
5 5
6i="0" 6i="0"
7 7
8while [ $i -lt 150000 ] 8while [ $i -lt 150000 ]
9do 9do
10 echo message number $i 10 echo "message number $i"
11 i=$[$i+1] 11 i=$((i+1))
12done 12done
diff --git a/test/features/test.sh b/test/features/test.sh
index b507c6d37..64cb78c21 100755
--- a/test/features/test.sh
+++ b/test/features/test.sh
@@ -38,28 +38,28 @@ done
38# Default features 38# Default features
39#################### 39####################
40echo "TESTING: 1.1 disable /boot" 40echo "TESTING: 1.1 disable /boot"
41./1.1.exp $OVERLAY $CHROOT 41./1.1.exp "$OVERLAY" "$CHROOT"
42 42
43echo "TESTING: 1.2 new /proc" 43echo "TESTING: 1.2 new /proc"
44./1.2.exp $OVERLAY $CHROOT 44./1.2.exp "$OVERLAY" "$CHROOT"
45 45
46echo "TESTING: 1.4 mask other users" 46echo "TESTING: 1.4 mask other users"
47./1.4.exp $OVERLAY $CHROOT 47./1.4.exp "$OVERLAY" "$CHROOT"
48 48
49echo "TESTING: 1.5 PID namespace" 49echo "TESTING: 1.5 PID namespace"
50./1.5.exp $OVERLAY $CHROOT 50./1.5.exp "$OVERLAY" "$CHROOT"
51 51
52echo "TESTING: 1.6 new /var/log" 52echo "TESTING: 1.6 new /var/log"
53./1.6.exp $OVERLAY $CHROOT 53./1.6.exp "$OVERLAY" "$CHROOT"
54 54
55echo "TESTING: 1.7 new /var/tmp" 55echo "TESTING: 1.7 new /var/tmp"
56./1.7.exp $OVERLAY $CHROOT 56./1.7.exp "$OVERLAY" "$CHROOT"
57 57
58echo "TESTING: 1.8 disable firejail config and run time information" 58echo "TESTING: 1.8 disable firejail config and run time information"
59./1.8.exp $OVERLAY $CHROOT 59./1.8.exp "$OVERLAY" "$CHROOT"
60 60
61echo "TESTING: 1.10 disable /selinux" 61echo "TESTING: 1.10 disable /selinux"
62./1.10.exp $OVERLAY $CHROOT 62./1.10.exp "$OVERLAY" "$CHROOT"
63 63
64#################### 64####################
65# networking features 65# networking features
@@ -67,56 +67,56 @@ echo "TESTING: 1.10 disable /selinux"
67if [ $NETWORK == "network" ] 67if [ $NETWORK == "network" ]
68then 68then
69 echo "TESTING: 2.1 hostname" 69 echo "TESTING: 2.1 hostname"
70 ./2.1.exp $OVERLAY $CHROOT 70 ./2.1.exp "$OVERLAY" "$CHROOT"
71 71
72 echo "TESTING: 2.2 DNS" 72 echo "TESTING: 2.2 DNS"
73 ./2.2.exp $OVERLAY $CHROOT 73 ./2.2.exp "$OVERLAY" "$CHROOT"
74 74
75 echo "TESTING: 2.3 mac-vlan" 75 echo "TESTING: 2.3 mac-vlan"
76 ./2.3.exp $OVERLAY $CHROOT 76 ./2.3.exp "$OVERLAY" "$CHROOT"
77 77
78 echo "TESTING: 2.4 bridge" 78 echo "TESTING: 2.4 bridge"
79 ./2.4.exp $OVERLAY $CHROOT 79 ./2.4.exp "$OVERLAY" "$CHROOT"
80 80
81 echo "TESTING: 2.5 interface" 81 echo "TESTING: 2.5 interface"
82 ./2.5.exp $OVERLAY $CHROOT 82 ./2.5.exp "$OVERLAY" "$CHROOT"
83 83
84 echo "TESTING: 2.6 Default gateway" 84 echo "TESTING: 2.6 Default gateway"
85 ./2.6.exp $OVERLAY $CHROOT 85 ./2.6.exp "$OVERLAY" "$CHROOT"
86fi 86fi
87 87
88#################### 88####################
89# filesystem features 89# filesystem features
90#################### 90####################
91echo "TESTING: 3.1 private (fails on OpenSUSE)" 91echo "TESTING: 3.1 private (fails on OpenSUSE)"
92./3.1.exp $OVERLAY $CHROOT 92./3.1.exp "$OVERLAY" "$CHROOT"
93 93
94echo "TESTING: 3.2 read-only" 94echo "TESTING: 3.2 read-only"
95./3.2.exp $OVERLAY $CHROOT 95./3.2.exp "$OVERLAY" "$CHROOT"
96 96
97echo "TESTING: 3.3 blacklist" 97echo "TESTING: 3.3 blacklist"
98./3.3.exp $OVERLAY $CHROOT 98./3.3.exp "$OVERLAY" "$CHROOT"
99 99
100echo "TESTING: 3.4 whitelist home (fails on OpenSUSE)" 100echo "TESTING: 3.4 whitelist home (fails on OpenSUSE)"
101./3.4.exp $OVERLAY $CHROOT 101./3.4.exp "$OVERLAY" "$CHROOT"
102 102
103echo "TESTING: 3.5 private-dev" 103echo "TESTING: 3.5 private-dev"
104./3.5.exp $OVERLAY $CHROOT 104./3.5.exp "$OVERLAY" "$CHROOT"
105 105
106echo "TESTING: 3.6 private-etc" 106echo "TESTING: 3.6 private-etc"
107./3.6.exp notworking $CHROOT 107./3.6.exp notworking "$CHROOT"
108 108
109echo "TESTING: 3.7 private-tmp" 109echo "TESTING: 3.7 private-tmp"
110./3.7.exp $OVERLAY $CHROOT 110./3.7.exp "$OVERLAY" "$CHROOT"
111 111
112echo "TESTING: 3.8 private-bin" 112echo "TESTING: 3.8 private-bin"
113./3.8.exp notworking notworking 113./3.8.exp notworking notworking
114 114
115echo "TESTING: 3.9 whitelist dev" 115echo "TESTING: 3.9 whitelist dev"
116./3.9.exp $OVERLAY $CHROOT 116./3.9.exp "$OVERLAY" "$CHROOT"
117 117
118echo "TESTING: 3.10 whitelist tmp" 118echo "TESTING: 3.10 whitelist tmp"
119./3.10.exp $OVERLAY $CHROOT 119./3.10.exp "$OVERLAY" "$CHROOT"
120 120
121echo "TESTING: 3.11 mkdir" 121echo "TESTING: 3.11 mkdir"
122./3.11.exp $OVERLAY $CHROOT 122./3.11.exp "$OVERLAY" "$CHROOT"