From: Eric Biggers <ebiggers@kernel.org>
To: fstests@vger.kernel.org
Cc: linux-fscrypt@vger.kernel.org, Andrey Albershteyn <aalbersh@redhat.com>
Subject: [xfstests PATCH v2 2/3] generic/577: add missing file removal before empty file test
Date: Fri, 4 Nov 2022 13:58:29 -0700 [thread overview]
Message-ID: <20221104205830.130132-3-ebiggers@kernel.org> (raw)
In-Reply-To: <20221104205830.130132-1-ebiggers@kernel.org>
From: Eric Biggers <ebiggers@google.com>
The fix for _fsv_have_hash_algorithm() exposed a bug where one of the
test cases in generic/577 isn't deleting the file from the previous test
case before it tries to write to it. That causes a failure, since due
to the fix for _fsv_have_hash_algorithm(), the file from the previous
test case now ends up with verity enabled and therefore cannot be
written to. Fix this by deleting the file.
Reported-by: Andrey Albershteyn <aalbersh@redhat.com>
Reviewed-by: Andrey Albershteyn <aalbersh@redhat.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
tests/generic/577 | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/generic/577 b/tests/generic/577
index 98c3888f..5f7e0573 100755
--- a/tests/generic/577
+++ b/tests/generic/577
@@ -121,6 +121,7 @@ if _fsv_have_hash_algorithm sha512 $fsv_file; then
fi
echo -e "\n# Testing empty file"
+rm -f $fsv_file
echo -n > $fsv_file
_fsv_sign $fsv_file $sigfile.emptyfile --key=$keyfile --cert=$certfile | \
_filter_scratch
--
2.38.1
next prev parent reply other threads:[~2022-11-04 20:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-04 20:58 [xfstests PATCH v2 0/3] Fix test bugs related to fs.verity.require_signatures Eric Biggers
2022-11-04 20:58 ` [xfstests PATCH v2 1/3] common/verity: fix _fsv_have_hash_algorithm() with required signatures Eric Biggers
2022-11-04 20:58 ` Eric Biggers [this message]
2022-11-04 20:58 ` [xfstests PATCH v2 3/3] tests: fix some tests for systems with fs.verity.require_signatures=1 Eric Biggers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221104205830.130132-3-ebiggers@kernel.org \
--to=ebiggers@kernel.org \
--cc=aalbersh@redhat.com \
--cc=fstests@vger.kernel.org \
--cc=linux-fscrypt@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox