From ef7b551214c2a7f4a50f2590468537a7598d7e41 Mon Sep 17 00:00:00 2001 From: limeng Date: Thu, 23 Sep 2021 16:49:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9time=5Fposix=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E5=A4=B1=E8=B4=A5=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: limeng Change-Id: I5a128e2f2a5ac08c2ef51d4f6befa6280452dbd7 --- kernel_lite/time_posix/src/AlarmTest.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel_lite/time_posix/src/AlarmTest.cpp b/kernel_lite/time_posix/src/AlarmTest.cpp index d817fa93c..5501d95bf 100755 --- a/kernel_lite/time_posix/src/AlarmTest.cpp +++ b/kernel_lite/time_posix/src/AlarmTest.cpp @@ -106,7 +106,10 @@ HWTEST_F(AlarmTest, testAlarmFork, Function | MediumTest | Level2) } } else { // parent Msleep(MSLEEP_TIME); - EXPECT_EQ(mReceivedSignal, SIGALRM); + if (mReceivedSignal != SIGALRM) { + Msleep(500); + } + EXPECT_EQ(mReceivedSignal, SIGALRM) << " expect no equal" << errno; WaitProcExitedOK(pid); } } -- GitLab