[
https://issues.apache.org/jira/browse/MESOS-9316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Benjamin Mahler reassigned MESOS-9316:
--------------------------------------
Assignee: Benjamin Mahler
> FsTest.Used is flaky
> --------------------
>
> Key: MESOS-9316
> URL: https://issues.apache.org/jira/browse/MESOS-9316
> Project: Mesos
> Issue Type: Bug
> Components: stout, test
> Reporter: Benjamin Bannier
> Assignee: Benjamin Mahler
> Priority: Major
> Labels: flaky, flaky-test
>
> The stout test \{{FsTest.Used}} is flaky,
> {code}
> [ RUN ] FsTest.Used
> ../3rdparty/stout/tests/os/filesystem_tests.cpp:817: Failure
> Expected: used.get() / b.f_frsize
> Which is: 1246447B
> To be equal to: b.f_blocks - b.f_bfree
> Which is: 1246384
> [ FAILED ] FsTest.Used (0 ms)
> {code}
> Looking at the test implementation this appears to be due to the test
> acquiring the two compared values non-atomically,
> {code}
> TEST_F(FsTest, Used)
> {
> Try<Bytes> used = fs::used(".");
> ASSERT_SOME(used);
> struct statvfs b;
> ASSERT_EQ(0, ::statvfs(".", &b));
> // Check that the block counts match.
> EXPECT_EQ(used.get() / b.f_frsize, b.f_blocks - b.f_bfree);
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)