From: Bruno Haible Date: Sat, 1 Nov 2025 11:47:38 +0000 (+0100) Subject: openat2 tests: Avoid gratuitous test failure when debugging. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5746cd1cdbb2caf0e321ea79041885fc7ef22423;p=thirdparty%2Fgnulib.git openat2 tests: Avoid gratuitous test failure when debugging. * tests/test-openat2.c: Include ignore-value.h. (do_prepare): Remove left-overs on disk. * modules/openat2-tests (Depends-on): Add ignore-value. --- diff --git a/ChangeLog b/ChangeLog index c02c1c14b9..8d0aa9f023 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2025-11-01 Bruno Haible + + openat2 tests: Avoid gratuitous test failure when debugging. + * tests/test-openat2.c: Include ignore-value.h. + (do_prepare): Remove left-overs on disk. + * modules/openat2-tests (Depends-on): Add ignore-value. + 2025-11-01 Bruno Haible fprintftime: Return -1 on output error. diff --git a/modules/openat2-tests b/modules/openat2-tests index 88126f60ad..25a0ea2edb 100644 --- a/modules/openat2-tests +++ b/modules/openat2-tests @@ -7,6 +7,7 @@ tests/macros.h Depends-on: close fcntl +ignore-value mkdirat stdcountof-h stdint-h diff --git a/tests/test-openat2.c b/tests/test-openat2.c index fc93a7a9a9..a3832992ec 100644 --- a/tests/test-openat2.c +++ b/tests/test-openat2.c @@ -36,6 +36,7 @@ SIGNATURE_CHECK (openat2, int, (int, char const *, # include #endif +#include "ignore-value.h" #include "macros.h" #define BASE "test-openat2.t" @@ -71,6 +72,9 @@ do_open (char const *name, int flags, ...) static void do_prepare () { + /* Remove any leftovers from a previous partial run. */ + ignore_value (system ("rm -rf " BASE "*")); + /* Construct a test directory with the following structure: