]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix argument order in assert_int_equal()
authorMichał Kępień <michal@isc.org>
Thu, 7 Nov 2019 11:25:39 +0000 (12:25 +0100)
committerMichał Kępień <michal@isc.org>
Tue, 19 Nov 2019 14:39:03 +0000 (15:39 +0100)
assert_int_equal() calls in bin/tests/system/tcp/tests.sh pass the found
value as the first argument and the expected value as the second
argument, while the function interprets its arguments the other way
round.  Fix argument handling in assert_int_equal() to make sure the
error messages printed by that function are correct.

(cherry picked from commit 6bd1f68bef1fdadcd385322e11f3e9cd1b89f94c)

bin/tests/system/conf.sh.common

index a2e5365188ddbed649d1e687a638b15280c07f88..e06a11e30244b347ea2c40148b11eceaa11bb5fe 100644 (file)
@@ -208,12 +208,12 @@ DISABLED_BITS=384
 # the error using the description of the tested variable provided in $3
 # and return 1.
 assert_int_equal() {
-       expected="$1"
-       found="$2"
+       found="$1"
+       expected="$2"
        description="$3"
 
        if [ "${expected}" -ne "${found}" ]; then
-               echo_i "incorrect ${description}: expected ${expected}, got ${found}"
+               echo_i "incorrect ${description}: got ${found}, expected ${expected}"
                return 1
        fi