From c47ad8b82a52a5648bdabfd8713ba0dda3df2c16 Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Tue, 13 Sep 2022 19:59:01 +0000 Subject: tests: fix underquoting --- test/compile/compile.sh | 46 ++++++++++++++++++++++---------------------- test/environment/output.sh | 6 +++--- test/features/test.sh | 48 +++++++++++++++++++++++----------------------- 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() { echo echo echo "**************************************************" - echo $1 + echo "$1" echo "**************************************************" } @@ -76,8 +76,8 @@ cleanup #***************************************************************** print_title "${arr[1]}" echo "$DIST" -tar -xJvf ../../$DIST.tar.xz -mv $DIST firejail +tar -xJvf ../../"$DIST.tar.xz" +mv "$DIST" firejail cd firejail ./configure --prefix=/usr --enable-fatal-warnings 2>&1 | tee ../output-configure @@ -410,23 +410,23 @@ echo "**********************************************************" wc -l report-test* echo -echo "Legend:" -echo ${arr[1]} -echo ${arr[2]} -echo ${arr[3]} -echo ${arr[4]} -echo ${arr[5]} -echo ${arr[6]} -echo ${arr[7]} -echo ${arr[8]} -echo ${arr[9]} -echo ${arr[10]} -echo ${arr[11]} -echo ${arr[12]} -echo ${arr[13]} -echo ${arr[14]} -echo ${arr[15]} -echo ${arr[16]} -echo ${arr[17]} -echo ${arr[18]} -echo ${arr[19]} +echo "Legend:" +echo "${arr[1]}" +echo "${arr[2]}" +echo "${arr[3]}" +echo "${arr[4]}" +echo "${arr[5]}" +echo "${arr[6]}" +echo "${arr[7]}" +echo "${arr[8]}" +echo "${arr[9]}" +echo "${arr[10]}" +echo "${arr[11]}" +echo "${arr[12]}" +echo "${arr[13]}" +echo "${arr[14]}" +echo "${arr[15]}" +echo "${arr[16]}" +echo "${arr[17]}" +echo "${arr[18]}" +echo "${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 @@ i="0" -while [ $i -lt 150000 ] +while [ $i -lt 150000 ] do - echo message number $i - i=$[$i+1] + echo "message number $i" + i=$((i+1)) done 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 # Default features #################### echo "TESTING: 1.1 disable /boot" -./1.1.exp $OVERLAY $CHROOT +./1.1.exp "$OVERLAY" "$CHROOT" echo "TESTING: 1.2 new /proc" -./1.2.exp $OVERLAY $CHROOT +./1.2.exp "$OVERLAY" "$CHROOT" echo "TESTING: 1.4 mask other users" -./1.4.exp $OVERLAY $CHROOT +./1.4.exp "$OVERLAY" "$CHROOT" echo "TESTING: 1.5 PID namespace" -./1.5.exp $OVERLAY $CHROOT +./1.5.exp "$OVERLAY" "$CHROOT" echo "TESTING: 1.6 new /var/log" -./1.6.exp $OVERLAY $CHROOT +./1.6.exp "$OVERLAY" "$CHROOT" echo "TESTING: 1.7 new /var/tmp" -./1.7.exp $OVERLAY $CHROOT +./1.7.exp "$OVERLAY" "$CHROOT" echo "TESTING: 1.8 disable firejail config and run time information" -./1.8.exp $OVERLAY $CHROOT +./1.8.exp "$OVERLAY" "$CHROOT" echo "TESTING: 1.10 disable /selinux" -./1.10.exp $OVERLAY $CHROOT +./1.10.exp "$OVERLAY" "$CHROOT" #################### # networking features @@ -67,56 +67,56 @@ echo "TESTING: 1.10 disable /selinux" if [ $NETWORK == "network" ] then echo "TESTING: 2.1 hostname" - ./2.1.exp $OVERLAY $CHROOT + ./2.1.exp "$OVERLAY" "$CHROOT" echo "TESTING: 2.2 DNS" - ./2.2.exp $OVERLAY $CHROOT + ./2.2.exp "$OVERLAY" "$CHROOT" echo "TESTING: 2.3 mac-vlan" - ./2.3.exp $OVERLAY $CHROOT + ./2.3.exp "$OVERLAY" "$CHROOT" echo "TESTING: 2.4 bridge" - ./2.4.exp $OVERLAY $CHROOT + ./2.4.exp "$OVERLAY" "$CHROOT" echo "TESTING: 2.5 interface" - ./2.5.exp $OVERLAY $CHROOT + ./2.5.exp "$OVERLAY" "$CHROOT" echo "TESTING: 2.6 Default gateway" - ./2.6.exp $OVERLAY $CHROOT + ./2.6.exp "$OVERLAY" "$CHROOT" fi #################### # filesystem features #################### echo "TESTING: 3.1 private (fails on OpenSUSE)" -./3.1.exp $OVERLAY $CHROOT +./3.1.exp "$OVERLAY" "$CHROOT" echo "TESTING: 3.2 read-only" -./3.2.exp $OVERLAY $CHROOT +./3.2.exp "$OVERLAY" "$CHROOT" echo "TESTING: 3.3 blacklist" -./3.3.exp $OVERLAY $CHROOT +./3.3.exp "$OVERLAY" "$CHROOT" echo "TESTING: 3.4 whitelist home (fails on OpenSUSE)" -./3.4.exp $OVERLAY $CHROOT +./3.4.exp "$OVERLAY" "$CHROOT" echo "TESTING: 3.5 private-dev" -./3.5.exp $OVERLAY $CHROOT +./3.5.exp "$OVERLAY" "$CHROOT" echo "TESTING: 3.6 private-etc" -./3.6.exp notworking $CHROOT +./3.6.exp notworking "$CHROOT" echo "TESTING: 3.7 private-tmp" -./3.7.exp $OVERLAY $CHROOT +./3.7.exp "$OVERLAY" "$CHROOT" echo "TESTING: 3.8 private-bin" ./3.8.exp notworking notworking echo "TESTING: 3.9 whitelist dev" -./3.9.exp $OVERLAY $CHROOT +./3.9.exp "$OVERLAY" "$CHROOT" echo "TESTING: 3.10 whitelist tmp" -./3.10.exp $OVERLAY $CHROOT +./3.10.exp "$OVERLAY" "$CHROOT" echo "TESTING: 3.11 mkdir" -./3.11.exp $OVERLAY $CHROOT +./3.11.exp "$OVERLAY" "$CHROOT" -- cgit v1.2.3-54-g00ecf