提交 3f626a9d 编写于 作者: 是蕊蕊呀~'s avatar 是蕊蕊呀~

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

Change-Id: If6f4237a99eceb508f2c981476d1cd57a0c96c18
上级 9332e47b
......@@ -120,7 +120,11 @@ HWTEST_F(FileSystemTest, testRealpath, Function | MediumTest | Level3)
// get Absolute Path
const char *realPathStandard = TOP_DIR "/" FILE0;
char *realPath = (char*)malloc(256);
ASSERT_NE(realpath(FILE0, realPath), nullptr) << "> realpath errno = " << errno;
if(realpath(FILE0, realPath) == nullptr){
LOG("> realpath errno == %d", errno);
free(realPath);
ASSERT_TRUE(false);
}
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.
先完成此消息的编辑!
想要评论请 注册