Re: [PATCH] fstests: fix _require_debugfs and call it properly

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



On Mon, Apr 29, 2024 at 02:09:06PM +0800, Zorro Lang wrote:
> The old _require_debugfs helper doesn't work now, fix it to check
> a system supports debugfs. And then call this helper in cases which
> need $DEBUGFS_MNT.
> 
> Signed-off-by: Zorro Lang <zlang@xxxxxxxxxx>
> ---
>  common/rc       | 10 ++++++++--
>  tests/btrfs/150 |  1 +
>  tests/ceph/001  |  2 +-
>  tests/xfs/499   |  1 +
>  4 files changed, 11 insertions(+), 3 deletions(-)
> 
> diff --git a/common/rc b/common/rc
> index 56f1afb6..6f0bdf60 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -2978,8 +2978,14 @@ _require_sparse_files()
>  
>  _require_debugfs()
>  {
> -    #boot_params always present in debugfs
> -    [ -d "$DEBUGFS_MNT/boot_params" ] || _notrun "Debugfs not mounted"
> +	local type
> +
> +	if [ -d "$DEBUGFS_MNT" ];then
> +		type=$(findmnt -rncv -T $DEBUGFS_MNT -S debugfs -o FSTYPE)

With:

-S debugfs

On debian this returns nothing. Removing that fixes it on debian. I'll
send patch.

  Luis




[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