@@ -33,12 +33,10 @@
|
||||
static int TestCase(void)
|
||||
{
|
||||
int ret;
|
||||
int *test = NULL;
|
||||
int status = 0;
|
||||
pid_t pid = fork();
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(pid, 0, INVALID_PROCESS_ID, pid);
|
||||
if (pid == 0) {
|
||||
*test = 0x1;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -54,7 +52,6 @@ static int TestCase(void)
|
||||
pid = fork();
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(pid, 0, INVALID_PROCESS_ID, pid);
|
||||
if (pid == 0) {
|
||||
*test = 0x1;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,19 +35,15 @@
|
||||
|
||||
static int TestThread(void)
|
||||
{
|
||||
int *test = nullptr;
|
||||
int ret;
|
||||
|
||||
pid_t pid = fork();
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(pid, 0, INVALID_PROCESS_ID, pid);
|
||||
if (pid == 0) {
|
||||
*test = 0x1;
|
||||
while (1) {
|
||||
}
|
||||
}
|
||||
|
||||
*test = 0x1;
|
||||
|
||||
ret = waitpid(pid, NULL, 0);
|
||||
ICUNIT_ASSERT_EQUAL(ret, pid, ret);
|
||||
|
||||
@@ -56,7 +52,6 @@ static int TestThread(void)
|
||||
|
||||
static int TestCase(void)
|
||||
{
|
||||
int *test = nullptr;
|
||||
int count = 5;
|
||||
int status = 0;
|
||||
int ret;
|
||||
|
||||
Reference in New Issue
Block a user