From: Thomas Haller Date: Mon, 18 Sep 2023 19:59:22 +0000 (+0200) Subject: tests/shell: fix preserving ruleset diff after test X-Git-Tag: v1.0.9~64 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d4e29e90d642fe143fd900b1e7a25741b291f428;p=thirdparty%2Fnftables.git tests/shell: fix preserving ruleset diff after test We want to delete the file in the case when there was no diff (and we expect the file to be empty). The condition was wrong. Fixes: 55fe071cd193 ('tests/shell: cleanup result handling in "test-wrapper.sh"') Signed-off-by: Thomas Haller Signed-off-by: Florian Westphal --- diff --git a/tests/shell/helpers/test-wrapper.sh b/tests/shell/helpers/test-wrapper.sh index cd8f4805..ad6a7103 100755 --- a/tests/shell/helpers/test-wrapper.sh +++ b/tests/shell/helpers/test-wrapper.sh @@ -125,6 +125,7 @@ if [ "$rc_test" -ne 77 -a -f "$DUMPFILE" ] ; then if [ "$dump_written" != y ] ; then if ! $DIFF -u "$DUMPFILE" "$NFT_TEST_TESTTMPDIR/ruleset-after" &> "$NFT_TEST_TESTTMPDIR/ruleset-diff" ; then rc_dump=124 + else rm -f "$NFT_TEST_TESTTMPDIR/ruleset-diff" fi fi