diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2023-06-04 15:33:24 +0200 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2023-06-05 16:50:13 +0200 |
commit | 00c2676972b62edff09ae612286e814bf9d4a574 (patch) | |
tree | 81470b039fde17d63382374a38d72f01df22f0eb /test | |
parent | test: make the data partition larger for the cryptsetup test (diff) | |
download | systemd-00c2676972b62edff09ae612286e814bf9d4a574.tar.xz systemd-00c2676972b62edff09ae612286e814bf9d4a574.zip |
test: minor cleanup
No functional change.
Diffstat (limited to 'test')
-rw-r--r-- | test/test-functions | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/test-functions b/test/test-functions index 5aa99522fc..cfae5e9fda 100644 --- a/test/test-functions +++ b/test/test-functions @@ -1419,7 +1419,7 @@ cleanup_loopdev() { add_at_exit_handler cleanup_loopdev create_empty_image() { - if [ -z "${IMAGE_NAME:=}" ]; then + if [[ -z "${IMAGE_NAME:=}" ]]; then echo "create_empty_image: \$IMAGE_NAME not set" exit 1 fi @@ -1429,13 +1429,13 @@ create_empty_image() { local data_size=100 if ! get_bool "$NO_BUILD"; then if meson configure "${BUILD_DIR:?}" | grep 'static-lib\|standalone-binaries' | awk '{ print $2 }' | grep -q 'true'; then - root_size=$((root_size+=200)) + root_size=$((root_size + 200)) fi if meson configure "${BUILD_DIR:?}" | grep 'link-.*-shared' | awk '{ print $2 }' | grep -q 'false'; then - root_size=$((root_size+=200)) + root_size=$((root_size + 200)) fi if get_bool "$IS_BUILT_WITH_COVERAGE"; then - root_size=$((root_size+=250)) + root_size=$((root_size + 250)) fi if get_bool "$IS_BUILT_WITH_ASAN"; then root_size=$((root_size * 2)) @@ -1455,8 +1455,8 @@ create_empty_image() { # Create the blank file to use as a root filesystem truncate -s "${root_size}M" "$IMAGE_PUBLIC" - LOOPDEV=$(losetup --show -P -f "$IMAGE_PUBLIC") - [ -b "$LOOPDEV" ] || return 1 + LOOPDEV="$(losetup --show -P -f "$IMAGE_PUBLIC")" + [[ -b "$LOOPDEV" ]] || return 1 # Create two partitions - a root one and a data one (utilized by some tests) sfdisk "$LOOPDEV" <<EOF label: gpt |