diff options
author | Jesper Dangaard Brouer <brouer@redhat.com> | 2023-02-01 18:32:00 +0100 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2023-02-02 00:48:49 +0100 |
commit | 7bd4224deecd2d917fcbb52f9d13ab1453be219a (patch) | |
tree | d1d9cfdf7de2f2e19a653634ee0b331110ddcb86 /tools/testing/selftests/bpf/prog_tests/xdp_metadata.c | |
parent | a19a62e56478ba4afadfa7df94d0819542b7ccf8 (diff) |
selftests/bpf: xdp_hw_metadata correct status value in error(3)
The glibc error reporting function error():
void error(int status, int errnum, const char *format, ...);
The status argument should be a positive value between 0-255 as it
is passed over to the exit(3) function as the value as the shell exit
status. The least significant byte of status (i.e., status & 0xFF) is
returned to the shell parent.
Fix this by using 1 instead of -1. As 1 corresponds to C standard
constant EXIT_FAILURE.
Fixes: 297a3f124155 ("selftests/bpf: Simple program to dump XDP RX metadata")
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Stanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.org/bpf/167527272038.937063.9137108142012298120.stgit@firesoul
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/xdp_metadata.c')
0 files changed, 0 insertions, 0 deletions