* [PATCH 1/2] ext4/045: skip test if the block size is 1k
@ 2024-06-11 8:58 Theodore Ts'o
2024-06-11 8:58 ` [PATCH 2/2] generic/455: skip the test if the file system doesn't support journaling Theodore Ts'o
2024-06-11 14:27 ` [PATCH 1/2] ext4/045: skip test if the block size is 1k Darrick J. Wong
0 siblings, 2 replies; 6+ messages in thread
From: Theodore Ts'o @ 2024-06-11 8:58 UTC (permalink / raw)
To: fstests; +Cc: Theodore Ts'o
If the file system is 1k, this test will fail because with dir_index
enabled, the directory tree will get too deep, and the kernel will
return ENOSPC and log the EXT4-fs warning "Directory (ino: NNN) index
full, reach max htree level: 2". So if the blocksize is less than 2k,
_notrun this test.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
tests/ext4/045 | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/ext4/045 b/tests/ext4/045
index 4f0ad4aa7..5ae7a45b5 100755
--- a/tests/ext4/045
+++ b/tests/ext4/045
@@ -44,6 +44,10 @@ workout()
_scratch_mkfs "-O extent,dir_nlink,dir_index -I 256" >> $seqres.full 2>&1
_scratch_mount
+ blocksize=$(_get_block_size $SCRATCH_MNT)
+ if [ "$blocksize" -lt 2048 ]; then
+ _notrun "blocksize $blocksize, too small"
+ fi
# create directories
mkdir -p $3 2> /dev/null
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/2] generic/455: skip the test if the file system doesn't support journaling
2024-06-11 8:58 [PATCH 1/2] ext4/045: skip test if the block size is 1k Theodore Ts'o
@ 2024-06-11 8:58 ` Theodore Ts'o
2024-06-11 14:27 ` Darrick J. Wong
2024-06-11 14:27 ` [PATCH 1/2] ext4/045: skip test if the block size is 1k Darrick J. Wong
1 sibling, 1 reply; 6+ messages in thread
From: Theodore Ts'o @ 2024-06-11 8:58 UTC (permalink / raw)
To: fstests; +Cc: Theodore Ts'o
This test uses dm-log-writes to test power fail scenarios, so it won't
work if the file system doesn't support metadata journaling.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
tests/generic/455 | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tests/generic/455 b/tests/generic/455
index da803de08..75437b90d 100755
--- a/tests/generic/455
+++ b/tests/generic/455
@@ -65,6 +65,13 @@ _log_writes_init $DMTHIN_VOL_DEV
_log_writes_mkfs >> $seqres.full 2>&1
+# This test requires metadata journaling since it simulates a power failure
+msg=$(_has_metadata_journaling "$LOGWRITES_DMDEV")
+if [ -n "$msg" ]; then
+ _log_writes_remove
+ _notrun "$msg"
+fi
+
# Log writes emulates discard support, turn it on for maximum crying.
_log_writes_mount -o discard
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] generic/455: skip the test if the file system doesn't support journaling
2024-06-11 8:58 ` [PATCH 2/2] generic/455: skip the test if the file system doesn't support journaling Theodore Ts'o
@ 2024-06-11 14:27 ` Darrick J. Wong
2024-06-11 22:26 ` Theodore Ts'o
0 siblings, 1 reply; 6+ messages in thread
From: Darrick J. Wong @ 2024-06-11 14:27 UTC (permalink / raw)
To: Theodore Ts'o; +Cc: fstests
On Tue, Jun 11, 2024 at 04:58:53AM -0400, Theodore Ts'o wrote:
> This test uses dm-log-writes to test power fail scenarios, so it won't
> work if the file system doesn't support metadata journaling.
>
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> ---
> tests/generic/455 | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/tests/generic/455 b/tests/generic/455
> index da803de08..75437b90d 100755
> --- a/tests/generic/455
> +++ b/tests/generic/455
> @@ -65,6 +65,13 @@ _log_writes_init $DMTHIN_VOL_DEV
>
> _log_writes_mkfs >> $seqres.full 2>&1
>
> +# This test requires metadata journaling since it simulates a power failure
> +msg=$(_has_metadata_journaling "$LOGWRITES_DMDEV")
> +if [ -n "$msg" ]; then
> + _log_writes_remove
> + _notrun "$msg"
> +fi
_require_metadata_journaling $LOGWRITES_DMDEV ?
afaict the _cleanup() function will call _log_writes_cleanup ->
_log_writes_remove for you.
--D
> +
> # Log writes emulates discard support, turn it on for maximum crying.
> _log_writes_mount -o discard
>
> --
> 2.43.0
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] generic/455: skip the test if the file system doesn't support journaling
2024-06-11 14:27 ` Darrick J. Wong
@ 2024-06-11 22:26 ` Theodore Ts'o
0 siblings, 0 replies; 6+ messages in thread
From: Theodore Ts'o @ 2024-06-11 22:26 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: fstests
On Tue, Jun 11, 2024 at 07:27:01AM -0700, Darrick J. Wong wrote:
>
> _require_metadata_journaling $LOGWRITES_DMDEV ?
>
> afaict the _cleanup() function will call _log_writes_cleanup ->
> _log_writes_remove for you.
Good point, I had forgotten that rely on the _cleanup handling. I'll
fix that in the next version of these patches.
- Ted
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] ext4/045: skip test if the block size is 1k
2024-06-11 8:58 [PATCH 1/2] ext4/045: skip test if the block size is 1k Theodore Ts'o
2024-06-11 8:58 ` [PATCH 2/2] generic/455: skip the test if the file system doesn't support journaling Theodore Ts'o
@ 2024-06-11 14:27 ` Darrick J. Wong
2024-06-11 16:40 ` Theodore Ts'o
1 sibling, 1 reply; 6+ messages in thread
From: Darrick J. Wong @ 2024-06-11 14:27 UTC (permalink / raw)
To: Theodore Ts'o; +Cc: fstests
On Tue, Jun 11, 2024 at 04:58:52AM -0400, Theodore Ts'o wrote:
> If the file system is 1k, this test will fail because with dir_index
> enabled, the directory tree will get too deep, and the kernel will
> return ENOSPC and log the EXT4-fs warning "Directory (ino: NNN) index
> full, reach max htree level: 2". So if the blocksize is less than 2k,
> _notrun this test.
Didn't ext4 recently gain support for 3-level htrees?
--D
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> ---
> tests/ext4/045 | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tests/ext4/045 b/tests/ext4/045
> index 4f0ad4aa7..5ae7a45b5 100755
> --- a/tests/ext4/045
> +++ b/tests/ext4/045
> @@ -44,6 +44,10 @@ workout()
>
> _scratch_mkfs "-O extent,dir_nlink,dir_index -I 256" >> $seqres.full 2>&1
> _scratch_mount
> + blocksize=$(_get_block_size $SCRATCH_MNT)
> + if [ "$blocksize" -lt 2048 ]; then
> + _notrun "blocksize $blocksize, too small"
> + fi
>
> # create directories
> mkdir -p $3 2> /dev/null
> --
> 2.43.0
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] ext4/045: skip test if the block size is 1k
2024-06-11 14:27 ` [PATCH 1/2] ext4/045: skip test if the block size is 1k Darrick J. Wong
@ 2024-06-11 16:40 ` Theodore Ts'o
0 siblings, 0 replies; 6+ messages in thread
From: Theodore Ts'o @ 2024-06-11 16:40 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: fstests
On Tue, Jun 11, 2024 at 07:27:54AM -0700, Darrick J. Wong wrote:
> On Tue, Jun 11, 2024 at 04:58:52AM -0400, Theodore Ts'o wrote:
> > If the file system is 1k, this test will fail because with dir_index
> > enabled, the directory tree will get too deep, and the kernel will
> > return ENOSPC and log the EXT4-fs warning "Directory (ino: NNN) index
> > full, reach max htree level: 2". So if the blocksize is less than 2k,
> > _notrun this test.
>
> Didn't ext4 recently gain support for 3-level htrees?
Ext4 has support for a while, but it's an optional feature which is
not enabled by default. I suppose we could try to set the feature,
and skip the test if the kernel doesn't support it. (Or decide that
no one cares about RHEL7, and just YOLO, since who else still cares
about kernels older than 4.13? :-)
I'm just not sure whether it's worth the extra complexity to do it,
but for those people who care about code coverage statistics, it would
help a tiny amount....
- Ted
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-06-11 22:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-11 8:58 [PATCH 1/2] ext4/045: skip test if the block size is 1k Theodore Ts'o
2024-06-11 8:58 ` [PATCH 2/2] generic/455: skip the test if the file system doesn't support journaling Theodore Ts'o
2024-06-11 14:27 ` Darrick J. Wong
2024-06-11 22:26 ` Theodore Ts'o
2024-06-11 14:27 ` [PATCH 1/2] ext4/045: skip test if the block size is 1k Darrick J. Wong
2024-06-11 16:40 ` Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox