From 58dd684c4e86944301959a140dbed9746df35779 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 5 Dec 2023 00:03:04 +0100 Subject: Second commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- testutil/strerror-all.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 testutil/strerror-all.c (limited to 'testutil/strerror-all.c') diff --git a/testutil/strerror-all.c b/testutil/strerror-all.c new file mode 100644 index 0000000..b875392 --- /dev/null +++ b/testutil/strerror-all.c @@ -0,0 +1,25 @@ +/* See LICENSE file for copyright and license details. */ +#include "../libsyscalls.h" + +#include +#include + + +int +main(void) +{ + size_t i, count; + +#define X(...) 1 + count = (LIBSYSCALLS_LIST_ERRORS(X, +)); +#undef X + + for (i = 0; i < count; i++) + printf("%s\n", libsyscalls_strerror((enum libsyscalls_error)i)); + + if (fflush(stdout) || fclose(stdout)) { + perror(NULL); + return 1; + } + return 0; +} -- cgit v1.2.3-70-g09d2