On Mon, Dec 23, 2019 at 7:16 AM Deepa Dinamani <[email protected]> wrote:
>
> Addition of fs-specific timestamp range checking was added
> in 188d20bcd1eb ("vfs: Add file timestamp range support").
>
> Add a check for whether the kernel supports the limits check
> before running the associated test.
>
> Signed-off-by: Deepa Dinamani <[email protected]>
> ---
>  common/rc         | 11 +++++++++++
>  tests/generic/402 |  3 +++
>  2 files changed, 14 insertions(+)
>
> diff --git a/common/rc b/common/rc
> index 816588d6..472db995 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -1981,6 +1981,17 @@ _run_aiodio()
>      return $status
>  }
>
> +_require_kernel_timestamp_range()
> +{
> +       # 128-byte inodes do not have room for extended timestamp
> +       MKFS_OPTIONS=-I128 _scratch_mkfs_ext4 &>> $seqres.full 2>&1 || _fail 
> "ext4 mkfs failed"
> +
> +       mount -t ext4 ${SCRATCH_DEV} ${SCRATCH_MNT}
> +       _check_dmesg_for "ext4 filesystem being mounted at ${SCRATCH_MNT} 
> supports timestamps until 2038" || \
> +               _notrun "Kernel does not support timestamp limits"
> +       umount ${SCRATCH_MNT}
> +}
> +

Deepa,

Thank you for following up.
I am not sure if mkfs.ext4 of scratch partition in a generic test is going to be
very popular - let's see what others have to say.
You can certainly now do that without checking that  ${SCRATCH_DEV} is
a blockdev which is not the case for overlay and networking filesystems.

Why did you choose not to use a loop mounted ext2 for the check as
I suggested?
You can use _require_loop() and _require_ext2() inside the check.
In any case, please also check for failure to mount.

Thanks,
Amir.
_______________________________________________
Y2038 mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/y2038

Reply via email to