public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Florian Weimer <fw@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc/release/2.35/master] io: Add fsync call in tst-stat Date: Fri, 11 Mar 2022 10:11:13 +0000 (GMT) [thread overview] Message-ID: <20220311101113.7FA703858D3C@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3149f47b808288ccfbf4e56234bc07bdae139708 commit 3149f47b808288ccfbf4e56234bc07bdae139708 Author: Florian Weimer <fweimer@redhat.com> Date: Mon Feb 28 11:50:41 2022 +0100 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) Diff: --- io/tst-stat.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/io/tst-stat.c b/io/tst-stat.c index 2b7975e162..237988203a 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");
reply other threads:[~2022-03-11 10:11 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220311101113.7FA703858D3C@sourceware.org \ --to=fw@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).