From d4e29e90d642fe143fd900b1e7a25741b291f428 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 18 Sep 2023 21:59:22 +0200 Subject: 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 --- tests/shell/helpers/test-wrapper.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'tests') 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 -- cgit v1.2.3