From 24aa6858ee3aeadb09bef1bf9c3c5e775b263f72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9D=E6=99=AF=E6=B6=9B=E2=80=9C?= Date: Sat, 15 Apr 2023 22:16:32 +0800 Subject: [PATCH] fix some typo errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ”景涛“ --- .../extended/signal/full/It_ipc_pipe_002.cpp | 2 +- .../extended/signal/full/It_ipc_pipe_003.cpp | 2 +- .../extended/signal/full/It_ipc_sigaction_001.cpp | 2 +- .../extended/signal/full/signal_test_001.cpp | 12 ++++++------ .../extended/signal/full/signal_test_007.cpp | 2 +- .../extended/signal/full/signal_test_008.cpp | 2 +- .../extended/signal/full/signal_test_025.cpp | 2 +- .../extended/signal/smoke/signal_test_042.cpp | 8 ++++---- .../process/basic/pthread/smoke/pthread_test_011.cpp | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/testsuites/unittest/extended/signal/full/It_ipc_pipe_002.cpp b/testsuites/unittest/extended/signal/full/It_ipc_pipe_002.cpp index 02a4c5dd..bb91fb3e 100644 --- a/testsuites/unittest/extended/signal/full/It_ipc_pipe_002.cpp +++ b/testsuites/unittest/extended/signal/full/It_ipc_pipe_002.cpp @@ -53,7 +53,7 @@ static UINT32 Testcase(VOID) ret = write(pipeFd[1], "hello world", 12); // 12, "hello world" length and '\0' printf("write first status: %d\n", ret); if (ret != 12) { // 12, "hello world" length and '\0' - exit(11); // 11, the value of son process unexpect exit, convenient to debug + exit(11); // 11, the value of son process unexpected exit, convenient to debug } *sharedflag = 1; close(pipeFd[1]); diff --git a/testsuites/unittest/extended/signal/full/It_ipc_pipe_003.cpp b/testsuites/unittest/extended/signal/full/It_ipc_pipe_003.cpp index c222e865..f3b3b8f3 100644 --- a/testsuites/unittest/extended/signal/full/It_ipc_pipe_003.cpp +++ b/testsuites/unittest/extended/signal/full/It_ipc_pipe_003.cpp @@ -55,7 +55,7 @@ static UINT32 Testcase(VOID) ret = write(pipeFd[1], "Hello world", TAR_STR_LEN); printf("write first status: %d\n", ret); if (ret != TAR_STR_LEN) { - exit(11); // 11, the value of son process unexpect exit, convenient to debug + exit(11); // 11, the value of son process unexpected exit, convenient to debug } *sharedflag = 1; close(pipeFd[1]); diff --git a/testsuites/unittest/extended/signal/full/It_ipc_sigaction_001.cpp b/testsuites/unittest/extended/signal/full/It_ipc_sigaction_001.cpp index 14f33ef6..06870d8a 100644 --- a/testsuites/unittest/extended/signal/full/It_ipc_sigaction_001.cpp +++ b/testsuites/unittest/extended/signal/full/It_ipc_sigaction_001.cpp @@ -69,7 +69,7 @@ static UINT32 Testcase(VOID) ret = sigaction(SIGCHLD, &oldact, NULL); if (ret == -1) { - exit(6); // 6, the value of son process unexpect exit, convenient to debug + exit(6); // 6, the value of son process unexpected exit, convenient to debug } sleep(1); printf("---son--cnt check----%d--------\n", g_actionCnt1); diff --git a/testsuites/unittest/extended/signal/full/signal_test_001.cpp b/testsuites/unittest/extended/signal/full/signal_test_001.cpp index 71e777bc..05914887 100644 --- a/testsuites/unittest/extended/signal/full/signal_test_001.cpp +++ b/testsuites/unittest/extended/signal/full/signal_test_001.cpp @@ -90,31 +90,31 @@ static int TestCase(void) printf("errline = %d\n", __LINE__); exit(-1); } - ret = kill(10, 31); // 10, kill process pid; 31, sigal. + ret = kill(10, 31); // 10, kill process pid; 31, signal. if (retValue != -1 || errno != EINVAL) { printf("errline = %d\n", __LINE__); exit(-1); } - ret = kill(10, 32); // 10, kill process pid; 32, sigal. + ret = kill(10, 32); // 10, kill process pid; 32, signal. if (retValue != -1 || errno != EINVAL) { printf("errline = %d\n", __LINE__); exit(-1); } - ret = kill(2, 32); // 2, kill process pid; 32, sigal. + ret = kill(2, 32); // 2, kill process pid; 32, signal. if (retValue != -1 || errno != EINVAL) { printf("errline = %d\n", __LINE__); exit(-1); } printf("test EPERM begin\n"); - ret = kill(2, 5); // 2, kill process pid; 5, sigal. + ret = kill(2, 5); // 2, kill process pid; 5, signal. if (retValue != -1 || errno != EPERM) { printf("errline = %d\n", __LINE__); exit(-1); } - ret = kill(3, 5); // 3, kill process pid; 5, sigal. + ret = kill(3, 5); // 3, kill process pid; 5, signal. if (retValue != -1 || errno != EPERM) { printf("errline = %d\n", __LINE__); exit(-1); @@ -126,7 +126,7 @@ static int TestCase(void) exit(-1); } - ret = kill(1, 5); // 5, kill sigal num . + ret = kill(1, 5); // 5, kill signal num . if (retValue != -1 || errno != EPERM) { printf("errline = %d\n", __LINE__); exit(-1); diff --git a/testsuites/unittest/extended/signal/full/signal_test_007.cpp b/testsuites/unittest/extended/signal/full/signal_test_007.cpp index 1fcb74ee..906582bf 100644 --- a/testsuites/unittest/extended/signal/full/signal_test_007.cpp +++ b/testsuites/unittest/extended/signal/full/signal_test_007.cpp @@ -40,7 +40,7 @@ static void SigChildResponse(int signo) wait(nullptr); } -/* Register SIGCHLD, through signal to restore the child memery */ +/* Register SIGCHLD, through signal to restore the child memory */ static int TestSigKillResp() { void (*ret)(int) = nullptr; diff --git a/testsuites/unittest/extended/signal/full/signal_test_008.cpp b/testsuites/unittest/extended/signal/full/signal_test_008.cpp index dfac5669..acbc6d3f 100644 --- a/testsuites/unittest/extended/signal/full/signal_test_008.cpp +++ b/testsuites/unittest/extended/signal/full/signal_test_008.cpp @@ -38,7 +38,7 @@ void SigChildResponse(int signo) wait(nullptr); } -/* Register SIGCHLD, through signal to restore the child memery */ +/* Register SIGCHLD, through signal to restore the child memory */ static int TestSigKillWaitFromSigChild() { void (*ret)(int); diff --git a/testsuites/unittest/extended/signal/full/signal_test_025.cpp b/testsuites/unittest/extended/signal/full/signal_test_025.cpp index aef9dd8f..52e71e59 100644 --- a/testsuites/unittest/extended/signal/full/signal_test_025.cpp +++ b/testsuites/unittest/extended/signal/full/signal_test_025.cpp @@ -88,7 +88,7 @@ static int TestBlock() printf("\n\n"); printf("Signal Pause(2)\n"); - printf("To test whether pause can relese the signal\n"); + printf("To test whether pause can release the signal\n"); alarm(clock); retValue = sighold(sig); if (retValue != 0) { diff --git a/testsuites/unittest/extended/signal/smoke/signal_test_042.cpp b/testsuites/unittest/extended/signal/smoke/signal_test_042.cpp index 408900d3..b8d7c21a 100644 --- a/testsuites/unittest/extended/signal/smoke/signal_test_042.cpp +++ b/testsuites/unittest/extended/signal/smoke/signal_test_042.cpp @@ -67,7 +67,7 @@ static UINT32 TestCase() sigemptyset(&set); sigprocmask(SIG_SETMASK, &set, NULL); - printf("check invlid sigset ...\n"); + printf("check invalid sigset ...\n"); int rt = sigaddset(&set, 0); ICUNIT_ASSERT_EQUAL(rt, -1, rt); ICUNIT_ASSERT_EQUAL(errno, EINVAL, errno); @@ -79,19 +79,19 @@ static UINT32 TestCase() siginfo_t si; time1.tv_sec = -1; - printf("check invlid timespec: tv_sec=-1 ...\n"); + printf("check invalid timespec: tv_sec=-1 ...\n"); ret = SigtimedwaitFailTest(&set, &si, &time1, EINVAL); ICUNIT_ASSERT_EQUAL(ret, 0, ret); time1.tv_sec = 1; time1.tv_nsec = -1; - printf("check invlid timespec: tv_nsec=-1 ...\n"); + printf("check invalid timespec: tv_nsec=-1 ...\n"); ret = SigtimedwaitFailTest(&set, &si, &time1, EINVAL); ICUNIT_ASSERT_EQUAL(ret, 0, ret); time1.tv_sec = 1; time1.tv_nsec = 1000 * 1000 * 1000 + 1; // 1000, set the nsec of time. - printf("check invlid timespec: tv_nsec overflow ...\n"); + printf("check invalid timespec: tv_nsec overflow ...\n"); ret = SigtimedwaitFailTest(&set, &si, &time1, EINVAL); ICUNIT_ASSERT_EQUAL(ret, 0, ret); diff --git a/testsuites/unittest/process/basic/pthread/smoke/pthread_test_011.cpp b/testsuites/unittest/process/basic/pthread/smoke/pthread_test_011.cpp index 34bc604e..932398c0 100644 --- a/testsuites/unittest/process/basic/pthread/smoke/pthread_test_011.cpp +++ b/testsuites/unittest/process/basic/pthread/smoke/pthread_test_011.cpp @@ -46,7 +46,7 @@ void child1(void) while (1) { ret = pthread_getschedparam(pthread, &newPolicy, ¶m); if (ret != 0) { - printf("pthread_getschedparam failed ! %d erro: %d\n", __LINE__, errno); + printf("pthread_getschedparam failed ! %d error: %d\n", __LINE__, errno); exit(255); // 255, set a special exit code. } -- GitLab