Skip to content

Commit 9ea4fa4

Browse files
casarolixiaoxiang781216
authored andcommitted
testing/testsuites: Expect EBADF in the pipe02 syscall test.
pipe02 writes to the read end and reads from the write end of a pipe. POSIX specifies EBADF for both: "The fildes argument is not a valid file descriptor open for writing" (write) and "... open for reading" (read). The test expected EACCES, the old NuttX error code. NuttX now returns EBADF, so expect EBADF. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
1 parent da90652 commit 9ea4fa4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎testing/testsuites/kernel/syscall/cases/pipe_test.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ void test_nuttx_syscall_pipe02(FAR void **state)
8989

9090
ret = write(fd[0], "A", 1);
9191
assert_int_equal(ret, -1);
92-
assert_int_equal(errno, EACCES);
92+
assert_int_equal(errno, EBADF);
9393

9494
ret = read(fd[1], buf, 1);
9595
assert_int_equal(ret, -1);
96-
assert_int_equal(errno, EACCES);
96+
assert_int_equal(errno, EBADF);
9797

9898
assert_int_equal(close(fd[0]), 0);
9999
assert_int_equal(close(fd[1]), 0);

0 commit comments

Comments
 (0)