From 5c51e14ad89c9210536aab61836111962b68fb4f Mon Sep 17 00:00:00 2001
From: Bruno Haible <bruno@clisp.org>
Date: Thu, 27 Jul 2023 23:15:09 +0200
Subject: [PATCH] gnulib-tool: Include ftruncate in testdirs.

* gnulib-tool (func_create_testdir): Don't exclude module 'ftruncate'
from testdirs by default.
* pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
---
 ChangeLog             | 7 +++++++
 gnulib-tool           | 4 ++--
 pygnulib/GLTestDir.py | 4 ++--
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2deb69cc2f..8b08c235cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-07-27  Bruno Haible  <bruno@clisp.org>
+
+	gnulib-tool: Include ftruncate in testdirs.
+	* gnulib-tool (func_create_testdir): Don't exclude module 'ftruncate'
+	from testdirs by default.
+	* pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
+
 2023-07-27  Bruno Haible  <bruno@clisp.org>
 
 	fnmatch-h, glob-h tests: Fix link errors (regression 2023-07-24).
diff --git a/gnulib-tool b/gnulib-tool
index 13e3ff2970..ae1b17f4dd 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -6419,10 +6419,10 @@ func_create_testdir ()
     # Except non-recursive-gnulib-prefix-hack, which represents a nonstandard
     # way of using Automake.
     # Except timevar, which lacks the required file timevar.def.
-    # Except ftruncate, mountlist, which abort the configuration on mingw. FIXME.
+    # Except mountlist, which aborts the configuration on mingw. FIXME.
     # Except lib-ignore, which leads to link errors when Sun C++ is used. FIXME.
     modules=`func_all_modules`
-    modules=`for m in $modules; do case $m in config-h | non-recursive-gnulib-prefix-hack | timevar | ftruncate | mountlist | lib-ignore) ;; *) echo $m;; esac; done`
+    modules=`for m in $modules; do case $m in config-h | non-recursive-gnulib-prefix-hack | timevar | mountlist | lib-ignore) ;; *) echo $m;; esac; done`
   fi
   specified_modules="$modules"
 
diff --git a/pygnulib/GLTestDir.py b/pygnulib/GLTestDir.py
index 7a6ef559f1..0f5a5ad446 100644
--- a/pygnulib/GLTestDir.py
+++ b/pygnulib/GLTestDir.py
@@ -160,13 +160,13 @@ class GLTestDir(object):
             # Except config-h, which breaks all modules which use HAVE_CONFIG_H.
             # Except non-recursive-gnulib-prefix-hack, which represents a
             # nonstandard way of using Automake.
-            # Except ftruncate, mountlist, which abort the configuration on mingw.
+            # Except mountlist, which aborts the configuration on mingw.
             # Except lib-ignore, which leads to link errors when Sun C++ is used.
             specified_modules = self.modulesystem.list()
             specified_modules = [module
                                  for module in specified_modules
                                  if module not in ['config-h', 'non-recursive-gnulib-prefix-hack',
-                                                   'ftruncate', 'mountlist', 'lib-ignore']]
+                                                   'mountlist', 'lib-ignore']]
 
         # Canonicalize the list of specified modules.
         specified_modules = sorted(set(specified_modules))
-- 
2.39.5