From: Christoph Hellwig Date: Mon, 2 Feb 2026 08:57:01 +0000 (+0100) Subject: xfs/841: create a block device that must exist X-Git-Tag: v2026.02.26~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=163dbbfaacf0b6d1c62e9363546356e198644f45;p=xfstests-dev.git xfs/841: create a block device that must exist This test currently creates a block device node for /dev/ram0, which isn't guaranteed to exist, and can thus cause the test to fail with: mkfs.xfs: cannot open $TEST_DIR/proto/blockdev: No such device or address Instead, create a node for the backing device for $TEST_DIR, which must exist. Signed-off-by: Christoph Hellwig Reviewed-by: Zorro Lang Reviewed-by: Luca Di Maio Signed-off-by: Zorro Lang --- diff --git a/tests/xfs/841 b/tests/xfs/841 index ee2368d4..ddb1b3be 100755 --- a/tests/xfs/841 +++ b/tests/xfs/841 @@ -85,9 +85,12 @@ _create_proto_dir() $here/src/af_unix "$PROTO_DIR/socket" 2> /dev/null || true # Block device (requires root) - mknod "$PROTO_DIR/blockdev" b 1 0 2> /dev/null || true + # Uses the device for $TEST_DIR to ensure it always exists. + mknod "$PROTO_DIR/blockdev" b $(stat -c '%Hd %Ld' $TEST_DIR) \ + 2> /dev/null || true # Character device (requires root) + # Uses /dev/null, which should always exist mknod "$PROTO_DIR/chardev" c 1 3 2> /dev/null || true }