GNU bug report logs - #14312
[PATCH 1/7] tests: expose bug#12554 (false positives for presence of '-k' make option)

Previous Next

Package: automake;

Reported by: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Date: Mon, 29 Apr 2013 21:02:05 UTC

Severity: normal

Tags: notabug, patch

Merged with 14309, 14310, 14311, 14313, 14314, 14315, 14316

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

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 14312 in the body.
You can then email your comments to 14312 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 bug-automake <at> gnu.org:
bug#14312; Package automake. (Mon, 29 Apr 2013 21:02:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefano Lattarini <stefano.lattarini <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Mon, 29 Apr 2013 21:02:05 GMT) Full text and rfc822 format available.

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

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: automake-patches <at> gnu.org
Cc: mdaniels <at> rim.com, bug-automake <at> gnu.org, 12554 <at> debbugs.gnu.org
Subject: [PATCH 1/7] tests: expose bug#12554 (false positives for presence of
	'-k' make option)
Date: Mon, 29 Apr 2013 23:00:29 +0200
The current implementation of the code descending into $(SUBDIRS)
entries uses the following snippet to decide whether make is running
with the '-k' a.k.a. '--keep-going' option, and thus whether a failure
in a subdirectory should prevent the descent in the following ones:

    fail= failcom='exit 1'; \
    for f in x $$MAKEFLAGS; do \
      case $$f in \
        *=* | --[!k]*);; \
        *k*) failcom='fail=yes';; \
      esac; \
    done

It's clear that the second pattern in the 'case' construct can possibly
match false positives, for examples in these two cases:

    make check TESTS="x.test k.test"
    make -I /usr/local/kool-fragments

which are somewhat unusual, but not invalid.  So we need a more resilient
implementation, as we did for the detection of the '-n' flag.

But alas, such an implementation seems quite tricky to obtain in portable
make.  So for the moment we content ourselves with exposing the bug, with
the hope of being able to fix soon enough.

* t/subdir-keep-going-pr12554.sh: New test.
* t/list-of-tests.mk (handwritten_TESTS, XFAIL_TESTS): Add it.
* THANKS: Update

Reported-by: Michael Daniels <mdaniels <at> rim.com>
Signed-off-by: Stefano Lattarini <stefano.lattarini <at> gmail.com>
---
 THANKS                         |  1 +
 t/list-of-tests.mk             |  2 ++
 t/subdir-keep-going-pr12554.sh | 70 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 73 insertions(+)
 create mode 100755 t/subdir-keep-going-pr12554.sh

diff --git a/THANKS b/THANKS
index cf46972..f05d0c4 100644
--- a/THANKS
+++ b/THANKS
@@ -257,6 +257,7 @@ Maxim Sinev                     good <at> goods.ru
 Maynard Johnson                 maynardj <at> us.ibm.com
 Merijn de Jonge                 M.de.Jonge <at> cwi.nl
 Michael Brantley                Michael-Brantley <at> deshaw.com
+Michael Daniels                 mdaniels <at> rim.com
 Michael Hofmann                 mhofma <at> googlemail.com
 Michael Ploujnikov              ploujj <at> gmail.com
 Michel de Ruiter                mdruiter <at> cs.vu.nl
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index c72a636..fbe2b56 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -41,6 +41,7 @@ t/remake-timing-bug-pr8365.sh \
 t/lex-subobj-nodep.sh \
 t/remake-am-pr10111.sh \
 t/remake-m4-pr10111.sh \
+t/subdir-keep-going-pr12554.sh \
 $(perl_fake_XFAIL_TESTS)
 
 perl_TESTS = \
@@ -1015,6 +1016,7 @@ t/subdir-order.sh \
 t/subdir-with-slash.sh \
 t/subdir-subsub.sh \
 t/subdir-distclean.sh \
+t/subdir-keep-going-pr12554.sh \
 t/subobj.sh \
 t/subobj2.sh \
 t/subobj4.sh \
diff --git a/t/subdir-keep-going-pr12554.sh b/t/subdir-keep-going-pr12554.sh
new file mode 100755
index 0000000..03d5cb0
--- /dev/null
+++ b/t/subdir-keep-going-pr12554.sh
@@ -0,0 +1,70 @@
+#! /bin/sh
+# Copyright (C) 2013 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that the Automake-generated recursive rules are resilient against
+# false positives in deciding whether make is running with the '-k'
+# option, and thus whether a failure into one of the $(SUBDIRS) should
+# still prevent recursion in the following $(SUBDIRS) entries.  See
+# automake bug#12544.
+
+. test-init.sh
+
+echo nil: | $MAKE -I . -f - || skip_ "$MAKE doesn't support the -I option"
+
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
+AC_OUTPUT
+END
+
+mkdir k ./--keep-going sub1 sub2
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub1 sub2
+END
+
+cat > sub1/Makefile.am <<'END'
+all-local:
+	touch ko
+	false
+END
+cat > sub2/Makefile.am <<'END'
+all-local:
+	test -f ../sub1/ko
+	touch ok
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+st=0
+$MAKE -I k -I --keep-going \
+  TESTS='k --keep-going -k' AM_MAKEFLAGS="TESTS='k --keep-going -k'" \
+  || st=$?
+# Don't trust the exit status of "make -k" for non-GNU make.
+if using_gmake; then
+  test $st -gt 0 || exit 1
+fi
+test ! -r sub2/ok
+
+# Sanity check.
+st=0; $MAKE -k || st=$?
+if { using_gmake && test $st -eq 0; } || test ! -f sub2/ok; then
+  fatal_ '"make -k" not working as expected'
+fi
+
+:
-- 
1.8.2.1.610.g562af5b





Forcibly Merged 14310 14311 14312 14315. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 29 Apr 2013 21:10:03 GMT) Full text and rfc822 format available.

Forcibly Merged 14310 14311 14312 14313 14315. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 29 Apr 2013 21:10:03 GMT) Full text and rfc822 format available.

Forcibly Merged 14310 14311 14312 14313 14314 14315. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 29 Apr 2013 21:10:03 GMT) Full text and rfc822 format available.

Forcibly Merged 14310 14311 14312 14313 14314 14315 14316. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 29 Apr 2013 21:10:03 GMT) Full text and rfc822 format available.

Forcibly Merged 14309 14310 14311 14312 14313 14314 14315 14316. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 29 Apr 2013 21:14:01 GMT) Full text and rfc822 format available.

Forcibly Merged 14309 14310 14311 14312 14313 14314 14315 14316. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 29 Apr 2013 21:14:02 GMT) Full text and rfc822 format available.

Forcibly Merged 14309 14310 14311 14312 14313 14314 14315 14316. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 29 Apr 2013 21:14:02 GMT) Full text and rfc822 format available.

Forcibly Merged 14309 14310 14311 14312 14313 14314 14315 14316. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 29 Apr 2013 21:14:02 GMT) Full text and rfc822 format available.

Forcibly Merged 14309 14310 14311 14312 14313 14314 14315 14316. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 29 Apr 2013 21:14:02 GMT) Full text and rfc822 format available.

Forcibly Merged 14309 14310 14311 14312 14313 14314 14315 14316. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 29 Apr 2013 21:14:02 GMT) Full text and rfc822 format available.

Forcibly Merged 14309 14310 14311 14312 14313 14314 14315 14316. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 29 Apr 2013 21:14:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#14312; Package automake. (Mon, 29 Apr 2013 21:19:03 GMT) Full text and rfc822 format available.

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

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Subject: Spurious bug report, ignore
Date: Mon, 29 Apr 2013 23:17:39 +0200
Oops, erroneously created while dealing with bug#12254.  Please ignore,
and sorry for the noise,

  Stefano




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 30 May 2013 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 24 days ago.

Previous Next


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