提交 76cea7a1 编写于 作者: zzuli_lyw's avatar zzuli_lyw

Title: Fix the test case named of ActsToolChainTest in Rk3566

Description: Modifying the function of checking fd(file descriptor) from  to  to avoid failing test case in Rk3566

Issue: https://gitee.com/openharmony/xts_acts/issues/I7AFUP

Test: run xts suite on Rk3566 until the failure is not returned in `open` test case
Signed-off-by: zzuli_lyw's avatarzzulilyw <378305181@qq.com>
上级 adb47574
......@@ -32,7 +32,7 @@ void open_0100(void)
int fd = open(path, O_RDONLY + O_CREAT);
int len = write(fd, s, sizeof(s));
ssize_t size = read(fd, buffer, sizeof(buffer));
EXPECT_EQ("open_0100", fd, 4);
EXPECT_MT("open_0100", fd, 2);
EXPECT_EQ("open_0100", len, -1);
EXPECT_STREQ("open_0100", buffer, "");
......@@ -62,7 +62,7 @@ void open_0300(void)
char buffer[80] = {0};
int fd = open(path, O_WRONLY + O_CREAT);
ssize_t size = read(fd, buffer, sizeof(buffer));
EXPECT_EQ("open_0300", fd, 4);
EXPECT_MT("open_0300", fd, 2);
EXPECT_STREQ("open_0300", buffer, "");
int len = write(fd, s, sizeof(s));
EXPECT_EQ("open_0300", len, 5);
......@@ -92,7 +92,7 @@ void open_0500(void)
char buffer[80] = {0};
int fd = open(path, O_RDWR | O_APPEND + O_CREAT);
ssize_t size = read(fd, buffer, sizeof(buffer));
EXPECT_EQ("open_0500", fd, 4);
EXPECT_MT("open_0500", fd, 2);
EXPECT_STREQ("open_0500", buffer, "");
int len = write(fd, s, sizeof(s));
EXPECT_EQ("open_0500", len, 5);
......@@ -140,7 +140,7 @@ void open_0800(void)
char buffer[80] = {0};
int fd = open(path, O_RDWR | O_CREAT);
ssize_t size = read(fd, buffer, sizeof(buffer));
EXPECT_EQ("open_0800", fd, 4);
EXPECT_MT("open_0800", fd, 2);
EXPECT_STREQ("open_0800", buffer, "");
int len = write(fd, s, sizeof(s));
EXPECT_EQ("open_0800", len, 5);
......@@ -159,7 +159,7 @@ void open_0900(void)
char buffer[80] = {0};
int fd = open(path, O_RDWR | O_CLOEXEC + O_CREAT);
ssize_t size = read(fd, buffer, sizeof(buffer));
EXPECT_EQ("open_0900", fd, 4);
EXPECT_MT("open_0900", fd, 2);
EXPECT_STREQ("open_0900", buffer, "");
int len = write(fd, s, sizeof(s));
EXPECT_EQ("open_0900", len, 5);
......@@ -188,4 +188,4 @@ int main(int argc, char *argv[])
}
return t_status;
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册