summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-09-18 21:59:22 +0200
committerFlorian Westphal <fw@strlen.de>2023-09-18 22:05:49 +0200
commitd4e29e90d642fe143fd900b1e7a25741b291f428 (patch)
tree3372c1f2e9844262620b207e0cfc514e46ac7d4b /tests
parent78fa7db4885496fd906ccbfbe0a6a3deed81c8a8 (diff)
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 <thaller@redhat.com> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/shell/helpers/test-wrapper.sh1
1 files changed, 1 insertions, 0 deletions
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