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 | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/testcases/kernel/syscalls/open/open12.c b/testcases/kernel/syscalls/open/open12.c index af3fab3..5bbf9ee 100644 --- a/testcases/kernel/syscalls/open/open12.c +++ b/testcases/kernel/syscalls/open/open12.c @@ -90,6 +90,14 @@ static void setup(void) if (tst_path_has_mnt_flags(cleanup, NULL, mount_flags)) { const char *fs_type; + if ((tst_kvercmp(2, 6, 30)) < 0) { + tst_resm(TCONF, + "MS_STRICTATIME flags for mount(2) needs kernel 2.6.30 " + "or higher"); + skip_noatime = 1; + return; + } + fs_type = tst_dev_fs_type(); device = tst_acquire_device(cleanup); -- 1.6.0.2 ------------------------------------------------------------------------------ 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