Re: [PATCH 2/2] generic/455: skip the test if the file system doesn't support journaling

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



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@xxxxxxx>
> ---
>  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
> 
> 




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux