* [PATCH 0/2] fstests: basic smoke test on zoned loop device
@ 2025-10-06 13:24 Johannes Thumshirn
2025-10-06 13:24 ` [PATCH 1/2] common/zoned: add _require_zloop Johannes Thumshirn
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Johannes Thumshirn @ 2025-10-06 13:24 UTC (permalink / raw)
To: Zorro Lang
Cc: Christoph Hellwig, Naohiro Aota, linux-btrfs, Hans Holmberg,
fstests, linux-xfs, Johannes Thumshirn
Add a very basic smoke test on a zoned loopback device to check that noone is
accidentially breaking support for zoned block devices in filesystems that
support these.
Currently this includes btrfs, f2fs and xfs.
Johannes Thumshirn (2):
common/zoned: add _require_zloop
generic: basic smoke for filesystems on zoned block devices
common/zoned | 8 +++++++
tests/generic/772 | 53 +++++++++++++++++++++++++++++++++++++++++++
tests/generic/772.out | 2 ++
3 files changed, 63 insertions(+)
create mode 100755 tests/generic/772
create mode 100644 tests/generic/772.out
--
2.51.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/2] common/zoned: add _require_zloop
2025-10-06 13:24 [PATCH 0/2] fstests: basic smoke test on zoned loop device Johannes Thumshirn
@ 2025-10-06 13:24 ` Johannes Thumshirn
2025-10-06 18:06 ` Carlos Maiolino
2025-10-07 4:13 ` Christoph Hellwig
2025-10-06 13:24 ` [PATCH] generic: basic smoke for filesystems on zoned block devices Johannes Thumshirn
2025-10-07 4:15 ` [PATCH 0/2] fstests: basic smoke test on zoned loop device Christoph Hellwig
2 siblings, 2 replies; 12+ messages in thread
From: Johannes Thumshirn @ 2025-10-06 13:24 UTC (permalink / raw)
To: Zorro Lang
Cc: Christoph Hellwig, Naohiro Aota, linux-btrfs, Hans Holmberg,
fstests, linux-xfs, Johannes Thumshirn
Add _require_zloop() function used by tests that require support for the
zoned loopback block device.
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
common/zoned | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/common/zoned b/common/zoned
index eed0082a..41697b08 100644
--- a/common/zoned
+++ b/common/zoned
@@ -37,3 +37,11 @@ _zone_capacity() {
grep -Po "cap 0x[[:xdigit:]]+" | cut -d ' ' -f 2)
echo $((size << 9))
}
+
+_require_zloop()
+{
+ modprobe zloop >/dev/null 2>&1
+ if [ ! -c "/dev/zloop-control" ]; then
+ _notrun "This test requires zoned loopback device support"
+ fi
+}
--
2.51.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH] generic: basic smoke for filesystems on zoned block devices
2025-10-06 13:24 [PATCH 0/2] fstests: basic smoke test on zoned loop device Johannes Thumshirn
2025-10-06 13:24 ` [PATCH 1/2] common/zoned: add _require_zloop Johannes Thumshirn
@ 2025-10-06 13:24 ` Johannes Thumshirn
2025-10-06 18:40 ` Carlos Maiolino
` (2 more replies)
2025-10-07 4:15 ` [PATCH 0/2] fstests: basic smoke test on zoned loop device Christoph Hellwig
2 siblings, 3 replies; 12+ messages in thread
From: Johannes Thumshirn @ 2025-10-06 13:24 UTC (permalink / raw)
To: Zorro Lang
Cc: Christoph Hellwig, Naohiro Aota, linux-btrfs, Hans Holmberg,
fstests, linux-xfs, Johannes Thumshirn
Add a basic smoke test for filesystems that support running on zoned
block devices.
It creates a zloop device with 2 sequential and 62 sequential zones,
mounts it and then runs fsx on it.
Currently this tests supports BTRFS, F2FS and XFS.
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
tests/generic/772 | 52 +++++++++++++++++++++++++++++++++++++++++++
tests/generic/772.out | 2 ++
2 files changed, 54 insertions(+)
create mode 100755 tests/generic/772
create mode 100644 tests/generic/772.out
diff --git a/tests/generic/772 b/tests/generic/772
new file mode 100755
index 00000000..412fd024
--- /dev/null
+++ b/tests/generic/772
@@ -0,0 +1,52 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2025 Wesgtern Digital Corporation. All Rights Reserved.
+#
+# FS QA Test 772
+#
+# Smoke test for FSes with ZBD support on zloop
+#
+. ./common/preamble
+_begin_fstest auto zone quick
+
+_cleanup()
+{
+ if test -b /dev/zloop$ID; then
+ echo "remove id=$ID" > /dev/zloop-control
+ fi
+}
+
+. ./common/zoned
+
+# Modify as appropriate.
+_require_scratch
+_require_scratch_size $((16 * 1024 * 1024)) #kB
+_require_zloop
+
+_scratch_mkfs > /dev/null 2>&1
+_scratch_mount
+
+last_id=$(ls /dev/zloop* 2> /dev/null | grep -E "zloop[0-9]+" | wc -l)
+ID=$((last_id + 1))
+
+mnt="$SCRATCH_MNT/mnt"
+zloopdir="$SCRATCH_MNT/zloop"
+
+zloop_args="add id=$ID,zone_size_mb=256,conv_zones=2,base_dir=$zloopdir"
+
+mkdir -p "$zloopdir/$ID"
+mkdir -p $mnt
+echo "$zloop_args" > /dev/zloop-control
+zloop="/dev/zloop$ID"
+
+_try_mkfs_dev $zloop 2>&1 >> $seqres.full ||\
+ _notrun "cannot mkfs zoned filesystem"
+_mount $zloop $mnt
+
+$FSX_PROG -q -N 20000 $FSX_AVOID "$mnt/fsx" >> $seqres.full
+
+umount $mnt
+
+echo Silence is golden
+# success, all done
+_exit 0
diff --git a/tests/generic/772.out b/tests/generic/772.out
new file mode 100644
index 00000000..98c13968
--- /dev/null
+++ b/tests/generic/772.out
@@ -0,0 +1,2 @@
+QA output created by 772
+Silence is golden
--
2.51.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] common/zoned: add _require_zloop
2025-10-06 13:24 ` [PATCH 1/2] common/zoned: add _require_zloop Johannes Thumshirn
@ 2025-10-06 18:06 ` Carlos Maiolino
2025-10-07 4:13 ` Christoph Hellwig
1 sibling, 0 replies; 12+ messages in thread
From: Carlos Maiolino @ 2025-10-06 18:06 UTC (permalink / raw)
To: Johannes Thumshirn
Cc: Zorro Lang, Christoph Hellwig, Naohiro Aota, linux-btrfs,
Hans Holmberg, fstests, linux-xfs
On Mon, Oct 06, 2025 at 03:24:54PM +0200, Johannes Thumshirn wrote:
> Add _require_zloop() function used by tests that require support for the
> zoned loopback block device.
>
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> ---
> common/zoned | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/common/zoned b/common/zoned
> index eed0082a..41697b08 100644
> --- a/common/zoned
> +++ b/common/zoned
> @@ -37,3 +37,11 @@ _zone_capacity() {
> grep -Po "cap 0x[[:xdigit:]]+" | cut -d ' ' -f 2)
> echo $((size << 9))
> }
> +
> +_require_zloop()
> +{
> + modprobe zloop >/dev/null 2>&1
> + if [ ! -c "/dev/zloop-control" ]; then
> + _notrun "This test requires zoned loopback device support"
> + fi
> +}
Looks good.
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
> --
> 2.51.0
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] generic: basic smoke for filesystems on zoned block devices
2025-10-06 13:24 ` [PATCH] generic: basic smoke for filesystems on zoned block devices Johannes Thumshirn
@ 2025-10-06 18:40 ` Carlos Maiolino
2025-10-07 6:20 ` Johannes Thumshirn
2025-10-07 4:15 ` Christoph Hellwig
2025-10-17 14:57 ` Zorro Lang
2 siblings, 1 reply; 12+ messages in thread
From: Carlos Maiolino @ 2025-10-06 18:40 UTC (permalink / raw)
To: Johannes Thumshirn
Cc: Zorro Lang, Christoph Hellwig, Naohiro Aota, linux-btrfs,
Hans Holmberg, fstests, linux-xfs
On Mon, Oct 06, 2025 at 03:24:55PM +0200, Johannes Thumshirn wrote:
> Add a basic smoke test for filesystems that support running on zoned
> block devices.
>
> It creates a zloop device with 2 sequential and 62 sequential zones,
This seems wrong? Don't you mean 2 conventional zones?
Also, won't the arguments used to create the zone dev end up creating 64
sequential zones? I might be very wrong here, so my apologies in advance
but looking into the zloop code this seems that 256MiB zone size will end
up creating 64 sequential zones instead of 62?
Carlos
> mounts it and then runs fsx on it.
>
> Currently this tests supports BTRFS, F2FS and XFS.
>
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> ---
> tests/generic/772 | 52 +++++++++++++++++++++++++++++++++++++++++++
> tests/generic/772.out | 2 ++
> 2 files changed, 54 insertions(+)
> create mode 100755 tests/generic/772
> create mode 100644 tests/generic/772.out
>
> diff --git a/tests/generic/772 b/tests/generic/772
> new file mode 100755
> index 00000000..412fd024
> --- /dev/null
> +++ b/tests/generic/772
> @@ -0,0 +1,52 @@
> +#! /bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +# Copyright (c) 2025 Wesgtern Digital Corporation. All Rights Reserved.
> +#
> +# FS QA Test 772
> +#
> +# Smoke test for FSes with ZBD support on zloop
> +#
> +. ./common/preamble
> +_begin_fstest auto zone quick
> +
> +_cleanup()
> +{
> + if test -b /dev/zloop$ID; then
> + echo "remove id=$ID" > /dev/zloop-control
> + fi
> +}
> +
> +. ./common/zoned
> +
> +# Modify as appropriate.
> +_require_scratch
> +_require_scratch_size $((16 * 1024 * 1024)) #kB
> +_require_zloop
> +
> +_scratch_mkfs > /dev/null 2>&1
> +_scratch_mount
> +
> +last_id=$(ls /dev/zloop* 2> /dev/null | grep -E "zloop[0-9]+" | wc -l)
> +ID=$((last_id + 1))
> +
> +mnt="$SCRATCH_MNT/mnt"
> +zloopdir="$SCRATCH_MNT/zloop"
> +
> +zloop_args="add id=$ID,zone_size_mb=256,conv_zones=2,base_dir=$zloopdir"
> +
> +mkdir -p "$zloopdir/$ID"
> +mkdir -p $mnt
> +echo "$zloop_args" > /dev/zloop-control
> +zloop="/dev/zloop$ID"
> +
> +_try_mkfs_dev $zloop 2>&1 >> $seqres.full ||\
> + _notrun "cannot mkfs zoned filesystem"
> +_mount $zloop $mnt
> +
> +$FSX_PROG -q -N 20000 $FSX_AVOID "$mnt/fsx" >> $seqres.full
> +
> +umount $mnt
> +
> +echo Silence is golden
> +# success, all done
> +_exit 0
> diff --git a/tests/generic/772.out b/tests/generic/772.out
> new file mode 100644
> index 00000000..98c13968
> --- /dev/null
> +++ b/tests/generic/772.out
> @@ -0,0 +1,2 @@
> +QA output created by 772
> +Silence is golden
> --
> 2.51.0
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] common/zoned: add _require_zloop
2025-10-06 13:24 ` [PATCH 1/2] common/zoned: add _require_zloop Johannes Thumshirn
2025-10-06 18:06 ` Carlos Maiolino
@ 2025-10-07 4:13 ` Christoph Hellwig
1 sibling, 0 replies; 12+ messages in thread
From: Christoph Hellwig @ 2025-10-07 4:13 UTC (permalink / raw)
To: Johannes Thumshirn
Cc: Zorro Lang, Christoph Hellwig, Naohiro Aota, linux-btrfs,
Hans Holmberg, fstests, linux-xfs
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] generic: basic smoke for filesystems on zoned block devices
2025-10-06 13:24 ` [PATCH] generic: basic smoke for filesystems on zoned block devices Johannes Thumshirn
2025-10-06 18:40 ` Carlos Maiolino
@ 2025-10-07 4:15 ` Christoph Hellwig
2025-10-17 14:57 ` Zorro Lang
2 siblings, 0 replies; 12+ messages in thread
From: Christoph Hellwig @ 2025-10-07 4:15 UTC (permalink / raw)
To: Johannes Thumshirn
Cc: Zorro Lang, Christoph Hellwig, Naohiro Aota, linux-btrfs,
Hans Holmberg, fstests, linux-xfs
On Mon, Oct 06, 2025 at 03:24:55PM +0200, Johannes Thumshirn wrote:
> Add a basic smoke test for filesystems that support running on zoned
> block devices.
>
> It creates a zloop device with 2 sequential and 62 sequential zones,
> mounts it and then runs fsx on it.
As Carlos pointed out this feels wrong.
> +last_id=$(ls /dev/zloop* 2> /dev/null | grep -E "zloop[0-9]+" | wc -l)
> +ID=$((last_id + 1))
> +
> +mnt="$SCRATCH_MNT/mnt"
> +zloopdir="$SCRATCH_MNT/zloop"
> +
> +zloop_args="add id=$ID,zone_size_mb=256,conv_zones=2,base_dir=$zloopdir"
> +
> +mkdir -p "$zloopdir/$ID"
> +mkdir -p $mnt
> +echo "$zloop_args" > /dev/zloop-control
> +zloop="/dev/zloop$ID"
And while thinking of the arguments in his reply, maybe all the zloop
magic should go into documented helpers, both to explain it and make it
reusable?
Otherwise this looks good to me.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] fstests: basic smoke test on zoned loop device
2025-10-06 13:24 [PATCH 0/2] fstests: basic smoke test on zoned loop device Johannes Thumshirn
2025-10-06 13:24 ` [PATCH 1/2] common/zoned: add _require_zloop Johannes Thumshirn
2025-10-06 13:24 ` [PATCH] generic: basic smoke for filesystems on zoned block devices Johannes Thumshirn
@ 2025-10-07 4:15 ` Christoph Hellwig
2 siblings, 0 replies; 12+ messages in thread
From: Christoph Hellwig @ 2025-10-07 4:15 UTC (permalink / raw)
To: Johannes Thumshirn
Cc: Zorro Lang, Christoph Hellwig, Naohiro Aota, linux-btrfs,
Hans Holmberg, fstests, linux-xfs
On Mon, Oct 06, 2025 at 03:24:53PM +0200, Johannes Thumshirn wrote:
> Add a very basic smoke test on a zoned loopback device to check that noone is
> accidentially breaking support for zoned block devices in filesystems that
> support these.
Thanks! Having a least minimal zoned file system coverage in standard
xfstests runs seems really useful.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] generic: basic smoke for filesystems on zoned block devices
2025-10-06 18:40 ` Carlos Maiolino
@ 2025-10-07 6:20 ` Johannes Thumshirn
2025-10-07 7:54 ` Carlos Maiolino
0 siblings, 1 reply; 12+ messages in thread
From: Johannes Thumshirn @ 2025-10-07 6:20 UTC (permalink / raw)
To: Carlos Maiolino
Cc: Zorro Lang, hch, Naohiro Aota, linux-btrfs@vger.kernel.org,
Hans Holmberg, fstests@vger.kernel.org, linux-xfs@vger.kernel.org
On 10/6/25 8:40 PM, Carlos Maiolino wrote:
> On Mon, Oct 06, 2025 at 03:24:55PM +0200, Johannes Thumshirn wrote:
>> Add a basic smoke test for filesystems that support running on zoned
>> block devices.
>>
>> It creates a zloop device with 2 sequential and 62 sequential zones,
> This seems wrong? Don't you mean 2 conventional zones?
> Also, won't the arguments used to create the zone dev end up creating 64
> sequential zones? I might be very wrong here, so my apologies in advance
> but looking into the zloop code this seems that 256MiB zone size will end
> up creating 64 sequential zones instead of 62?
2 conventional zones and 62 sequential zones, my mistake:
root@virtme-ng:/mnt# echo "$zloop_args" > /dev/zloop-control
[ 75.986238] zloop: Added device 0: 64 zones of 256 MB, 4096 B block size
root@virtme-ng:/mnt# ls $zloopdir/0
cnv-000000 seq-000011 seq-000022 seq-000033 seq-000044 seq-000055
cnv-000001 seq-000012 seq-000023 seq-000034 seq-000045 seq-000056
seq-000002 seq-000013 seq-000024 seq-000035 seq-000046 seq-000057
seq-000003 seq-000014 seq-000025 seq-000036 seq-000047 seq-000058
seq-000004 seq-000015 seq-000026 seq-000037 seq-000048 seq-000059
seq-000005 seq-000016 seq-000027 seq-000038 seq-000049 seq-000060
seq-000006 seq-000017 seq-000028 seq-000039 seq-000050 seq-000061
seq-000007 seq-000018 seq-000029 seq-000040 seq-000051 seq-000062
seq-000008 seq-000019 seq-000030 seq-000041 seq-000052 seq-000063
seq-000009 seq-000020 seq-000031 seq-000042 seq-000053
seq-000010 seq-000021 seq-000032 seq-000043 seq-000054
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] generic: basic smoke for filesystems on zoned block devices
2025-10-07 6:20 ` Johannes Thumshirn
@ 2025-10-07 7:54 ` Carlos Maiolino
0 siblings, 0 replies; 12+ messages in thread
From: Carlos Maiolino @ 2025-10-07 7:54 UTC (permalink / raw)
To: Johannes Thumshirn
Cc: Zorro Lang, hch, Naohiro Aota, linux-btrfs@vger.kernel.org,
Hans Holmberg, fstests@vger.kernel.org, linux-xfs@vger.kernel.org
On Tue, Oct 07, 2025 at 06:20:42AM +0000, Johannes Thumshirn wrote:
> On 10/6/25 8:40 PM, Carlos Maiolino wrote:
> > On Mon, Oct 06, 2025 at 03:24:55PM +0200, Johannes Thumshirn wrote:
> >> Add a basic smoke test for filesystems that support running on zoned
> >> block devices.
> >>
> >> It creates a zloop device with 2 sequential and 62 sequential zones,
> > This seems wrong? Don't you mean 2 conventional zones?
> > Also, won't the arguments used to create the zone dev end up creating 64
> > sequential zones? I might be very wrong here, so my apologies in advance
> > but looking into the zloop code this seems that 256MiB zone size will end
> > up creating 64 sequential zones instead of 62?
>
> 2 conventional zones and 62 sequential zones, my mistake:
Ah, 64 is the total zone number not sequential only.
Other than the nitpick on the description, this looks fine then:
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
>
> root@virtme-ng:/mnt# echo "$zloop_args" > /dev/zloop-control
> [ 75.986238] zloop: Added device 0: 64 zones of 256 MB, 4096 B block size
> root@virtme-ng:/mnt# ls $zloopdir/0
> cnv-000000 seq-000011 seq-000022 seq-000033 seq-000044 seq-000055
> cnv-000001 seq-000012 seq-000023 seq-000034 seq-000045 seq-000056
> seq-000002 seq-000013 seq-000024 seq-000035 seq-000046 seq-000057
> seq-000003 seq-000014 seq-000025 seq-000036 seq-000047 seq-000058
> seq-000004 seq-000015 seq-000026 seq-000037 seq-000048 seq-000059
> seq-000005 seq-000016 seq-000027 seq-000038 seq-000049 seq-000060
> seq-000006 seq-000017 seq-000028 seq-000039 seq-000050 seq-000061
> seq-000007 seq-000018 seq-000029 seq-000040 seq-000051 seq-000062
> seq-000008 seq-000019 seq-000030 seq-000041 seq-000052 seq-000063
> seq-000009 seq-000020 seq-000031 seq-000042 seq-000053
> seq-000010 seq-000021 seq-000032 seq-000043 seq-000054
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] generic: basic smoke for filesystems on zoned block devices
2025-10-06 13:24 ` [PATCH] generic: basic smoke for filesystems on zoned block devices Johannes Thumshirn
2025-10-06 18:40 ` Carlos Maiolino
2025-10-07 4:15 ` Christoph Hellwig
@ 2025-10-17 14:57 ` Zorro Lang
2025-10-17 18:21 ` Zorro Lang
2 siblings, 1 reply; 12+ messages in thread
From: Zorro Lang @ 2025-10-17 14:57 UTC (permalink / raw)
To: Johannes Thumshirn
Cc: Christoph Hellwig, Naohiro Aota, linux-btrfs, Hans Holmberg,
fstests, linux-xfs
On Mon, Oct 06, 2025 at 03:24:55PM +0200, Johannes Thumshirn wrote:
> Add a basic smoke test for filesystems that support running on zoned
> block devices.
>
> It creates a zloop device with 2 sequential and 62 sequential zones,
> mounts it and then runs fsx on it.
>
> Currently this tests supports BTRFS, F2FS and XFS.
>
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> ---
> tests/generic/772 | 52 +++++++++++++++++++++++++++++++++++++++++++
> tests/generic/772.out | 2 ++
> 2 files changed, 54 insertions(+)
> create mode 100755 tests/generic/772
> create mode 100644 tests/generic/772.out
>
> diff --git a/tests/generic/772 b/tests/generic/772
> new file mode 100755
> index 00000000..412fd024
> --- /dev/null
> +++ b/tests/generic/772
> @@ -0,0 +1,52 @@
> +#! /bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +# Copyright (c) 2025 Wesgtern Digital Corporation. All Rights Reserved.
> +#
> +# FS QA Test 772
> +#
> +# Smoke test for FSes with ZBD support on zloop
> +#
> +. ./common/preamble
> +_begin_fstest auto zone quick
> +
> +_cleanup()
> +{
> + if test -b /dev/zloop$ID; then
> + echo "remove id=$ID" > /dev/zloop-control
> + fi
> +}
> +
> +. ./common/zoned
> +
> +# Modify as appropriate.
> +_require_scratch
> +_require_scratch_size $((16 * 1024 * 1024)) #kB
_require_scratch_size contains _require_scratch, so you can remove _require_scratch.
Can you explain why we need 16GiB free space for these parameters?
> +_require_zloop
> +
> +_scratch_mkfs > /dev/null 2>&1
> +_scratch_mount
> +
> +last_id=$(ls /dev/zloop* 2> /dev/null | grep -E "zloop[0-9]+" | wc -l)
> +ID=$((last_id + 1))
> +
> +mnt="$SCRATCH_MNT/mnt"
> +zloopdir="$SCRATCH_MNT/zloop"
> +
> +zloop_args="add id=$ID,zone_size_mb=256,conv_zones=2,base_dir=$zloopdir"
> +
> +mkdir -p "$zloopdir/$ID"
> +mkdir -p $mnt
> +echo "$zloop_args" > /dev/zloop-control
> +zloop="/dev/zloop$ID"
About this part, can we have a common helper (e.g. _create_zloop_device) which
can get a free zloop number and create a zloop dev, then output the device name
if it's created successfully ?
> +
> +_try_mkfs_dev $zloop 2>&1 >> $seqres.full ||\
> + _notrun "cannot mkfs zoned filesystem"
As this's a generic test case, I'm wondering if the zloop device can be created
on any FSTYP? For example if FSTYP is nfs or cifs or overlay or tmpfs or exfat
and so on.
> +_mount $zloop $mnt
> +
> +$FSX_PROG -q -N 20000 $FSX_AVOID "$mnt/fsx" >> $seqres.full
Do you care about the return status of fsx? If so, you can use _run_fsx or run_fsx.
> +
> +umount $mnt
Please make sure "the $mnt is unmounted" and "all zloop devices are removed"
in _cleanup.
Thanks,
Zorro
> +
> +echo Silence is golden
> +# success, all done
> +_exit 0
> diff --git a/tests/generic/772.out b/tests/generic/772.out
> new file mode 100644
> index 00000000..98c13968
> --- /dev/null
> +++ b/tests/generic/772.out
> @@ -0,0 +1,2 @@
> +QA output created by 772
> +Silence is golden
> --
> 2.51.0
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] generic: basic smoke for filesystems on zoned block devices
2025-10-17 14:57 ` Zorro Lang
@ 2025-10-17 18:21 ` Zorro Lang
0 siblings, 0 replies; 12+ messages in thread
From: Zorro Lang @ 2025-10-17 18:21 UTC (permalink / raw)
To: Johannes Thumshirn
Cc: Christoph Hellwig, Naohiro Aota, linux-btrfs, Hans Holmberg,
fstests, linux-xfs
On Fri, Oct 17, 2025 at 10:57:42PM +0800, Zorro Lang wrote:
> On Mon, Oct 06, 2025 at 03:24:55PM +0200, Johannes Thumshirn wrote:
> > Add a basic smoke test for filesystems that support running on zoned
> > block devices.
> >
> > It creates a zloop device with 2 sequential and 62 sequential zones,
> > mounts it and then runs fsx on it.
> >
> > Currently this tests supports BTRFS, F2FS and XFS.
> >
> > Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> > ---
Please ignore this, I checked the old version.
> > tests/generic/772 | 52 +++++++++++++++++++++++++++++++++++++++++++
> > tests/generic/772.out | 2 ++
> > 2 files changed, 54 insertions(+)
> > create mode 100755 tests/generic/772
> > create mode 100644 tests/generic/772.out
> >
> > diff --git a/tests/generic/772 b/tests/generic/772
> > new file mode 100755
> > index 00000000..412fd024
> > --- /dev/null
> > +++ b/tests/generic/772
> > @@ -0,0 +1,52 @@
> > +#! /bin/bash
> > +# SPDX-License-Identifier: GPL-2.0
> > +# Copyright (c) 2025 Wesgtern Digital Corporation. All Rights Reserved.
> > +#
> > +# FS QA Test 772
> > +#
> > +# Smoke test for FSes with ZBD support on zloop
> > +#
> > +. ./common/preamble
> > +_begin_fstest auto zone quick
> > +
> > +_cleanup()
> > +{
> > + if test -b /dev/zloop$ID; then
> > + echo "remove id=$ID" > /dev/zloop-control
> > + fi
> > +}
> > +
> > +. ./common/zoned
> > +
> > +# Modify as appropriate.
> > +_require_scratch
> > +_require_scratch_size $((16 * 1024 * 1024)) #kB
>
> _require_scratch_size contains _require_scratch, so you can remove _require_scratch.
>
> Can you explain why we need 16GiB free space for these parameters?
>
> > +_require_zloop
> > +
> > +_scratch_mkfs > /dev/null 2>&1
> > +_scratch_mount
> > +
>
>
> > +last_id=$(ls /dev/zloop* 2> /dev/null | grep -E "zloop[0-9]+" | wc -l)
> > +ID=$((last_id + 1))
> > +
> > +mnt="$SCRATCH_MNT/mnt"
> > +zloopdir="$SCRATCH_MNT/zloop"
> > +
> > +zloop_args="add id=$ID,zone_size_mb=256,conv_zones=2,base_dir=$zloopdir"
> > +
> > +mkdir -p "$zloopdir/$ID"
> > +mkdir -p $mnt
> > +echo "$zloop_args" > /dev/zloop-control
> > +zloop="/dev/zloop$ID"
>
> About this part, can we have a common helper (e.g. _create_zloop_device) which
> can get a free zloop number and create a zloop dev, then output the device name
> if it's created successfully ?
>
> > +
> > +_try_mkfs_dev $zloop 2>&1 >> $seqres.full ||\
> > + _notrun "cannot mkfs zoned filesystem"
>
> As this's a generic test case, I'm wondering if the zloop device can be created
> on any FSTYP? For example if FSTYP is nfs or cifs or overlay or tmpfs or exfat
> and so on.
>
> > +_mount $zloop $mnt
> > +
> > +$FSX_PROG -q -N 20000 $FSX_AVOID "$mnt/fsx" >> $seqres.full
>
> Do you care about the return status of fsx? If so, you can use _run_fsx or run_fsx.
>
> > +
> > +umount $mnt
>
> Please make sure "the $mnt is unmounted" and "all zloop devices are removed"
> in _cleanup.
>
> Thanks,
> Zorro
>
> > +
> > +echo Silence is golden
> > +# success, all done
> > +_exit 0
> > diff --git a/tests/generic/772.out b/tests/generic/772.out
> > new file mode 100644
> > index 00000000..98c13968
> > --- /dev/null
> > +++ b/tests/generic/772.out
> > @@ -0,0 +1,2 @@
> > +QA output created by 772
> > +Silence is golden
> > --
> > 2.51.0
> >
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2025-10-17 18:21 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-06 13:24 [PATCH 0/2] fstests: basic smoke test on zoned loop device Johannes Thumshirn
2025-10-06 13:24 ` [PATCH 1/2] common/zoned: add _require_zloop Johannes Thumshirn
2025-10-06 18:06 ` Carlos Maiolino
2025-10-07 4:13 ` Christoph Hellwig
2025-10-06 13:24 ` [PATCH] generic: basic smoke for filesystems on zoned block devices Johannes Thumshirn
2025-10-06 18:40 ` Carlos Maiolino
2025-10-07 6:20 ` Johannes Thumshirn
2025-10-07 7:54 ` Carlos Maiolino
2025-10-07 4:15 ` Christoph Hellwig
2025-10-17 14:57 ` Zorro Lang
2025-10-17 18:21 ` Zorro Lang
2025-10-07 4:15 ` [PATCH 0/2] fstests: basic smoke test on zoned loop device Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).