From 7fa4695ae24ce10d6a4b3e3a9e60618e6f0eddc6 Mon Sep 17 00:00:00 2001 From: Falk Werner Date: Fri, 3 May 2019 01:09:54 +0200 Subject: [PATCH] fixes deadlock at IntegrationTest using valgrind --- test/integration/test_integration.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/integration/test_integration.cc b/test/integration/test_integration.cc index d644d63..d045691 100644 --- a/test/integration/test_integration.cc +++ b/test/integration/test_integration.cc @@ -60,14 +60,18 @@ TEST_F(IntegrationTest, HasMountpoint) ASSERT_TRUE(S_ISDIR(buffer.st_mode)); } -TEST_F(IntegrationTest, DISABLED_ProvidesTextFile) +TEST_F(IntegrationTest, ProvidesTextFile) { + webfuse_test::msleep(200); std::string file_name = std::string(GetBaseDir()) + "/cprovider/default/hello.txt"; - struct stat buffer; - int rc = stat(file_name.c_str(), &buffer); + ASSERT_EXIT({ + struct stat buffer; + int rc = stat(file_name.c_str(), &buffer); - ASSERT_EQ(0, rc); + exit(rc); + }, ::testing::ExitedWithCode(0), ".*"); + // ASSERT_TRUE(S_ISREG(buffer.st_mode)); // ASSERT_EQ(0444, (buffer.st_mode & 0777)); // ASSERT_EQ(12, buffer.st_size);