nuttx-apps/testing/testsuites/kernel/syscall/cases
Xiang Xiao 5ead824fff apps: Fix O_ACCMODE bitmask checks after Linux flag alignment
After aligning NuttX open() flag constants with Linux (O_RDONLY=0,
O_WRONLY=1, O_RDWR=2), code that used '(flags & O_RDONLY)' or
'(flags & O_WRONLY)' as a bitmask check is broken because O_RDONLY
is now 0.  Fix by using '(flags & O_ACCMODE)' comparisons instead.

  - usrsocktest: replace 'flags & O_RDWR' with 'flags & O_ACCMODE'
    in fcntl F_GETFL assertions
  - dd: verify mode used '(oflags & O_RDONLY)' to detect verify;
    replace with '(oflags & O_ACCMODE) == O_RDWR'
  - dpopen: replace '(oflag & O_RDWR) == O_RDWR' with
    '(oflag & O_ACCMODE) == O_RDWR'
  - usbmsc: replace 'flags & O_WRONLY' with
    '(flags & O_ACCMODE) == O_RDONLY'
  - fcntl_test: replace '(flags & O_WRONLY) == 0' with
    '(flags & O_ACCMODE) == O_RDONLY'

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-06-30 12:19:58 -04:00
..
accept_test.c Remove unused header files across multiple source files 2025-01-10 21:42:00 +08:00
bind_test.c Remove unused header files across multiple source files 2025-01-10 21:42:00 +08:00
chdir_test.c
clock_gettime_test.c
clock_nanosleep_test.c !apps: replace sclock_t with clock_t and drop redundant time_t/off_t casts 2026-05-11 17:38:32 +08:00
clock_settime_test.c
close_test.c syscall: fix badfd test for fdcheck compatibility 2026-01-22 19:48:57 +08:00
connect_test.c testing: Fix cmocka_syscall_test crash when CONFIG_FDCHECK enable 2026-02-03 17:36:49 +08:00
creat_test.c
dup2_test.c apps/testing: fix syscall cases for fdcheck compatibility 2026-01-22 19:48:57 +08:00
dup_test.c testing: Fix cmocka_syscall_test crash when CONFIG_FDCHECK enable 2026-02-03 17:36:49 +08:00
fcntl_test.c apps: Fix O_ACCMODE bitmask checks after Linux flag alignment 2026-06-30 12:19:58 -04:00
fpathconf_test.c
Fstatfs_test.c
fsync_test.c !apps: replace sclock_t with clock_t and drop redundant time_t/off_t casts 2026-05-11 17:38:32 +08:00
ftruncate_test.c
getcwd_test.c
getegid_test.c
geteuid_test.c
getgid_test.c
gethostname_test.c
getitimer_test.c
getpeername_test.c
getpid_test.c
getppid_test.c
getsocketopt_test.c
getTimeofday_test.c testing: getTimeofday_test: fix build warning 2025-12-10 12:17:44 +01:00
getuid_test.c
listen_test.c testing: Fix cmocka_syscall_test crash when CONFIG_FDCHECK enable 2026-02-03 17:36:49 +08:00
lseek_test.c apps: Fix additional open() arguments. 2026-05-22 13:39:04 +08:00
lstat_test.c Remove unused header files across multiple source files 2025-01-10 21:42:00 +08:00
memcmp_test.c
memcpy_test.c Remove unused header files across multiple source files 2025-01-10 21:42:00 +08:00
memset_test.c Remove unused header files across multiple source files 2025-01-10 21:42:00 +08:00
mkdir_test.c
nansleep_test.c
pathconf_test.c
pipe_test.c
pread_test.c !apps: drop redundant casts on tv_sec/tv_nsec and fix printf formats 2026-05-22 13:38:25 +08:00
pwrite_test.c
read_test.c
readdir_test.c Remove unused header files across multiple source files 2025-01-10 21:42:00 +08:00
recvfrom_test.c
rmdir_test.c apps: Fix additional open() arguments. 2026-05-22 13:39:04 +08:00
sched_test.c Remove unused header files across multiple source files 2025-01-10 21:42:00 +08:00
setsocketopt01_test.c apps/testing: fix syscall cases for fdcheck compatibility 2026-01-22 19:48:57 +08:00
socket_test.c
socketpair_test.c
symlink_test.c
time_test.c !apps: replace sclock_t with clock_t and drop redundant time_t/off_t casts 2026-05-11 17:38:32 +08:00
timer_create_test.c
timer_delete_test.c
timer_gettime_test.c
truncate_test.c !apps: drop redundant casts on tv_sec/tv_nsec and fix printf formats 2026-05-22 13:38:25 +08:00
unlink_test.c apps: Fix additional open() arguments. 2026-05-22 13:39:04 +08:00
write_test.c !apps: drop redundant casts on tv_sec/tv_nsec and fix printf formats 2026-05-22 13:38:25 +08:00