Hi!
> Call tst_kvercmp() to check the kernel version(newer than 2.6.30) before
> calling SAFE_MOUNT( MS_STRICTATIME ).
> 
> Signed-off-by: Cui Bixuan <cuibix...@huawei.com>
> ---
>  testcases/kernel/syscalls/open/open12.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/testcases/kernel/syscalls/open/open12.c 
> b/testcases/kernel/syscalls/open/open12.c
> index e665368..9d315fb 100644
> --- a/testcases/kernel/syscalls/open/open12.c
> +++ b/testcases/kernel/syscalls/open/open12.c
> @@ -80,6 +80,13 @@ static void setup(void)
> 
>       TEST_PAUSE;
> 
> +     if ((tst_kvercmp(2, 6, 30)) < 0) {
> +                tst_resm(TCONF,
> +                         "MS_STRICTATIME flags for mount(2) needs kernel 
> 2.6.30 "
> +                         "or higher");
> +                return;
> +        }

This is not right place to do it. The flag is used only when we need to
mount the loop device so the check should be done only if we are about
to acquire the device. And we should set the skip_noatime flag there as
well.

-- 
Cyril Hrubis
chru...@suse.cz

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to