GNU bug report logs - #60962
[PATCH v3] tests: Fix implicit function declaration in ax/depcomp.sh

Previous Next

Package: automake-patches;

Reported by: Frédéric Bérat <fberat <at> redhat.com>

Date: Fri, 20 Jan 2023 10:52:01 UTC

Severity: normal

Tags: patch

Done: Karl Berry <karl <at> freefriends.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 60962 in the body.
You can then email your comments to 60962 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to automake-patches <at> gnu.org:
bug#60962; Package automake-patches. (Fri, 20 Jan 2023 10:52:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Frédéric Bérat <fberat <at> redhat.com>:
New bug report received and forwarded. Copy sent to automake-patches <at> gnu.org. (Fri, 20 Jan 2023 10:52:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Frédéric Bérat <fberat <at> redhat.com>
To: automake-patches <at> gnu.org
Cc: Frederic Berat <fberat <at> redhat.com>
Subject: [PATCH v3] tests: Fix implicit function declaration in ax/depcomp.sh
Date: Fri, 20 Jan 2023 11:51:39 +0100
From: Frederic Berat <fberat <at> redhat.com>

Change since v2:
 - Replace the mv operation by a cp operation to ensure that subfoo.h is
   considered being modified.

-- 8< --

In depcomp.sh, the following occurs:

1. Files are created so that headers and units are available in
   subdirectories
2. Multiple "make" are executed, while modifying the content of the
   headers, some should fail, others should succeed.
3. At the end, the "sub/subfoo.h" header gets removed.
4. make is executed again, which is expected to succeed.

Yet, with c99, this can't work as the subfoo.h header contains
declaration that are used by foo.c.
Thus, we need to get them back, either by inserting the declaration in
foo.c (or any other header/unit), or by restoring subfoo.h to its
original state.

The later solution seems the easiest path, being less intrusive in
depcomp.sh.
---
 t/ax/depcomp.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/ax/depcomp.sh b/t/ax/depcomp.sh
index 7a3ac63a7..c92f7c8df 100644
--- a/t/ax/depcomp.sh
+++ b/t/ax/depcomp.sh
@@ -243,6 +243,7 @@ cat > sub/subfoo.h <<'END'
 #include <stdio.h>
 extern int subfoo (void);
 END
+cp sub/subfoo.h sub/subfoo.save
 
 cat > src/baz.c <<'END'
 #include "baz.h"
@@ -399,8 +400,7 @@ do_test ()
       && rewrite "$srcdir"/sub/subfoo.h echo 'choke me' \
       && not $MAKE \
       && delete "$srcdir"/sub/subfoo.h \
-      && edit "$srcdir"/sub/subfoo.c -e 1d \
-      && edit "$srcdir"/foo.h -e 2d \
+      && cp "$srcdir"/sub/subfoo.save "$srcdir"/sub/subfoo.h \
       && make_ok \
       || r='not ok'
     result_ "$r" "$pfx dependency tracking works"
-- 
2.39.0





Information forwarded to automake-patches <at> gnu.org:
bug#60962; Package automake-patches. (Mon, 28 Aug 2023 13:14:02 GMT) Full text and rfc822 format available.

Message #8 received at 60962 <at> debbugs.gnu.org (full text, mbox):

From: Karl Berry <karl <at> freefriends.org>
To: fberat <at> redhat.com
Cc: 60962 <at> debbugs.gnu.org
Subject: Re: [bug#60962] [PATCH v3] tests: Fix implicit function declaration in
 ax/depcomp.sh
Date: Mon, 28 Aug 2023 07:13:29 -0600
Hi Frédéric,

     [in t/ax/depcomp.sh]
     - Replace the mv operation by a cp operation to ensure that subfoo.h is
       considered being modified.

Thanks for the clear explanation and simple patch :). I (finally)
installed it, just adding a comment, so am closing this. Happy hacking,
Karl




Reply sent to Karl Berry <karl <at> freefriends.org>:
You have taken responsibility. (Mon, 28 Aug 2023 13:14:03 GMT) Full text and rfc822 format available.

Notification sent to Frédéric Bérat <fberat <at> redhat.com>:
bug acknowledged by developer. (Mon, 28 Aug 2023 13:14:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 26 Sep 2023 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 211 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.