diff options
author | Florian Weimer <fweimer@redhat.com> | 2022-02-28 11:50:41 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2022-03-11 11:13:33 +0100 |
commit | b5032c3d37aa614644c7afbad33bb8226a52e6da (patch) | |
tree | 2765858b1f72971016cb6218f0e10d0be6c4d86e /io | |
parent | 6c9c2307657529e52c5fa7037618835f2a50b916 (diff) | |
download | glibc-b5032c3d37aa614644c7afbad33bb8226a52e6da.zip glibc-b5032c3d37aa614644c7afbad33bb8226a52e6da.tar.gz glibc-b5032c3d37aa614644c7afbad33bb8226a52e6da.tar.bz2 |
io: Add fsync call in tst-stat
io/tst-stat and io/tst-stat-lfs fail sporadically on the Fedora
builders, and this change hopefully helps to avoid the issue.
(cherry picked from commit ae132284092edc5885315b44cd17d5ea91177e49)
Diffstat (limited to 'io')
-rw-r--r-- | io/tst-stat.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/io/tst-stat.c b/io/tst-stat.c index 82e965d..be20cf1 100644 --- a/io/tst-stat.c +++ b/io/tst-stat.c @@ -69,6 +69,10 @@ do_test (void) TEST_VERIFY_EXIT (fd >= 0); support_write_file_string (path, "abc"); + /* This should help to prevent delayed allocation, which may result + in a spurious stx_blocks/st_blocks difference. */ + fsync (fd); + bool check_ns = support_stat_nanoseconds (path); if (!check_ns) printf ("warning: timestamp with nanoseconds not supported\n"); |