fix: 内源代码检视问题修改

1.删除测试用例中的需求单号和问题单号
2.部分格式问题
3.使用非安全函数问题

Signed-off-by: zhushengle <zhushengle@huawei.com>
Change-Id: I348bd9730f584fd3ebeb6d4245fe4a84c0c90c7d
This commit is contained in:
zhushengle
2022-03-14 14:37:02 +08:00
parent 87a7df48b8
commit a40f8383ee
71 changed files with 115 additions and 1431 deletions

View File

@@ -46,7 +46,6 @@ public:
* @tc.name: IPC_TEST_MKFIFOAT_001
* @tc.desc: function for IoTest:mkfifoat-normal test
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
#if 0
HWTEST_F(IoTest, IPC_TEST_MKFIFOAT_001, TestSize.Level0)
@@ -59,7 +58,6 @@ HWTEST_F(IoTest, IPC_TEST_MKFIFOAT_001, TestSize.Level0)
* @tc.name: IPC_TEST_MKFIFOAT_002
* @tc.desc: function for IoTest:mkfifoat-innormal test
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
#if 0
HWTEST_F(IoTest, IPC_TEST_MKFIFOAT_002, TestSize.Level0)

View File

@@ -45,7 +45,6 @@ public:
* @tc.name: ItPosixLiteIpc001
* @tc.desc: function test for liteipc
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(LiteIpcTest, ItPosixLiteIpc001, TestSize.Level0)
{
@@ -56,7 +55,6 @@ HWTEST_F(LiteIpcTest, ItPosixLiteIpc001, TestSize.Level0)
* @tc.name: ItPosixLiteIpc002
* @tc.desc: function test for liteipc
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(LiteIpcTest, ItPosixLiteIpc002, TestSize.Level0)
{

View File

@@ -58,7 +58,7 @@ int TestPipeSingleProcess()
errno = 0;
char sentence1[15] = "Hello World";
char a[4] = {0};
sprintf(a, "%d", i);
(void)sprintf_s(a, sizeof(a), "%d", i);
strcat(sentence1, a);
int ret = write(*writeFd, sentence1, strlen(sentence1) + 1);
usleep(100000); // 100000, Used to calculate the delay time.

View File

@@ -58,7 +58,7 @@ int TestPipeSingleProcessFcntl()
errno = 0;
char sentence1[15] = "Hello World";
char a[4] = {0};
sprintf(a, "%d", i);
(void)sprintf_s(a, sizeof(a), "%d", i);
strcat(sentence1, a);
int ret = write(*writeFd, sentence1, strlen(sentence1) + 1);
usleep(100000); // 100000, Used to calculate the delay time.

View File

@@ -33,7 +33,8 @@
static void SigPrint(int sig)
{
printf("%s\n", __FUNCTION__, __LINE__);
(void)sig;
printf("%s%d\n", __FUNCTION__, __LINE__);
}
static void *ThreadSetFunc2(void *arg)

View File

@@ -33,7 +33,8 @@
static void SigPrint(int sig)
{
printf("%s\n", __FUNCTION__, __LINE__);
(void)sig;
printf("%s%d\n", __FUNCTION__, __LINE__);
}
static void *ThreadSetFunc2(void *arg)

View File

@@ -33,10 +33,11 @@
static void SigPrint(int sig)
{
printf("%s\n", __FUNCTION__, __LINE__);
(void)sig;
printf("%s%d\n", __FUNCTION__, __LINE__);
}
static int TestSigTimeWaitKillProcess()
static int TestSigTimeWaitKillProcess(void)
{
sigset_t set;
int sig, fpid, retValue, status;

View File

@@ -33,10 +33,11 @@
static void SigPrint(int sig)
{
printf("%s\n", __FUNCTION__, __LINE__);
(void)sig;
printf("%s%d\n", __FUNCTION__, __LINE__);
}
static int TestSigTimeWaitDirectKillChild()
static int TestSigTimeWaitDirectKillChild(void)
{
sigset_t set;
int sig, fpid, retValue, status;

View File

@@ -35,6 +35,7 @@ static int g_sigCount = 0;
static int g_sigCount1 = 0;
static void SigPrint(int sig)
{
(void)sig;
g_sigCount++;
printf("signal receive sucess\n");
}
@@ -91,4 +92,4 @@ static UINT32 TestCase(VOID)
void ItPosixSignal040(void)
{
TEST_ADD_CASE(__FUNCTION__, TestCase, TEST_POSIX, TEST_SIGNAL, TEST_LEVEL0, TEST_FUNCTION);
}
}

View File

@@ -35,15 +35,18 @@
static void Sigprint(int sig)
{
(void)sig;
printf("enter sighandle : -------------------------\n");
}
static void Sigprint111(int sig)
{
(void)sig;
printf("enter sighandle : ---111----------------------\n");
}
static void *ThreadFunc7(void *arg)
{
(void)arg;
int retval;
sigset_t set, oldset;
sighandler_t sigret;

View File

@@ -45,7 +45,6 @@ public:
* @tc.name: IT_POSIX_SIGNAL_002
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal002, TestSize.Level0)
{
@@ -56,7 +55,6 @@ HWTEST_F(SignalTest, ItPosixSignal002, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_009
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal009, TestSize.Level0)
{
@@ -67,7 +65,6 @@ HWTEST_F(SignalTest, ItPosixSignal009, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_013
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal013, TestSize.Level0)
{
@@ -78,7 +75,6 @@ HWTEST_F(SignalTest, ItPosixSignal013, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_014
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal014, TestSize.Level0)
{
@@ -90,7 +86,6 @@ HWTEST_F(SignalTest, ItPosixSignal014, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_021
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal021, TestSize.Level0)
{
@@ -101,7 +96,6 @@ HWTEST_F(SignalTest, ItPosixSignal021, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_022
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal022, TestSize.Level0)
{
@@ -112,7 +106,6 @@ HWTEST_F(SignalTest, ItPosixSignal022, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_023
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal023, TestSize.Level0)
{
@@ -123,7 +116,6 @@ HWTEST_F(SignalTest, ItPosixSignal023, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_024
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal024, TestSize.Level0)
{
@@ -134,7 +126,6 @@ HWTEST_F(SignalTest, ItPosixSignal024, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_031
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal031, TestSize.Level0)
{
@@ -145,7 +136,6 @@ HWTEST_F(SignalTest, ItPosixSignal031, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_032
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal032, TestSize.Level0)
{
@@ -156,7 +146,6 @@ HWTEST_F(SignalTest, ItPosixSignal032, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_035
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal035, TestSize.Level0)
{
@@ -167,7 +156,6 @@ HWTEST_F(SignalTest, ItPosixSignal035, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_036
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal036, TestSize.Level0)
{
@@ -178,7 +166,6 @@ HWTEST_F(SignalTest, ItPosixSignal036, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_037
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal037, TestSize.Level0)
{
@@ -189,7 +176,6 @@ HWTEST_F(SignalTest, ItPosixSignal037, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_039
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal039, TestSize.Level0)
{
@@ -200,7 +186,6 @@ HWTEST_F(SignalTest, ItPosixSignal039, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_042
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal042, TestSize.Level0)
{
@@ -211,7 +196,6 @@ HWTEST_F(SignalTest, ItPosixSignal042, TestSize.Level0)
* @tc.name: ItPosixPipe002
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixPipe002, TestSize.Level0)
{
@@ -222,7 +206,6 @@ HWTEST_F(SignalTest, ItPosixPipe002, TestSize.Level0)
* @tc.name: ItPosixMkfifo002
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixMkfifo002, TestSize.Level0)
{
@@ -233,7 +216,6 @@ HWTEST_F(SignalTest, ItPosixMkfifo002, TestSize.Level0)
* @tc.name: IT_IPC_FD_ISSET_001
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItIpcFdIsset001, TestSize.Level0)
{
@@ -246,7 +228,6 @@ HWTEST_F(SignalTest, ItIpcFdIsset001, TestSize.Level0)
* @tc.name: IT_IPC_FD_CLR_001
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItIpcFdClr001, TestSize.Level0)
{
@@ -257,7 +238,6 @@ HWTEST_F(SignalTest, ItIpcFdClr001, TestSize.Level0)
* @tc.name: IT_IPC_FD_SET_001
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItIpcFdSet001, TestSize.Level0)
{
@@ -268,7 +248,6 @@ HWTEST_F(SignalTest, ItIpcFdSet001, TestSize.Level0)
* @tc.name: IT_IPC_FD_ZERO_001
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItIpcFdZero001, TestSize.Level0)
{
@@ -279,7 +258,6 @@ HWTEST_F(SignalTest, ItIpcFdZero001, TestSize.Level0)
* @tc.name: IT_IPC_SIGACTION_001^M
* @tc.desc: function for SignalTest^M
* @tc.type: FUNC^M
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItIpcSigaction001, TestSize.Level0)
{
@@ -290,7 +268,6 @@ HWTEST_F(SignalTest, ItIpcSigaction001, TestSize.Level0)
* @tc.name: IT_IPC_SIGPAUSE_001
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItIpcSigpause001, TestSize.Level0)
{
@@ -301,7 +278,6 @@ HWTEST_F(SignalTest, ItIpcSigpause001, TestSize.Level0)
* @tc.name: IT_IPC_SIGPROMASK_001
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItIpcSigpromask001, TestSize.Level0)
{
@@ -312,7 +288,6 @@ HWTEST_F(SignalTest, ItIpcSigpromask001, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_001
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal001, TestSize.Level0)
{
@@ -323,7 +298,6 @@ HWTEST_F(SignalTest, ItPosixSignal001, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_003
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal003, TestSize.Level0)
{
@@ -334,7 +308,6 @@ HWTEST_F(SignalTest, ItPosixSignal003, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_004
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal004, TestSize.Level0)
{
@@ -345,7 +318,6 @@ HWTEST_F(SignalTest, ItPosixSignal004, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_005
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal005, TestSize.Level0)
{
@@ -356,7 +328,6 @@ HWTEST_F(SignalTest, ItPosixSignal005, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_006
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal006, TestSize.Level0)
{
@@ -367,7 +338,6 @@ HWTEST_F(SignalTest, ItPosixSignal006, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_007
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal007, TestSize.Level0)
{
@@ -378,7 +348,6 @@ HWTEST_F(SignalTest, ItPosixSignal007, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_008
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal008, TestSize.Level0)
{
@@ -389,7 +358,6 @@ HWTEST_F(SignalTest, ItPosixSignal008, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_010
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal010, TestSize.Level0)
{
@@ -400,7 +368,6 @@ HWTEST_F(SignalTest, ItPosixSignal010, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_011
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal011, TestSize.Level0)
{
@@ -411,7 +378,6 @@ HWTEST_F(SignalTest, ItPosixSignal011, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_012
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal012, TestSize.Level0)
{
@@ -422,7 +388,6 @@ HWTEST_F(SignalTest, ItPosixSignal012, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_015
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal015, TestSize.Level0)
{
@@ -433,7 +398,6 @@ HWTEST_F(SignalTest, ItPosixSignal015, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_016
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal016, TestSize.Level0)
{
@@ -444,7 +408,6 @@ HWTEST_F(SignalTest, ItPosixSignal016, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_017
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal017, TestSize.Level0)
{
@@ -455,7 +418,6 @@ HWTEST_F(SignalTest, ItPosixSignal017, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_018
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal018, TestSize.Level0)
{
@@ -466,7 +428,6 @@ HWTEST_F(SignalTest, ItPosixSignal018, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_019
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal019, TestSize.Level0)
{
@@ -477,7 +438,6 @@ HWTEST_F(SignalTest, ItPosixSignal019, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_020
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal020, TestSize.Level0)
{
@@ -488,7 +448,6 @@ HWTEST_F(SignalTest, ItPosixSignal020, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_025
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal025, TestSize.Level0)
{
@@ -499,7 +458,6 @@ HWTEST_F(SignalTest, ItPosixSignal025, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_026
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal026, TestSize.Level0)
{
@@ -510,7 +468,6 @@ HWTEST_F(SignalTest, ItPosixSignal026, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_028
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal028, TestSize.Level0)
{
@@ -521,7 +478,6 @@ HWTEST_F(SignalTest, ItPosixSignal028, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_029
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal029, TestSize.Level0)
{
@@ -532,7 +488,6 @@ HWTEST_F(SignalTest, ItPosixSignal029, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_030
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal030, TestSize.Level0)
{
@@ -543,7 +498,6 @@ HWTEST_F(SignalTest, ItPosixSignal030, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_033
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal033, TestSize.Level0)
{
@@ -554,7 +508,6 @@ HWTEST_F(SignalTest, ItPosixSignal033, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_038
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal038, TestSize.Level0)
{
@@ -565,7 +518,6 @@ HWTEST_F(SignalTest, ItPosixSignal038, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_040
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal040, TestSize.Level0)
{
@@ -576,7 +528,6 @@ HWTEST_F(SignalTest, ItPosixSignal040, TestSize.Level0)
* @tc.name: IT_POSIX_SIGNAL_041
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixSignal041, TestSize.Level0)
{
@@ -587,7 +538,6 @@ HWTEST_F(SignalTest, ItPosixSignal041, TestSize.Level0)
* @tc.name: IT_IPC_PIPE_002
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItIpcPipe002, TestSize.Level0)
{
@@ -598,7 +548,6 @@ HWTEST_F(SignalTest, ItIpcPipe002, TestSize.Level0)
* @tc.name: IT_IPC_PIPE_003
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItIpcPipe003, TestSize.Level0)
{
@@ -609,7 +558,6 @@ HWTEST_F(SignalTest, ItIpcPipe003, TestSize.Level0)
* @tc.name: ItPosixPipe001
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixPipe001, TestSize.Level0)
{
@@ -620,7 +568,6 @@ HWTEST_F(SignalTest, ItPosixPipe001, TestSize.Level0)
* @tc.name: ItPosixPipe003
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixPipe003, TestSize.Level0)
{
@@ -631,7 +578,6 @@ HWTEST_F(SignalTest, ItPosixPipe003, TestSize.Level0)
* @tc.name: ItPosixPipe004
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixPipe004, TestSize.Level0)
{
@@ -642,7 +588,6 @@ HWTEST_F(SignalTest, ItPosixPipe004, TestSize.Level0)
* @tc.name: ItPosixPipe005
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixPipe005, TestSize.Level0)
{
@@ -653,7 +598,6 @@ HWTEST_F(SignalTest, ItPosixPipe005, TestSize.Level0)
* @tc.name: ItPosixPipe006
* @tc.desc: function for SignalTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(SignalTest, ItPosixPipe006, TestSize.Level0)
{

View File

@@ -40,8 +40,13 @@ static UINT32 Testcase(VOID)
char buffer[20]; // 20, target buffer size
char pathname[NAME_BUF_SIZE];
char *filename = "/mkfifotest2";
strncpy(pathname, "/dev", NAME_BUF_SIZE);
strcat(pathname, filename);
char *dir = "/dev";
errno_t ret1 = strncpy_s(pathname, NAME_BUF_SIZE, dir, strlen(dir));
ICUNIT_ASSERT_EQUAL(ret1, EOK, ret1);
ret1 = strcat_s(pathname, NAME_BUF_SIZE, filename);
ICUNIT_ASSERT_EQUAL(ret1, EOK, ret1);
ret = mkfifo(pathname, 0777); // 0777, file athurioty
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT1);
spid = fork();

View File

@@ -40,8 +40,13 @@ static UINT32 Testcase(VOID)
char buffer[20]; // 20, target buffer size
char pathname[NAME_BUF_SIZE];
char *filename = "/mkfifotest3";
strncpy(pathname, "/dev", NAME_BUF_SIZE);
strcat(pathname, filename);
char *dir = "/dev";
errno_t ret1 = strncpy_s(pathname, NAME_BUF_SIZE, dir, strlen(dir));
ICUNIT_ASSERT_EQUAL(ret1, EOK, ret1);
ret1 = strcat_s(pathname, NAME_BUF_SIZE, filename);
ICUNIT_ASSERT_EQUAL(ret1, EOK, ret1);
ret = mkfifo(pathname, 0777); // 0777, file athurioty
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT1);
spid = fork();

View File

@@ -53,56 +53,6 @@ static int TestMkfifoReturn()
ICUNIT_GOTO_EQUAL(retValue, -1, retValue, EXIT);
ICUNIT_GOTO_EQUAL(errno, EEXIST, errno, EXIT);
/* // no support errno EDQUOT ENOENT EROFS ENAMETOOLONG
retValue = mkfifo("/dev/fifo0/fifo1", 0777);
ICUNIT_GOTO_EQUAL(retValue, -1, retValue, EXIT);
ICUNIT_GOTO_EQUAL(errno, ENOENT, errno, EXIT);
mkdir("/dev/usr", 0444);
ICUNIT_GOTO_EQUAL(retValue, 0, retValue,EXIT);
retValue = mkfifo("/dev/usr/fifo0", 0777);
ICUNIT_GOTO_EQUAL(retValue, -1, retValue, EXIT);
ICUNIT_GOTO_EQUAL(errno, EROFS, errno, EXIT);
sprintf(pathname, "/dev/");
for (i = 5; i < NAME_BUF_SIZE - 4; i = i + 4) {
sprintf(&pathname[i], "fifo");
}
printf("pathname : %s\n", pathname);
retValue = mkfifo(pathname, 0777);
ICUNIT_GOTO_EQUAL(retValue, -1, retValue, EXIT);
ICUNIT_GOTO_EQUAL(errno, ENAMETOOLONG, errno, EXIT);
retValue = mkfifo("/usr/fifo0", 0777);
ICUNIT_GOTO_EQUAL(retValue, -1, retValue, EXIT);
pid = fork();
if (pid < 0) {
printf("Fork error\n");
return LOS_NOK;
} else if (pid == 0) {
for (i = 1; i <= 100024; i++) {
sprintf(pathname, "/dev/fifo%d", i);
mkfifo(pathname, 0777);
}
retValue = mkfifo("/dev/fifo100025", 0777);
if (retValue != -1) {
printf("error: unexpect return mkfifo\n");
exit(FAULT1);
}
if (errno != EDQUOT) {
printf("error: unexpect errno mkfifo\n");
exit(FAULT2);
}
exit(LOS_OK);
}
wait(&status);
ICUNIT_GOTO_EQUAL(WEXITSTATUS(status),LOS_OK,WEXITSTATUS(status), EXIT);
for (i = 0; i <= 100025; i++) {
sprintf(pathname, "/dev/fifo%d", i);
unlink(pathname);
} */
unlink("/usr/fifo0");
unlink("/dev/fifo0/fifo1");
unlink("/dev/usr/fifo0");

View File

@@ -67,7 +67,7 @@ static int TestPipeMultiProcess()
errno = 0;
char sentence1[15] = "Hello World";
char a[2] = {0};
sprintf(a, "%d", i);
(void)sprintf_s(a, sizeof(a), "%d", i);
strcat(sentence1, a);
int ret = write(*writeFd, sentence1, strlen(sentence1) + 1);
ICUNIT_ASSERT_EQUAL(ret, strlen(sentence1) + 1, ret);
@@ -87,7 +87,7 @@ static int TestPipeMultiProcess()
printf("read\n");
char sentence1[15] = "Hello World";
char a[2] = {0};
sprintf(a, "%d", i);
(void)sprintf_s(a, sizeof(a), "%d", i);
strcat(sentence1, a);
memset(readbuffer, 0, sizeof(readbuffer));
retValue = read(*readFd, readbuffer, strlen(sentence1) + 1);

View File

@@ -35,10 +35,11 @@
static int g_sigCount = 0;
static void SigPrint(int sig)
{
(void)sig;
g_sigCount++;
}
static int TestRaiseIgnore()
static int TestRaiseIgnore(void)
{
int sig = SIGPWR;
void *ret;

View File

@@ -34,15 +34,17 @@
static int g_sigCount = 0;
static void SigPrint(int sig)
{
(void)sig;
g_sigCount++;
}
static void SigPrint1(int sig)
{
(void)sig;
g_sigCount += 100; // 100, Used to calculate the progress of the program.
}
static int TestSigSet()
static int TestSigSet(void)
{
sigset_t set = { 0 };
sigset_t set1 = { 0 };

View File

@@ -33,19 +33,22 @@
static void SigPrint(int sig)
{
printf("%s\n", __FUNCTION__, __LINE__);
(void)sig;
printf("%s%d\n", __FUNCTION__, __LINE__);
return;
}
static void SigPrint1(int sig)
{
printf("%s\n", __FUNCTION__, __LINE__);
(void)sig;
printf("%s%d\n", __FUNCTION__, __LINE__);
return;
}
static int g_sigCount = 0;
static void SigPrint2(int sig)
{
(void)sig;
g_sigCount = 1;
printf("%s, count = %d\n", __FUNCTION__, g_sigCount);
return;
@@ -53,6 +56,7 @@ static void SigPrint2(int sig)
static void *ThreadSetFunc2(void *arg)
{
(void)arg;
void (*retSig)(int);
retSig = signal(SIGALRM, SigPrint2);
ICUNIT_GOTO_NOT_EQUAL(retSig, SIG_ERR, retSig, EXIT);
@@ -65,6 +69,7 @@ EXIT:
static void *ThreadSetDfl(void *arg)
{
(void)arg;
void (*retSig)(int);
retSig = signal(SIGALRM, SIG_DFL);
ICUNIT_GOTO_NOT_EQUAL(retSig, SIG_ERR, retSig, EXIT);
@@ -77,6 +82,7 @@ EXIT:
static void *ThreadKill(void *arg)
{
(void)arg;
int retValue;
retValue = raise(SIGALRM);
@@ -88,7 +94,7 @@ EXIT:
return (void *)-1;
}
static int TestSigMultiPthread()
static int TestSigMultiPthread(void)
{
int fpid;
int status;

View File

@@ -35,15 +35,17 @@
static void SigPrint(int signum)
{
(void)signum;
printf("Catch signal %d\n", signum);
}
static void SigQuit(int signum)
{
(void)signum;
printf("QUIT\n");
}
static int TestSignal()
static int TestSignal(void)
{
int sigI = SIGINT;
int sigQ = SIGQUIT;
@@ -86,4 +88,4 @@ static int TestSignal()
void ItPosixSignal021(void)
{
TEST_ADD_CASE(__FUNCTION__, TestSignal, TEST_POSIX, TEST_SIGNAL, TEST_LEVEL0, TEST_FUNCTION);
}
}

View File

@@ -33,15 +33,17 @@
static void OldAction(int signum)
{
(void)signum;
printf("Here is the old action\n");
}
static void NewAction(int signum)
{
(void)signum;
printf("Here is the new action\n");
}
static int TestSigaction()
static int TestSigaction(void)
{
int retValue, status;
int fpid = fork();
@@ -102,4 +104,4 @@ static int TestSigaction()
void ItPosixSignal024(void)
{
TEST_ADD_CASE(__FUNCTION__, TestSigaction, TEST_POSIX, TEST_SIGNAL, TEST_LEVEL0, TEST_FUNCTION);
}
}

View File

@@ -38,16 +38,6 @@ static UINT32 TestCase(VOID)
int ret = 0;
sigset_t set;
/* // EINVAL no support
ret = sigemptyset(NULL);
ICUNIT_ASSERT_EQUAL(ret, -1, ret);
ICUNIT_ASSERT_EQUAL(errno, EINVAL, errno);
ret = sigfillset(NULL);
ICUNIT_ASSERT_EQUAL(ret, -1, ret);
ICUNIT_ASSERT_EQUAL(errno, EINVAL, errno);
*/
int status;
int fpid = fork();
if (fpid == 0) {
@@ -119,4 +109,4 @@ static UINT32 TestCase(VOID)
void ItPosixSignal031(void)
{
TEST_ADD_CASE(__FUNCTION__, TestCase, TEST_POSIX, TEST_SIGNAL, TEST_LEVEL0, TEST_FUNCTION);
}
}

View File

@@ -34,6 +34,7 @@
static int g_sigCount = 0;
static void SigPrint(int sig)
{
(void)sig;
g_sigCount++;
printf("signal receive sucess\n");
}
@@ -75,4 +76,4 @@ static UINT32 TestCase(VOID)
void ItPosixSignal032(void)
{
TEST_ADD_CASE(__FUNCTION__, TestCase, TEST_POSIX, TEST_SIGNAL, TEST_LEVEL0, TEST_FUNCTION);
}
}

View File

@@ -34,6 +34,7 @@
static int g_sigCount = 0;
static void SigPrint(int sig)
{
(void)sig;
g_sigCount++;
}

View File

@@ -57,12 +57,6 @@ static UINT32 TestCase(VOID)
exit(0);
}
/* // EFAULT no support
ret = setitimer(ITIMER_VIRTUAL, NULL, &oldValue);
printf("ret = %d errno = %d EFAULT = %d\n", ret, errno, EFAULT);
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));

View File

@@ -47,7 +47,6 @@ public:
* @tc.name: IT_TEST_TRACE_001
* @tc.desc: function for TraceTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(TraceTest, ItTestTrace001, TestSize.Level0)
{
@@ -58,7 +57,6 @@ HWTEST_F(TraceTest, ItTestTrace001, TestSize.Level0)
* @tc.name: IT_TEST_TRACE_002
* @tc.desc: function for TraceTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(TraceTest, ItTestTrace002, TestSize.Level0)
{
@@ -69,7 +67,6 @@ HWTEST_F(TraceTest, ItTestTrace002, TestSize.Level0)
* @tc.name: IT_TEST_TRACE_003
* @tc.desc: function for TraceTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(TraceTest, ItTestTrace003, TestSize.Level0)
{
@@ -80,7 +77,6 @@ HWTEST_F(TraceTest, ItTestTrace003, TestSize.Level0)
* @tc.name: IT_TEST_TRACE_004
* @tc.desc: function for TraceTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(TraceTest, ItTestTrace004, TestSize.Level0)
{