diff --git a/testsuites/unittest/basic/mem/shm/full/shm_test_004.cpp b/testsuites/unittest/basic/mem/shm/full/shm_test_004.cpp index 3348ea39229bba2caf92d5c7e7a40f78b5152f61..4a2d914c0608fd5cd6d0a23290fac2a0caf43dcb 100644 --- a/testsuites/unittest/basic/mem/shm/full/shm_test_004.cpp +++ b/testsuites/unittest/basic/mem/shm/full/shm_test_004.cpp @@ -55,7 +55,6 @@ static int Testcase(VOID) ICUNIT_GOTO_EQUAL(ds.shm_perm.uid, getuid(), ds.shm_perm.uid, ERROR_OUT); ret = shmctl(shmid, SHM_STAT, &ds); - // ICUNIT_GOTO_EQUAL(ret, 0x10000, ret, ERROR_OUT); ICUNIT_GOTO_NOT_EQUAL(ret, -1, ret, ERROR_OUT); ICUNIT_GOTO_NOT_EQUAL(ret, 0, ret, ERROR_OUT); @@ -70,7 +69,7 @@ static int Testcase(VOID) ICUNIT_GOTO_EQUAL(info.shmmax, 0x1000000, info.shmmax, ERROR_OUT); ICUNIT_GOTO_EQUAL(info.shmmin, 1, info.shmmin, ERROR_OUT); ICUNIT_GOTO_EQUAL(info.shmmni, 192, info.shmmni, ERROR_OUT); - ICUNIT_GOTO_EQUAL(info.shmseg, 128, info.shmseg, ERROR_OUT); + ICUNIT_GOTO_EQUAL(info.shmseg, 128, info.shmseg, ERROR_OUT); // 128: expected value of shmseg ICUNIT_GOTO_EQUAL(info.shmall, 0x1000, info.shmall, ERROR_OUT); ret = shmdt(shm); diff --git a/testsuites/unittest/extended/liteipc/smoke/liteipc_test_001.cpp b/testsuites/unittest/extended/liteipc/smoke/liteipc_test_001.cpp index 7355dc695bae24c58e3c9977e9ee7a239d1452ca..62cb49a0899bc068c7968ffd6a60c84ba0531e7c 100644 --- a/testsuites/unittest/extended/liteipc/smoke/liteipc_test_001.cpp +++ b/testsuites/unittest/extended/liteipc/smoke/liteipc_test_001.cpp @@ -63,13 +63,11 @@ static int LiteIpcTest(void) /* testing mmap liteipc mem pool with different size and flag */ retptr = mmap(nullptr, 1024 * 4096, PROT_READ, MAP_PRIVATE, fd, 0); ICUNIT_ASSERT_EQUAL(static_cast(static_cast(retptr)), -1, retptr); - //retptr = mmap(nullptr, 0, PROT_READ, MAP_PRIVATE, fd, 0); - //ICUNIT_ASSERT_EQUAL((int)(intptr_t)retptr, -1, retptr); retptr = mmap(nullptr, -1, PROT_READ, MAP_PRIVATE, fd, 0); ICUNIT_ASSERT_EQUAL(static_cast(static_cast(retptr)), -1, retptr); retptr = mmap(nullptr, 4096, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); ICUNIT_ASSERT_EQUAL(static_cast(static_cast(retptr)), -1, retptr); - retptr = mmap(nullptr, 4096, PROT_READ, MAP_SHARED, fd, 0); + retptr = mmap(nullptr, 4096, PROT_READ, MAP_SHARED, fd, 0); // 4096: length of mapped memory ICUNIT_ASSERT_EQUAL(static_cast(static_cast(retptr)), -1, retptr); retptr = mmap(nullptr, 1, PROT_READ, MAP_PRIVATE, fd, 0); @@ -81,7 +79,7 @@ static int LiteIpcTest(void) char buf[10] = {0}; ret = read(fd, buf, 10); ICUNIT_ASSERT_EQUAL(ret, -1, ret); - ret = write(fd, buf, 10); + ret = write(fd, buf, 10); // 10: size of buf ICUNIT_ASSERT_EQUAL(ret, -1, ret); /* before set cms, testing ioctl cmd */ @@ -96,7 +94,7 @@ static int LiteIpcTest(void) sleep(2); /* after set cms, testing set cms cmd */ - ret = ioctl(fd, IPC_SET_CMS, 200); + ret = ioctl(fd, IPC_SET_CMS, 200); // 200: use 200 for set cms cmd testing ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret); exit(0); diff --git a/testsuites/unittest/extended/signal/smoke/signal_test_036.cpp b/testsuites/unittest/extended/signal/smoke/signal_test_036.cpp index 8cb97a67713a7229f7d5264db3f847ec543db4f0..35aaed0b3c6dbcb98facd291d9768ef10f7c71a3 100644 --- a/testsuites/unittest/extended/signal/smoke/signal_test_036.cpp +++ b/testsuites/unittest/extended/signal/smoke/signal_test_036.cpp @@ -60,17 +60,6 @@ static int TestCase() exit(0); } - /* sig = SIGTERM; - ret = sigaction(sig, (struct sigaction *)1, &oldAct); - printf("ret == %d\n", ret); - ICUNIT_ASSERT_EQUAL(ret, -1, ret); - ICUNIT_ASSERT_EQUAL(errno, EFAULT, errno); - - ret = sigaction(sig, &sigAct, (struct sigaction *)1); - printf("ret === %d\n", ret); - ICUNIT_ASSERT_EQUAL(ret, -1, ret); - ICUNIT_ASSERT_EQUAL(errno, EFAULT, errno); */ - ret = waitpid(fpid, &status, 0); ICUNIT_ASSERT_EQUAL(ret, fpid, ret); ICUNIT_ASSERT_EQUAL(WEXITSTATUS(status), 0, WEXITSTATUS(status)); diff --git a/testsuites/unittest/libc/io/full/IO_test_locale_002.cpp b/testsuites/unittest/libc/io/full/IO_test_locale_002.cpp index 6e22bc86dae559600dce2ff3c9971d000f31b9ba..daaca4c740f780e4c4ea011d288e1152f6625368 100644 --- a/testsuites/unittest/libc/io/full/IO_test_locale_002.cpp +++ b/testsuites/unittest/libc/io/full/IO_test_locale_002.cpp @@ -37,7 +37,6 @@ static UINT32 testcase(VOID) time_t currtime; struct tm *timer = {nullptr}; char buffer[80]; - //locale_t loc = malloc(sizeof(locale_t); time(&currtime); timer = localtime(&currtime); @@ -46,17 +45,17 @@ static UINT32 testcase(VOID) printf("getenv MUSL_LOCPATH=%s\n", getenv("MUSL_LOCPATH")); printf("Locale is: %s\n", setlocale(LC_TIME, "en_US.UTF-8")); - strftime(buffer, 80, "%c", timer); + (void)strftime(buffer, sizeof(buffer), "%c", timer); printf("Date is: %s\n", buffer); ICUNIT_ASSERT_NOT_EQUAL_NULL(buffer, NULL, -1); printf("Locale is: %s\n", setlocale(LC_TIME, "zh_CN.UTF-8")); - strftime(buffer, 80, "%c", timer); + (void)strftime(buffer, sizeof(buffer), "%c", timer); printf("Date is: %s\n", buffer); ICUNIT_ASSERT_NOT_EQUAL_NULL(buffer, NULL, -1); printf("Locale is: %s\n", setlocale(LC_TIME, "")); - strftime(buffer, 80, "%c", timer); + (void)strftime(buffer, sizeof(buffer), "%c", timer); printf("Date is: %s\n", buffer); ICUNIT_ASSERT_NOT_EQUAL_NULL(buffer, NULL, -1); setlocale(LC_ALL, "C"); diff --git a/testsuites/unittest/libc/misc/misc_test.cpp b/testsuites/unittest/libc/misc/misc_test.cpp index 319e5658566ac824f63b00b3d6f79723792809ca..0f34b621a1aed71305ef9eba774d760943d3c263 100644 --- a/testsuites/unittest/libc/misc/misc_test.cpp +++ b/testsuites/unittest/libc/misc/misc_test.cpp @@ -145,26 +145,6 @@ HWTEST_F(MiscTest, ItTestMisc009, TestSize.Level0) ItTestMisc009(); } -/* * - * @tc.name: IT_TEST_MISC_010 - * @tc.desc: function for MiscTest - * @tc.type: FUNC - */ -/*HWTEST_F(MiscTest, ItTestMisc010, TestSize.Level0) -{ - ItTestMisc010(); -}*/ - -/* * - * @tc.name: IT_TEST_MISC_011 - * @tc.desc: function for MiscTest - * @tc.type: FUNC - */ -/*HWTEST_F(MiscTest, ItTestMisc011, TestSize.Level0) -{ - ItTestMisc011(); -}*/ - /* * * @tc.name: IT_TEST_MISC_012 * @tc.desc: function for MiscTest @@ -174,16 +154,6 @@ HWTEST_F(MiscTest, ItTestMisc012, TestSize.Level0) { ItTestMisc012(); } - -/* * - * @tc.name: IT_TEST_MISC_013 - * @tc.desc: function for MiscTest - * @tc.type: FUNC - */ -/*HWTEST_F(MiscTest, ItTestMisc013, TestSize.Level0) -{ - ItTestMisc013(); -}*/ #endif } // namespace OHOS diff --git a/testsuites/unittest/libc/posix/pthread/full/It_posix_pthread_072.cpp b/testsuites/unittest/libc/posix/pthread/full/It_posix_pthread_072.cpp index b6e5efd86185eecf658eb67bdbb171a4303fedad..9d8141bef27b138dec07f3cd228d3a4c559ecdcd 100644 --- a/testsuites/unittest/libc/posix/pthread/full/It_posix_pthread_072.cpp +++ b/testsuites/unittest/libc/posix/pthread/full/It_posix_pthread_072.cpp @@ -34,7 +34,6 @@ static void *pthread_f01(void *tmp) { int rc = 0; g_testCount++; - // printf("www\n"); /* acquire the mutex */ rc = pthread_mutex_lock(&g_pthreadMutexTest1); @@ -69,7 +68,7 @@ static UINT32 Testcase(VOID) /* Let the other thread run */ LosTaskDelay(2); - ICUNIT_ASSERT_EQUAL(g_testCount, 2, g_testCount); + ICUNIT_ASSERT_EQUAL(g_testCount, 2, g_testCount); // 2: expected value of g_testCount /* Try to destroy the cond var. This should return an error */ rc = pthread_cond_destroy(&g_pthreadCondTest1); @@ -79,7 +78,7 @@ static UINT32 Testcase(VOID) ICUNIT_ASSERT_EQUAL(rc, 0, rc); LosTaskDelay(2); - ICUNIT_ASSERT_EQUAL(g_testCount, 4, g_testCount); + ICUNIT_ASSERT_EQUAL(g_testCount, 4, g_testCount); // 4: expected value of g_testCount rc = pthread_cond_destroy(&g_pthreadCondTest1); ICUNIT_ASSERT_EQUAL(rc, 0, rc); diff --git a/testsuites/unittest/libc/posix/pthread/smoke/It_posix_pthread_003.cpp b/testsuites/unittest/libc/posix/pthread/smoke/It_posix_pthread_003.cpp index 001d1c6b68b77d8137b87328d4284154f7c9055c..9cd44b50000493f52750b2bfea3e5ac5214a506a 100644 --- a/testsuites/unittest/libc/posix/pthread/smoke/It_posix_pthread_003.cpp +++ b/testsuites/unittest/libc/posix/pthread/smoke/It_posix_pthread_003.cpp @@ -51,10 +51,6 @@ static UINT32 Testcase(VOID) tmp = pthread_equal(a, b); - // pthread_join(a, NULL); - - // pthread_detach(a); - pthread_attr_init(&aa); pthread_attr_getdetachstate(&aa, &detachstate); @@ -63,19 +59,6 @@ static UINT32 Testcase(VOID) pthread_attr_destroy(&aa); - // pthread_mutex_init(&c, NULL); - - // pthread_mutex_destroy(&c); - - // pthread_mutex_lock(&c); - - // pthread_mutex_trylock(&c); - - // pthread_mutex_unlock(&c); - - // pthread_mutexattr_init(&c); - - // pthread_mutexattr_destroy(&c); ret = pthread_join(aThread, NULL); ICUNIT_ASSERT_EQUAL(ret, 0, ret); diff --git a/testsuites/unittest/libc/posix/pthread/smoke/It_posix_pthread_005.cpp b/testsuites/unittest/libc/posix/pthread/smoke/It_posix_pthread_005.cpp index 9ccb21ec416433d85f3e4fec425f66cc0d556d38..5beb285ca94f6bb03d5f31d7f96a4d3037dce23f 100644 --- a/testsuites/unittest/libc/posix/pthread/smoke/It_posix_pthread_005.cpp +++ b/testsuites/unittest/libc/posix/pthread/smoke/It_posix_pthread_005.cpp @@ -36,8 +36,6 @@ static void *ThreadF01(void *arg) /* Shouldn't reach here. If we do, then the pthread_cancel() * function did not succeed. */ - // uart_printf_func("Could not send cancel request correctly\n"); - // ICUNIT_TRACK_EQUAL(1, 0, errno); pthread_exit(nullptr); return NULL; } @@ -62,7 +60,6 @@ static UINT32 Testcase(VOID) ret = pthread_join(newTh, (void **)&temp); ICUNIT_ASSERT_EQUAL(ret, 0, ret); - // ICUNIT_ASSERT_EQUAL(temp, (UINTPTR)PTHREAD_CANCELED, temp); return PTHREAD_NO_ERROR; } diff --git a/testsuites/unittest/libc/posix/pthread/smoke/It_posix_pthread_006.cpp b/testsuites/unittest/libc/posix/pthread/smoke/It_posix_pthread_006.cpp index 0389711ccaf3163ca0ff2e652139eb139f4fdb4c..80d397a314f2fad5e054b115d665fddad5db3039 100644 --- a/testsuites/unittest/libc/posix/pthread/smoke/It_posix_pthread_006.cpp +++ b/testsuites/unittest/libc/posix/pthread/smoke/It_posix_pthread_006.cpp @@ -34,7 +34,6 @@ static void *ThreadF01(void *arg) { pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); - // while (1) sleep(1); pthread_exit(nullptr); @@ -48,7 +47,6 @@ static UINT32 Testcase(VOID) pthread_t a; /* SIGALRM will be sent in 5 seconds. */ - // alarm(5);//alarm NOT SUPPORT /* Create a new thread. */ if (pthread_create(&a, NULL, ThreadF01, NULL) != 0) { @@ -61,7 +59,6 @@ static UINT32 Testcase(VOID) /* If 'main' has reached here, then the test passed because it means * that the thread is truly asynchronise, and main isn't waiting for * it to return in order to move on. */ - // printf("Test PASSED\n"); ret = pthread_join(a, &temp); ICUNIT_ASSERT_EQUAL(ret, 0, ret); diff --git a/testsuites/unittest/net/socket/net_socket_test.cpp b/testsuites/unittest/net/socket/net_socket_test.cpp index 01fff55c581b30405869552a6f7d5c90d1036b08..bf71bf330d97c19cb65cc967fb699c3fa55dfcd3 100644 --- a/testsuites/unittest/net/socket/net_socket_test.cpp +++ b/testsuites/unittest/net/socket/net_socket_test.cpp @@ -176,16 +176,5 @@ HWTEST_F(NetSocketTest, NetSocketTest012, TestSize.Level0) NetSocketTest012(); } -/* * - * @tc.name: NetSocketTest013 - * @tc.desc: function for NetSocketTest - * @tc.type: FUNC - */ -/* -HWTEST_F(NetSocketTest, NetSocketTest013, TestSize.Level0) -{ - //NetSocketTest013(); // broadcast to self to be supported. -} -*/ #endif } diff --git a/tools/scripts/parse_exc/parse_excinfo.py b/tools/scripts/parse_exc/parse_excinfo.py index 7f580d8a52c93d83a6825d59df3db2e55663e356..a1ba92d44205de8789ea09eb2c190b6f1a1a1058 100644 --- a/tools/scripts/parse_exc/parse_excinfo.py +++ b/tools/scripts/parse_exc/parse_excinfo.py @@ -131,7 +131,6 @@ def parse_user_pc_ulr(excinfo_file, rootfs_dir, string, addr2line_cmd, objdump_c ret = commands.getoutput(cmd) print(ret) cmd = "%s%s%s %s" % (addr2line_cmd, rootfs_dir, strlist[4], strlist[6]) - #print(cmd) ret = commands.getoutput(cmd) ret = ret.split('\n') print("<%s>%s<%s><%s>\n" % (string, ret[0], strlist[6], strlist[4]))