* [PATCHSET 1/2] fstests: more random fixes for v2026.03.20
@ 2026-04-13 17:50 Darrick J. Wong
2026-04-13 17:50 ` [PATCH 1/1] xfs/841: actually compare the new filesystem contents to the proto dir Darrick J. Wong
0 siblings, 1 reply; 3+ messages in thread
From: Darrick J. Wong @ 2026-04-13 17:50 UTC (permalink / raw)
To: zlang, djwong; +Cc: linux-xfs, fstests
Hi all,
Here's the usual odd fixes for fstests.
If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.
With a bit of luck, this should all go splendidly.
Comments and questions are, as always, welcome.
--D
kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=random-fixes
xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=random-fixes
fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=random-fixes
---
Commits in this patchset:
* xfs/841: actually compare the new filesystem contents to the proto dir
---
tests/xfs/841 | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] xfs/841: actually compare the new filesystem contents to the proto dir
2026-04-13 17:50 [PATCHSET 1/2] fstests: more random fixes for v2026.03.20 Darrick J. Wong
@ 2026-04-13 17:50 ` Darrick J. Wong
2026-04-14 7:57 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Darrick J. Wong @ 2026-04-13 17:50 UTC (permalink / raw)
To: zlang, djwong; +Cc: linux-xfs, fstests
From: Darrick J. Wong <djwong@kernel.org>
We should confirm that the directory tree was correctly copied into the
new filesystem, not just that the image files all have the same
checksum.
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
tests/xfs/841 | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/tests/xfs/841 b/tests/xfs/841
index ddb1b3bea10492..175e709c701abc 100755
--- a/tests/xfs/841
+++ b/tests/xfs/841
@@ -16,15 +16,19 @@ _begin_fstest auto quick mkfs
IMG_SIZE="512M"
IMG_FILE="$TEST_DIR/xfs_reproducible_test.img"
PROTO_DIR="$TEST_DIR/proto"
+MNT_DIR="$TEST_DIR/mnt"
# Fixed values for reproducibility
FIXED_UUID="12345678-1234-1234-1234-123456789abc"
FIXED_EPOCH="1234567890"
+rm -r -f "$MNT_DIR"
+mkdir -p "$MNT_DIR"
+
_cleanup() {
cd /
command -v _kill_fsstress &>/dev/null && _kill_fsstress
- rm -r -f $tmp.* "$PROTO_DIR" "$IMG_FILE"
+ rm -r -f $tmp.* "$PROTO_DIR" "$MNT_DIR" "$IMG_FILE"
}
# Check if mkfs.xfs supports required options
@@ -149,6 +153,22 @@ _run_iteration()
echo $hash
}
+_test_iteration()
+{
+ local iteration=$1
+
+ echo "Iteration $iteration: Checking directory tree" >> $seqres.full
+ if ! _mount "$IMG_FILE" "$MNT_DIR"; then
+ echo "Failed to mount filesystem during iteration $iteration"
+ return
+ fi
+
+ diff -Naur --no-dereference "$PROTO_DIR" "$MNT_DIR" 2>/dev/null | \
+ grep -v -E '(special file|fifo|socket) while'
+
+ _unmount "$MNT_DIR"
+}
+
# Create the prototype directory with various file types
_create_proto_dir
@@ -157,12 +177,15 @@ echo "Test: XFS reproducible filesystem image creation"
# Run three iterations
hash1=$(_run_iteration 1)
[ -z "$hash1" ] && _fail "Iteration 1 failed"
+_test_iteration 1
hash2=$(_run_iteration 2)
[ -z "$hash2" ] && _fail "Iteration 2 failed"
+_test_iteration 2
hash3=$(_run_iteration 3)
[ -z "$hash3" ] && _fail "Iteration 3 failed"
+_test_iteration 3
# Verify all hashes match
if [ "$hash1" = "$hash2" ] && [ "$hash2" = "$hash3" ]; then
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] xfs/841: actually compare the new filesystem contents to the proto dir
2026-04-13 17:50 ` [PATCH 1/1] xfs/841: actually compare the new filesystem contents to the proto dir Darrick J. Wong
@ 2026-04-14 7:57 ` Christoph Hellwig
0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2026-04-14 7:57 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: zlang, linux-xfs, fstests
On Mon, Apr 13, 2026 at 10:50:54AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> We should confirm that the directory tree was correctly copied into the
> new filesystem, not just that the image files all have the same
> checksum.
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-14 7:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-13 17:50 [PATCHSET 1/2] fstests: more random fixes for v2026.03.20 Darrick J. Wong
2026-04-13 17:50 ` [PATCH 1/1] xfs/841: actually compare the new filesystem contents to the proto dir Darrick J. Wong
2026-04-14 7:57 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox