diff --git a/kernel_lite/time_posix/src/AlarmTest.cpp b/kernel_lite/time_posix/src/AlarmTest.cpp index d817fa93c59c2e68c7cdf99dacd33bf04d3dd6a1..5501d95bfa85ad2e17ce6181f05b3a0dd0856ebb 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); } }