From 1966f47a1e54f962a355a5f6a6b730c9848ab956 Mon Sep 17 00:00:00 2001 From: Stefan Liebler Date: Wed, 17 Mar 2021 14:03:52 +0100 Subject: S390: Don't test nanoseconds in io/tst-stat.c Both new tests io/tst-stat and io/tst-stat-lfs (_FILE_OFFSET_BITS=64) are comparing the nanosecond fields with the statx result. Unfortunately on s390(31bit) those fields are always zero if old KABI with non-LFS support is used. With _FILE_OFFSET_BITS=64 stat is using statx internally. As suggested by Adhemerval this patch disables the nanosecond check for s390(31bit). Reviewed-by: Adhemerval Zanella --- io/tst-stat.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'io') diff --git a/io/tst-stat.c b/io/tst-stat.c index 445ac4176c..397d480ecc 100644 --- a/io/tst-stat.c +++ b/io/tst-stat.c @@ -91,9 +91,12 @@ do_test (void) TEST_COMPARE (stx.stx_blocks, st.st_blocks); TEST_COMPARE (stx.stx_ctime.tv_sec, st.st_ctim.tv_sec); - TEST_COMPARE (stx.stx_ctime.tv_nsec, st.st_ctim.tv_nsec); TEST_COMPARE (stx.stx_mtime.tv_sec, st.st_mtim.tv_sec); - TEST_COMPARE (stx.stx_mtime.tv_nsec, st.st_mtim.tv_nsec); + if (support_stat_nanoseconds ()) + { + TEST_COMPARE (stx.stx_ctime.tv_nsec, st.st_ctim.tv_nsec); + TEST_COMPARE (stx.stx_mtime.tv_nsec, st.st_mtim.tv_nsec); + } } return 0; -- cgit v1.2.3