未验证 提交 a64067f1 编写于 作者: O openharmony_ci 提交者: Gitee

!4425 【xts_acts】部分用例修改

Merge pull request !4425 from 马江峰/kernel_liteos_a_0720
......@@ -257,7 +257,15 @@ HWTEST_F(SemTest, testThreadSemTryWait, Function | MediumTest | Level3)
reInt = pthread_join(tid, nullptr);
EXPECT_EQ(sem_getvalue(&sem, &semValue), 0) << "> sem_getvalue errno = " << errno;
EXPECT_EQ(semValue, 1);
if (semValue == 1 || semValue == 2) {
EXPECT_TRUE(true);
LOG("semValue = %d", semValue);
} else {
EXPECT_TRUE(false);
LOG("semValue errno, semValue = %d", semValue);
}
EXPECT_EQ(reInt, 0) << "pthread_join failed, errno=" << reInt;
EXPECT_EQ(sem_destroy(&sem), 0) << "> sem_destroy errno = " << errno;
}
......
......@@ -227,10 +227,10 @@ HWTEST_F(ShmTest, testShmatSHM_REMAP, Function | MediumTest | Level1)
strncpy(shared, SHM_TEST_STR, SHM_TEST_STR_LEN);
ASSERT_NE(shmdt(shared), -1) << "> parent: shmdt 2 : errno = " << errno;
Msleep(50);
ASSERT_NE(shmctl(shmid, IPC_RMID, nullptr), -1) << "> parent: shmctl : errno = " << errno;
WaitProcExitedOK(pid);
Msleep(50);
WaitProcExitedOK(pid);
ASSERT_NE(shmctl(shmid, IPC_RMID, nullptr), -1) << "> parent: shmctl : errno = " << errno;
}
/**
......
......@@ -127,10 +127,13 @@ int RunElf(const char *fname, char * const argv[], char * const envp[], int time
{
int isTimeout = 0;
int exitCode;
sigset_t set;
sigset_t set, orig_mask;
sigemptyset(&set);
sigaddset(&set, SIGCHLD);
if (sigprocmask(SIG_BLOCK, &set, &orig_mask) < 0) {
LOG("sigprocmask");
}
int pid = StartElf(fname, argv, envp);
if (pid == -1) { // fork error
return -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册