[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fchdir tests: Fix test failure on native Windows
From: |
Bruno Haible |
Subject: |
fchdir tests: Fix test failure on native Windows |
Date: |
Thu, 27 Apr 2023 00:49:07 +0200 |
On native Windows, in a testdir of module 'fchdir' (but not in a testdir of
all of Gnulib), I'm seeing a test failure:
test-fchdir.c:74: assertion 'fchdir (fd) == 0' failed
What happens? fchdir.c contains logic for keeping track which file
descriptor corresponds to which directory. In the test's line
int new_fd = dup (fd);
the information is expected to be copied from fd to new_fd. But that
does not happen, because 'dup' is not overridden.
This patch fixes it.
2023-04-26 Bruno Haible <bruno@clisp.org>
fchdir tests: Fix test failure on native Windows.
* modules/fchdir-tests (Depends-on): Add dup.
diff --git a/modules/fchdir-tests b/modules/fchdir-tests
index 89ddf713ac..6ac141079c 100644
--- a/modules/fchdir-tests
+++ b/modules/fchdir-tests
@@ -6,6 +6,7 @@ tests/macros.h
Depends-on:
cloexec
getcwd-lgpl
+dup
configure.ac:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- fchdir tests: Fix test failure on native Windows,
Bruno Haible <=