fix:修复函数返回错误等问题

Signed-off-by: zhangdengyu <zhangdengyu2@huawei.com>
This commit is contained in:
zhangdengyu
2022-09-24 17:04:38 +08:00
parent 453c376198
commit 043e84dfcb
34 changed files with 82 additions and 79 deletions

View File

@@ -59,7 +59,7 @@ static int TestMkfifo()
if (fd < 0) {
return -1;
}
write(fd, sentence, sizeof(sentence) + 1);
write(fd, sentence, sizeof(sentence));
close(fd);
exit(0);
} else {

View File

@@ -45,7 +45,6 @@ static int TestMkfifoReturn()
int retValue, i;
int status = 0;
pid_t pid;
char pathname[NAME_BUF_SIZE];
retValue = mkfifo("/dev/fifo0", 0777); // 0777, mkfifo config.
ICUNIT_ASSERT_EQUAL(retValue, 0, retValue);
@@ -57,7 +56,6 @@ static int TestMkfifoReturn()
unlink("/dev/fifo0/fifo1");
unlink("/dev/usr/fifo0");
rmdir("/dev/usr");
unlink(pathname);
unlink("/dev/fifo0");
return LOS_OK;
@@ -66,7 +64,6 @@ EXIT:
unlink("/dev/fifo0/fifo1");
unlink("/dev/usr/fifo0");
rmdir("/dev/usr");
unlink(pathname);
unlink("/dev/fifo0");
return LOS_NOK;
}