Message ID | 20240611085853.200102-2-tytso@mit.edu (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] ext4/045: skip test if the block size is 1k | expand |
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 > >
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
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
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(+)