diff --git a/testsuites/sample/posix/pthread/It_posix_pthread_004.c b/testsuites/sample/posix/pthread/It_posix_pthread_004.c index 0257c272..d852ad61 100644 --- a/testsuites/sample/posix/pthread/It_posix_pthread_004.c +++ b/testsuites/sample/posix/pthread/It_posix_pthread_004.c @@ -42,7 +42,7 @@ static UINT32 Testcase(VOID) ret = pthread_attr_setdetachstate(NULL, PTHREAD_CREATE_DETACHED); ICUNIT_GOTO_EQUAL(ret, EINVAL, ret, EXIT); - ret = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE - 1); + ret = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE - 2); ICUNIT_GOTO_EQUAL(ret, EINVAL, ret, EXIT); ret = pthread_attr_setdetachstate(&attr, 3); // 3, test the param of function. diff --git a/testsuites/sample/posix/pthread/It_posix_pthread_006.c b/testsuites/sample/posix/pthread/It_posix_pthread_006.c index 7c658bbb..7149a338 100644 --- a/testsuites/sample/posix/pthread/It_posix_pthread_006.c +++ b/testsuites/sample/posix/pthread/It_posix_pthread_006.c @@ -47,9 +47,9 @@ static UINT32 Testcase(VOID) ICUNIT_GOTO_EQUAL(rc, 0, rc, EXIT); rc = pthread_cond_destroy(&cond1); - ICUNIT_GOTO_EQUAL(rc, ENOERR, rc, EXIT); + ICUNIT_GOTO_EQUAL(rc, 0, rc, EXIT); rc = pthread_cond_destroy(&cond2); - ICUNIT_GOTO_EQUAL(rc, ENOERR, rc, EXIT); + ICUNIT_GOTO_EQUAL(rc, 0, rc, EXIT); return LOS_OK; EXIT: