This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 9ea4fa4d2 testing/testsuites: Expect EBADF in the pipe02 syscall test.
9ea4fa4d2 is described below

commit 9ea4fa4d282f09a928d890698ae90747b344a3e7
Author: Marco Casaroli <[email protected]>
AuthorDate: Mon Nov 2 08:30:37 2026 +0100

    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 <[email protected]>
---
 testing/testsuites/kernel/syscall/cases/pipe_test.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testing/testsuites/kernel/syscall/cases/pipe_test.c 
b/testing/testsuites/kernel/syscall/cases/pipe_test.c
index 10b0b47d8..dc5dd5cb8 100644
--- a/testing/testsuites/kernel/syscall/cases/pipe_test.c
+++ b/testing/testsuites/kernel/syscall/cases/pipe_test.c
@@ -89,11 +89,11 @@ void test_nuttx_syscall_pipe02(FAR void **state)
 
   ret = write(fd[0], "A", 1);
   assert_int_equal(ret, -1);
-  assert_int_equal(errno, EACCES);
+  assert_int_equal(errno, EBADF);
 
   ret = read(fd[1], buf, 1);
   assert_int_equal(ret, -1);
-  assert_int_equal(errno, EACCES);
+  assert_int_equal(errno, EBADF);
 
   assert_int_equal(close(fd[0]), 0);
   assert_int_equal(close(fd[1]), 0);

Reply via email to