From 3f626a9d067721a3824382c27b3ee771eaf29240 Mon Sep 17 00:00:00 2001 From: shadowlover_R <1264063387@qq.com> Date: Tue, 18 May 2021 14:56:59 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=86=85=E6=A0=B8=E5=AD=90=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E9=9B=86=E6=88=90=E6=B5=8B=E8=AF=95=E3=80=91=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=B8=8D=E7=A8=B3=E5=AE=9A=E7=9A=84=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=EF=BC=9Afs=5Fposix=E6=A8=A1=E5=9D=97FsStdlibTest.cpp#testRealp?= =?UTF-8?q?ath?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: If6f4237a99eceb508f2c981476d1cd57a0c96c18 --- kernel_lite/fs_posix/src/FsStdlibTest.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel_lite/fs_posix/src/FsStdlibTest.cpp b/kernel_lite/fs_posix/src/FsStdlibTest.cpp index 78846d816..85b6dc7bd 100755 --- a/kernel_lite/fs_posix/src/FsStdlibTest.cpp +++ b/kernel_lite/fs_posix/src/FsStdlibTest.cpp @@ -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); -- GitLab