aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.ibm.com>2018-09-10 14:20:03 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2018-09-13 15:19:36 +1000
commit084e37bab1cf6fb334af3f2c8a77f0f260eb91fe (patch)
tree3d2a955eec28f6f31b25a9528497f84fb5641e81 /test
parent9ff660e218345ac21f266d0a8dc8514f5d651e64 (diff)
downloadskiboot-084e37bab1cf6fb334af3f2c8a77f0f260eb91fe.zip
skiboot-084e37bab1cf6fb334af3f2c8a77f0f260eb91fe.tar.gz
skiboot-084e37bab1cf6fb334af3f2c8a77f0f260eb91fe.tar.bz2
Use $() rather than backticks in all shell
The cool kids are all using $() these days as backticks are all backwards and uncool. Practically speaking, it makes it easier to escape things, nest things, and all the other reasons listed on http://mywiki.wooledge.org/BashFAQ/082 Signed-off-by: Stewart Smith <stewart@linux.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest/hello_world/run_mambo_hello_world.sh8
-rwxr-xr-xtest/hello_world/run_mambo_p9_hello_world.sh8
-rwxr-xr-xtest/hello_world/run_qemu_hello_world.sh6
-rwxr-xr-xtest/make-boot-coverage-report.sh2
-rwxr-xr-xtest/run_mambo_boot_test.sh6
-rwxr-xr-xtest/run_qemu-jessie-debian-installer_boot_test.sh8
-rwxr-xr-xtest/run_qemu_boot_test.sh8
-rwxr-xr-xtest/sreset_world/run_mambo_p9_sreset.sh8
-rwxr-xr-xtest/sreset_world/run_mambo_sreset.sh8
9 files changed, 31 insertions, 31 deletions
diff --git a/test/hello_world/run_mambo_hello_world.sh b/test/hello_world/run_mambo_hello_world.sh
index 13112d0..54d445b 100755
--- a/test/hello_world/run_mambo_hello_world.sh
+++ b/test/hello_world/run_mambo_hello_world.sh
@@ -19,19 +19,19 @@ if [ -n "$KERNEL" ]; then
exit 0;
fi
-if [ ! `command -v expect` ]; then
+if [ ! $(command -v expect) ]; then
echo 'Could not find expect binary. Skipping hello_world test';
exit 0;
fi
if [ -n "$SKIBOOT_ENABLE_MAMBO_STB" ]; then
- export SKIBOOT_ZIMAGE=`pwd`/test/hello_world/hello_kernel/hello_kernel.stb
+ export SKIBOOT_ZIMAGE=$(pwd)/test/hello_world/hello_kernel/hello_kernel.stb
else
- export SKIBOOT_ZIMAGE=`pwd`/test/hello_world/hello_kernel/hello_kernel
+ export SKIBOOT_ZIMAGE=$(pwd)/test/hello_world/hello_kernel/hello_kernel
fi
# Currently getting some core dumps from mambo, so disable them!
-OLD_ULIMIT_C=`ulimit -c`
+OLD_ULIMIT_C=$(ulimit -c)
ulimit -c 0
t=$(mktemp) || exit 1
diff --git a/test/hello_world/run_mambo_p9_hello_world.sh b/test/hello_world/run_mambo_p9_hello_world.sh
index f8b0dae..9560527 100755
--- a/test/hello_world/run_mambo_p9_hello_world.sh
+++ b/test/hello_world/run_mambo_p9_hello_world.sh
@@ -18,19 +18,19 @@ if [ -n "$KERNEL" ]; then
exit 0;
fi
-if [ ! `command -v expect` ]; then
+if [ ! $(command -v expect) ]; then
echo 'Could not find expect binary. Skipping hello_world test';
exit 0;
fi
if [ -n "$SKIBOOT_ENABLE_MAMBO_STB" ]; then
- export SKIBOOT_ZIMAGE=`pwd`/test/hello_world/hello_kernel/hello_kernel.stb
+ export SKIBOOT_ZIMAGE=$(pwd)/test/hello_world/hello_kernel/hello_kernel.stb
else
- export SKIBOOT_ZIMAGE=`pwd`/test/hello_world/hello_kernel/hello_kernel
+ export SKIBOOT_ZIMAGE=$(pwd)/test/hello_world/hello_kernel/hello_kernel
fi
# Currently getting some core dumps from mambo, so disable them!
-OLD_ULIMIT_C=`ulimit -c`
+OLD_ULIMIT_C=$(ulimit -c)
ulimit -c 0
t=$(mktemp) || exit 1
diff --git a/test/hello_world/run_qemu_hello_world.sh b/test/hello_world/run_qemu_hello_world.sh
index 3f0aa55..e8d3176 100755
--- a/test/hello_world/run_qemu_hello_world.sh
+++ b/test/hello_world/run_qemu_hello_world.sh
@@ -5,7 +5,7 @@ if [ -z "$QEMU_BIN" ]; then
QEMU_BIN="qemu-system-ppc64"
fi
-if [ ! `command -v $QEMU_BIN` ]; then
+if [ ! $(command -v $QEMU_BIN) ]; then
echo "Could not find executable QEMU_BIN ($QEMU_BIN). Skipping hello_world test";
exit 0;
fi
@@ -15,13 +15,13 @@ if [ -n "$KERNEL" ]; then
exit 0;
fi
-if [ ! `command -v expect` ]; then
+if [ ! $(command -v expect) ]; then
echo 'Could not find expect binary. Skipping hello_world test';
exit 0;
fi
-export SKIBOOT_ZIMAGE=`pwd`/test/hello_world/hello_kernel/hello_kernel
+export SKIBOOT_ZIMAGE=$(pwd)/test/hello_world/hello_kernel/hello_kernel
t=$(mktemp) || exit 1
diff --git a/test/make-boot-coverage-report.sh b/test/make-boot-coverage-report.sh
index c4d5a0d..210880e 100755
--- a/test/make-boot-coverage-report.sh
+++ b/test/make-boot-coverage-report.sh
@@ -2,7 +2,7 @@
# We cheat and do this in a shell script so I don't go Makefile crazy.
-SKIBOOT_GCOV_ADDR=`perl -e "printf '0x%x', 0x30000000 + 0x\`grep gcov_info_list skiboot.map|cut -f 1 -d ' '\`"`
+SKIBOOT_GCOV_ADDR=$(perl -e "printf '0x%x', 0x30000000 + 0x$(grep gcov_info_list skiboot.map|cut -f 1 -d ' ')")
LCOV_INFO_FILES=""
diff --git a/test/run_mambo_boot_test.sh b/test/run_mambo_boot_test.sh
index fe0be0e..adff180 100755
--- a/test/run_mambo_boot_test.sh
+++ b/test/run_mambo_boot_test.sh
@@ -19,13 +19,13 @@ if [ -n "$KERNEL" ]; then
exit 0;
fi
-if [ ! `command -v expect` ]; then
+if [ ! $(command -v expect) ]; then
echo 'Could not find expect binary. Skipping hello_world test';
exit 0;
fi
if [ -z "$SKIBOOT_ZIMAGE" ]; then
- export SKIBOOT_ZIMAGE=`pwd`/zImage.epapr
+ export SKIBOOT_ZIMAGE=$(pwd)/zImage.epapr
fi
if [ ! -f "$SKIBOOT_ZIMAGE" ]; then
@@ -38,7 +38,7 @@ if [ -z "$SKIBOOT_MEM_DUMP" ]; then
fi
# Currently getting some core dumps from mambo, so disable them!
-OLD_ULIMIT_C=`ulimit -c`
+OLD_ULIMIT_C=$(ulimit -c)
ulimit -c 0
t=$(mktemp) || exit 1
diff --git a/test/run_qemu-jessie-debian-installer_boot_test.sh b/test/run_qemu-jessie-debian-installer_boot_test.sh
index 63c4d29..652ca38 100755
--- a/test/run_qemu-jessie-debian-installer_boot_test.sh
+++ b/test/run_qemu-jessie-debian-installer_boot_test.sh
@@ -5,7 +5,7 @@ if [ -z "$QEMU_BIN" ]; then
QEMU_BIN="qemu-system-ppc64"
fi
-if [ ! `command -v $QEMU_BIN` ]; then
+if [ ! $(command -v $QEMU_BIN) ]; then
echo "Could not find executable QEMU_BIN ($QEMU_BIN). Skipping hello_world test";
exit 0;
fi
@@ -15,7 +15,7 @@ if [ -n "$KERNEL" ]; then
exit 0;
fi
-if [ ! `command -v expect` ]; then
+if [ ! $(command -v expect) ]; then
echo 'Could not find expect binary. Skipping boot test';
exit 0;
fi
@@ -30,8 +30,8 @@ if [ ! -f debian-jessie-initrd.gz ]; then
exit 0;
fi
-T=`mktemp --tmpdir skiboot_qemu_debian-jessie-boot_test.XXXXXXXXXX`
-#D=`mktemp --tmpdir debian-jessie-install.qcow2.XXXXXXXXXX`
+T=$(mktemp --tmpdir skiboot_qemu_debian-jessie-boot_test.XXXXXXXXXX)
+#D=$(mktemp --tmpdir debian-jessie-install.qcow2.XXXXXXXXXX)
# In future we should do full install:
# FIXME: -append "DEBIAN_FRONTEND=text locale=en_US keymap=us hostname=OPALtest domain=unassigned-domain rescue/enable=true"
diff --git a/test/run_qemu_boot_test.sh b/test/run_qemu_boot_test.sh
index bfcf485..08bb65a 100755
--- a/test/run_qemu_boot_test.sh
+++ b/test/run_qemu_boot_test.sh
@@ -5,7 +5,7 @@ if [ -z "$QEMU_BIN" ]; then
QEMU_BIN="qemu-system-ppc64"
fi
-if [ ! `command -v $QEMU_BIN` ]; then
+if [ ! $(command -v $QEMU_BIN) ]; then
echo "Could not find executable QEMU_BIN ($QEMU_BIN). Skipping hello_world test";
exit 0;
fi
@@ -15,13 +15,13 @@ if [ -n "$KERNEL" ]; then
exit 0;
fi
-if [ ! `command -v expect` ]; then
+if [ ! $(command -v expect) ]; then
echo 'Could not find expect binary. Skipping hello_world test';
exit 0;
fi
if [ -z "$SKIBOOT_ZIMAGE" ]; then
- export SKIBOOT_ZIMAGE=`pwd`/zImage.epapr
+ export SKIBOOT_ZIMAGE=$(pwd)/zImage.epapr
fi
if [ ! -f "$SKIBOOT_ZIMAGE" ]; then
@@ -29,7 +29,7 @@ if [ ! -f "$SKIBOOT_ZIMAGE" ]; then
exit 0;
fi
-T=`mktemp --tmpdir skiboot_qemu_boot_test.XXXXXXXXXX`
+T=$(mktemp --tmpdir skiboot_qemu_boot_test.XXXXXXXXXX)
( cat <<EOF | expect
set timeout 600
diff --git a/test/sreset_world/run_mambo_p9_sreset.sh b/test/sreset_world/run_mambo_p9_sreset.sh
index 9f61f1e..926ce3e 100755
--- a/test/sreset_world/run_mambo_p9_sreset.sh
+++ b/test/sreset_world/run_mambo_p9_sreset.sh
@@ -18,19 +18,19 @@ if [ -n "$KERNEL" ]; then
exit 0;
fi
-if [ ! `command -v expect` ]; then
+if [ ! $(command -v expect) ]; then
echo 'Could not find expect binary. Skipping sreset_world test';
exit 0;
fi
if [ -n "$SKIBOOT_ENABLE_MAMBO_STB" ]; then
- export SKIBOOT_ZIMAGE=`pwd`/test/sreset_world/sreset_kernel/sreset_kernel.stb
+ export SKIBOOT_ZIMAGE=$(pwd)/test/sreset_world/sreset_kernel/sreset_kernel.stb
else
- export SKIBOOT_ZIMAGE=`pwd`/test/sreset_world/sreset_kernel/sreset_kernel
+ export SKIBOOT_ZIMAGE=$(pwd)/test/sreset_world/sreset_kernel/sreset_kernel
fi
# Currently getting some core dumps from mambo, so disable them!
-OLD_ULIMIT_C=`ulimit -c`
+OLD_ULIMIT_C=$(ulimit -c)
ulimit -c 0
t=$(mktemp) || exit 1
diff --git a/test/sreset_world/run_mambo_sreset.sh b/test/sreset_world/run_mambo_sreset.sh
index 10c7224..8fba5eb 100755
--- a/test/sreset_world/run_mambo_sreset.sh
+++ b/test/sreset_world/run_mambo_sreset.sh
@@ -19,19 +19,19 @@ if [ -n "$KERNEL" ]; then
exit 0;
fi
-if [ ! `command -v expect` ]; then
+if [ ! $(command -v expect) ]; then
echo 'Could not find expect binary. Skipping sreset_world test';
exit 0;
fi
if [ -n "$SKIBOOT_ENABLE_MAMBO_STB" ]; then
- export SKIBOOT_ZIMAGE=`pwd`/test/sreset_world/sreset_kernel/sreset_kernel.stb
+ export SKIBOOT_ZIMAGE=$(pwd)/test/sreset_world/sreset_kernel/sreset_kernel.stb
else
- export SKIBOOT_ZIMAGE=`pwd`/test/sreset_world/sreset_kernel/sreset_kernel
+ export SKIBOOT_ZIMAGE=$(pwd)/test/sreset_world/sreset_kernel/sreset_kernel
fi
# Currently getting some core dumps from mambo, so disable them!
-OLD_ULIMIT_C=`ulimit -c`
+OLD_ULIMIT_C=$(ulimit -c)
ulimit -c 0
t=$(mktemp) || exit 1