From: Michal Nowak Date: Tue, 27 Oct 2020 09:20:05 +0000 (+0100) Subject: Get rid of bashisms in string comparisons X-Git-Tag: v9.17.7~39^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=481dfb96715d383145af15432b3b3b7d81373636;p=thirdparty%2Fbind9.git Get rid of bashisms in string comparisons The double equal sign ('==') is a Bash-specific string comparison operator. Ensure the single equal sign ('=') is used in all POSIX shell scripts in the system test suite in order to retain their portability. --- diff --git a/bin/tests/system/kasp/tests.sh b/bin/tests/system/kasp/tests.sh index 378df45fa3f..e875e406c9d 100644 --- a/bin/tests/system/kasp/tests.sh +++ b/bin/tests/system/kasp/tests.sh @@ -5661,10 +5661,10 @@ dnssec_verify n=$((n+1)) echo_i "check that of zone ${ZONE} migration to dnssec-policy uses the same keys ($n)" ret=0 -[ $_migrate_ext8_ksk == $_migrate_int8_ksk ] || log_error "mismatch ksk tag" -[ $_migrate_ext8_zsk == $_migrate_int8_zsk ] || log_error "mismatch zsk tag" -[ $_migrate_ext8_ksk == $(key_get KEY1 ID) ] || log_error "mismatch ksk tag" -[ $_migrate_ext8_zsk == $(key_get KEY2 ID) ] || log_error "mismatch zsk tag" +[ $_migrate_ext8_ksk = $_migrate_int8_ksk ] || log_error "mismatch ksk tag" +[ $_migrate_ext8_zsk = $_migrate_int8_zsk ] || log_error "mismatch zsk tag" +[ $_migrate_ext8_ksk = $(key_get KEY1 ID) ] || log_error "mismatch ksk tag" +[ $_migrate_ext8_zsk = $(key_get KEY2 ID) ] || log_error "mismatch zsk tag" status=$((status+ret)) echo_i "exit status: $status" diff --git a/bin/tests/system/rpz/tests.sh b/bin/tests/system/rpz/tests.sh index d73ccb939e6..c728c45d5c8 100644 --- a/bin/tests/system/rpz/tests.sh +++ b/bin/tests/system/rpz/tests.sh @@ -208,7 +208,7 @@ restart () { fi fi rm -f ns$1/*.jnl - if [ "$2" == "rebuild-bl-rpz" ]; then + if [ "$2" = "rebuild-bl-rpz" ]; then if test -f ns$1/base.db; then for NM in ns$1/bl*.db; do cp -f ns$1/base.db $NM