History log of /netbsd-current/tests/kernel/t_memfd_create.c
Revision Date Author Comments
# 1.3 24-Nov-2023 riastradh

tests: Audit RZ abuse.

RZ succeeds if x is zero, and fails if x is nonzero, treating a
nonzero value as a error number as in errno(3) to print the message.

The following library routines instead return -1 on failure and set
errno to the error code:

fuse_opt_add_arg
fuse_opt_add_opt
fuse_opt_add_opt_escaped
fuse_opt_insert_arg
lseek
system

So use RL instead for those -- succeeds if x is zero, and fails if x
is -1.

This shouldn't make any tests newly fail or newly succeed -- the
functions in question only ever return 0 or -1 -- but if the tests
were already failing anywhere, they will now fail with meaningful
messages.

TBD: dlinfo, which isn't fit for RL or RZ since it reports errors via
dlerror() rather than errno.


# 1.2 29-Jul-2023 rin

t_memfd_create: Fix printf-like format by using %zu for size_t, and
%jd for off_t with cast to intmax_t, respectively.


# 1.1 29-Jul-2023 christos

Add tests for t_memfd_create and fix bug found by tests


# 1.2 29-Jul-2023 rin

t_memfd_create: Fix printf-like format by using %zu for size_t, and
%jd for off_t with cast to intmax_t, respectively.


# 1.1 29-Jul-2023 christos

Add tests for t_memfd_create and fix bug found by tests