提交 33380dff 编写于 作者: O openharmony_ci 提交者: Gitee

!218 【内核子系统集成测试】恢复不稳定的用例:fs_posix模块FsStdlibTest.cpp#testRealpath

Merge pull request !218 from 是蕊蕊呀/kernel_lite_20210518_3
...@@ -120,8 +120,16 @@ HWTEST_F(FileSystemTest, testRealpath, Function | MediumTest | Level3) ...@@ -120,8 +120,16 @@ HWTEST_F(FileSystemTest, testRealpath, Function | MediumTest | Level3)
// get Absolute Path // get Absolute Path
const char *realPathStandard = TOP_DIR "/" FILE0; const char *realPathStandard = TOP_DIR "/" FILE0;
char *realPath = (char*)malloc(256); char *realPath = (char*)malloc(256);
ASSERT_NE(realpath(FILE0, realPath), nullptr) << "> realpath errno = " << errno; if (realpath(FILE0, realPath) == nullptr)
EXPECT_STREQ(realPath, realPathStandard); {
LOG("> realPath = %s", realPath); LOG("> realpath errno == %d", errno);
free(realPath); free(realPath);
ASSERT_TRUE(false);
}
else
{
EXPECT_STREQ(realPath, realPathStandard);
LOG("> realPath = %s", realPath);
free(realPath);
}
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册