History log of /netbsd-src/tests/kernel/t_memfd_create.c (Results 1 – 3 of 3)
Revision Date Author Comments
# ef23f679 24-Nov-2023 riastradh <riastradh@NetBSD.org>

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 re

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.

show more ...


# 123e0529 29-Jul-2023 rin <rin@NetBSD.org>

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


# d3ba7ba3 29-Jul-2023 christos <christos@NetBSD.org>

Add tests for t_memfd_create and fix bug found by tests