1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-04-28 06:33:36 +00:00

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.
This commit is contained in:
Bruno Haible
2025-11-01 12:47:38 +01:00
parent 90108083de
commit 5746cd1cdb
3 changed files with 12 additions and 0 deletions

View File

@@ -1,3 +1,10 @@
2025-11-01 Bruno Haible <bruno@clisp.org>
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 <bruno@clisp.org>
fprintftime: Return -1 on output error.

View File

@@ -7,6 +7,7 @@ tests/macros.h
Depends-on:
close
fcntl
ignore-value
mkdirat
stdcountof-h
stdint-h

View File

@@ -36,6 +36,7 @@ SIGNATURE_CHECK (openat2, int, (int, char const *,
# include <signal.h>
#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: