Re: [PATCH v2] fstests: add support for hfsplus

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



On Tue, Sep 25, 2018 at 12:44 AM Ernesto A. Fernández
<ernesto.mnd.fernandez@xxxxxxxxx> wrote:
>
> Running tests on hfsplus requires patched versions of the mkfs and fsck
> tools [1] that support filesystems smaller than the device.

That's not accurate, is it? Wouldn't it be more accurate to say that the patched
tools are required to run the _scratch_mkfs_sized tests?

>
> [1] https://github.com/eafer/hfsprogs-linux.git
>
> Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@xxxxxxxxx>
> ---
>  common/config | 10 ++++++++++
>  common/rc     | 15 ++++++++++++++-
>  2 files changed, 24 insertions(+), 1 deletion(-)
>
> diff --git a/common/config b/common/config
> index 1ba8d96c..315f8b1e 100644
> --- a/common/config
> +++ b/common/config
> @@ -229,6 +229,7 @@ case "$HOSTOS" in
>         export MKFS_CIFS_PROG="false"
>         export MKFS_OVERLAY_PROG="false"
>         export MKFS_REISER4_PROG=$(type -P mkfs.reiser4)
> +       export MKFS_HFSPLUS_PROG=$(type -P mkfs.hfsplus)
>         export E2FSCK_PROG=$(type -P e2fsck)
>         export TUNE2FS_PROG=$(type -P tune2fs)
>         export FSCK_OVERLAY_PROG=$(type -P fsck.overlay)
> @@ -313,6 +314,9 @@ _mount_opts()
>         ubifs)
>                 export MOUNT_OPTIONS=$UBIFS_MOUNT_OPTIONS
>                 ;;
> +       hfsplus)
> +               export MOUNT_OPTIONS=$HFSPLUS_MOUNT_OPTIONS
> +               ;;
>         *)
>                 ;;
>         esac
> @@ -380,6 +384,9 @@ _mkfs_opts()
>         f2fs)
>                 export MKFS_OPTIONS="$F2FS_MKFS_OPTIONS"
>                 ;;
> +       hfsplus)
> +               export MKFS_OPTIONS=$HFSPLUS_MKFS_OPTIONS
> +               ;;
>         *)
>                 ;;
>         esac
> @@ -397,6 +404,9 @@ _fsck_opts()
>         f2fs)
>                 export FSCK_OPTIONS=""
>                 ;;
> +       hfsplus)
> +               export FSCK_OPTIONS="-nX"
> +               ;;
>         *)
>                 export FSCK_OPTIONS="-n"
>                 ;;
> diff --git a/common/rc b/common/rc
> index d5bb1fee..a843e9f6 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -158,6 +158,12 @@ case "$FSTYP" in
>      ubifs)
>         [ "$UBIUPDATEVOL_PROG" = "" ] && _fatal "ubiupdatevol not found"
>         ;;
> +    hfsplus)
> +       [ "$MKFS_HFSPLUS_PROG" = "" ] && _fatal "mkfs.hfsplus not found"
> +       mkfs.hfsplus -X |& grep "invalid" &&
> +               _fatal "A patched version of mkfs.hfsplus is required:" \
> +                      "https://github.com/eafer/hfsprogs-linux.git";

Why fatal and not just notrun the _scratch_mkfs_sized tests if no -X support?
Must all tests run with mkfs -X and fsck -X??

> +       ;;
>  esac
>
>  if [ ! -z "$REPORT_LIST" ]; then
> @@ -746,6 +752,10 @@ _scratch_mkfs()
>                 mkfs_cmd="yes | $MKFS_PROG -t $FSTYP --"
>                 mkfs_filter="grep -v -e ^mkfs\.ocfs2"
>                 ;;
> +       hfsplus)
> +               mkfs_cmd="yes | $MKFS_PROG -t $FSTYP -- -X"

-X here seems like a typo?

Thanks,
Amir.




[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