fix: kora工具检视问题修复

【背景】kora工具检视问题修复

【修改方案】
1,对部分代码问题进行整改

【影响】
对现有的产品编译不会有影响。

Signed-off-by: wangchen <wangchen64@huawei.com>
Change-Id: Iafc58b7c71e5d139e11a0ae9d98ca5a57fc6549f
This commit is contained in:
wangchen
2022-03-22 12:52:03 +00:00
parent f61ecd7669
commit 6ba17fc862
40 changed files with 146 additions and 248 deletions

View File

@@ -40,30 +40,4 @@ public:
static void SetUpTestCase(void) {}
static void TearDownTestCase(void) {}
};
#if defined(LOSCFG_USER_TEST_FULL)
/* *
* @tc.name: IPC_TEST_MKFIFOAT_001
* @tc.desc: function for IoTest:mkfifoat-normal test
* @tc.type: FUNC
*/
#if 0
HWTEST_F(IoTest, IPC_TEST_MKFIFOAT_001, TestSize.Level0)
{
IPC_TEST_MKFIFOAT_001();
}
#endif
/* *
* @tc.name: IPC_TEST_MKFIFOAT_002
* @tc.desc: function for IoTest:mkfifoat-innormal test
* @tc.type: FUNC
*/
#if 0
HWTEST_F(IoTest, IPC_TEST_MKFIFOAT_002, TestSize.Level0)
{
IPC_TEST_MKFIFOAT_002();
}
#endif
#endif
} // namespace OHOS

View File

@@ -56,11 +56,17 @@ static int TestMkfifo()
return -1;
} else if (pid == 0) {
fd = open("/dev/fifo", O_WRONLY);
if (fd < 0) {
return -1;
}
write(fd, sentence, sizeof(sentence) + 1);
close(fd);
exit(0);
} else {
fd = open("/dev/fifo", O_RDONLY);
if (fd < 0) {
return -1;
}
read(fd, buffer, sizeof(buffer));
printf("Receive data: %s\n", buffer);
close(fd);