GNU bug report logs - #14528
remake-configure-dependencies test fails on fast systems without subsecond timestamps

Previous Next

Package: automake;

Reported by: Colin Watson <cjwatson <at> ubuntu.com>

Date: Sat, 1 Jun 2013 11:23:01 UTC

Severity: minor

Tags: patch

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 14528 in the body.
You can then email your comments to 14528 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#14528; Package automake. (Sat, 01 Jun 2013 11:23:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Colin Watson <cjwatson <at> ubuntu.com>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Sat, 01 Jun 2013 11:23:02 GMT) Full text and rfc822 format available.

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

From: Colin Watson <cjwatson <at> ubuntu.com>
To: bug-automake <at> gnu.org
Subject: remake-configure-dependencies test fails on fast systems without
	subsecond timestamps
Date: Sat, 1 Jun 2013 12:20:03 +0100
Automake 1.13.2 failed t/remake-configure-dependencies.sh in two
consecutive attempts on Ubuntu autobuilders.  On inspection I found that
our autobuilder network happened to pick the same backend machine each
time, which was a relatively old one still using ext3.  (Our newer
builders use ext4.)  On running this test in a loop-mounted ext3
filesystem on my laptop, I reproduced the failure first time:

  Running from installcheck: no
  Test Protocol: none
  PATH = /home/cjwatson/src/ubuntu/automake1.13/tmp/t/automake1.13-1.13.2/t/wrap:/home/cjwatson/src/ubuntu/automake1.13/tmp/t/automake1.13-1.13.2/t/ax:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  ++ pwd
  /home/cjwatson/src/ubuntu/automake1.13/tmp/t/automake1.13-1.13.2/t/remake-configure-dependencies.dir
  + cat
  + cat
  + cat
  + echo '#!/bin/sh'
  + echo 'printf %s 1.0'
  + chmod a+x print-version
  + aclocal-1.13 -Werror
  + autoconf
  + automake-1.13 --foreign -Werror -Wall
  + ./configure
  checking for a BSD-compatible install... /usr/bin/install -c
  checking whether build environment is sane... yes
  checking for a thread-safe mkdir -p... /bin/mkdir -p
  checking for gawk... no
  checking for mawk... mawk
  checking whether make sets $(MAKE)... yes
  checking whether make supports nested variables... yes
  checking that generated files are newer than configure... done
  configure: creating ./config.status
  config.status: creating Makefile
  + make test-1
  test 1.0 = 1.0
  + echo '#!/bin/sh'
  + echo 'printf %s 2.1'
  + using_gmake
  + case $am__using_gmake in
  + make --version -v
  + grep GNU
  GNU Make 3.81
  + am__using_gmake=yes
  + return 0
  + make test-2
   cd . && /bin/bash /home/cjwatson/src/ubuntu/automake1.13/tmp/t/automake1.13-1.13.2/t/remake-configure-dependencies.dir/missing automake-1.13 --foreign
  CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/cjwatson/src/ubuntu/automake1.13/tmp/t/automake1.13-1.13.2/t/remake-configure-dependencies.dir/missing autoconf
  test 1.0 = 2.1
  make: *** [test-2] Error 1
  + am_exit_trap 2
  + exit_status=2
  + set +e
  + cd /home/cjwatson/src/ubuntu/automake1.13/tmp/t/automake1.13-1.13.2
  + test none = tap
  + case $am_explicit_skips in
  + test 2 -eq 0
  + keep_testdirs=yes
  + am_keeping_testdirs
  + case $keep_testdirs in
  + return 0
  + set +x
  remake-configure-dependencies: exit 2

I think perhaps a sprinkling of $sleep is called for in this test?

Thanks,

-- 
Colin Watson                                       [cjwatson <at> ubuntu.com]




Information forwarded to bug-automake <at> gnu.org:
bug#14528; Package automake. (Mon, 03 Jun 2013 09:32:01 GMT) Full text and rfc822 format available.

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

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Colin Watson <cjwatson <at> ubuntu.com>
Cc: 14528 <at> debbugs.gnu.org
Subject: Re: bug#14528: remake-configure-dependencies test fails on fast
	systems without subsecond timestamps
Date: Mon, 03 Jun 2013 11:29:08 +0200
tags 14528 + patch
severity 14528 minor.
stop

Hi Colin, thanks for the report

On 06/01/2013 01:20 PM, Colin Watson wrote:
> Automake 1.13.2 failed t/remake-configure-dependencies.sh in two
> consecutive attempts on Ubuntu autobuilders.  On inspection I found that
> our autobuilder network happened to pick the same backend machine each
> time, which was a relatively old one still using ext3.  (Our newer
> builders use ext4.)  On running this test in a loop-mounted ext3
> filesystem on my laptop, I reproduced the failure first time:
> 
>   Running from installcheck: no
>   Test Protocol: none
>   PATH = /home/cjwatson/src/ubuntu/automake1.13/tmp/t/automake1.13-1.13.2/t/wrap:/home/cjwatson/src/ubuntu/automake1.13/tmp/t/automake1.13-1.13.2/t/ax:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
>   ++ pwd
>   /home/cjwatson/src/ubuntu/automake1.13/tmp/t/automake1.13-1.13.2/t/remake-configure-dependencies.dir
>   + cat
>   + cat
>   + cat
>   + echo '#!/bin/sh'
>   + echo 'printf %s 1.0'
>   + chmod a+x print-version
>   + aclocal-1.13 -Werror
>   + autoconf
>   + automake-1.13 --foreign -Werror -Wall
>   + ./configure
>   checking for a BSD-compatible install... /usr/bin/install -c
>   checking whether build environment is sane... yes
>   checking for a thread-safe mkdir -p... /bin/mkdir -p
>   checking for gawk... no
>   checking for mawk... mawk
>   checking whether make sets $(MAKE)... yes
>   checking whether make supports nested variables... yes
>   checking that generated files are newer than configure... done
>   configure: creating ./config.status
>   config.status: creating Makefile
>   + make test-1
>   test 1.0 = 1.0
>   + echo '#!/bin/sh'
>   + echo 'printf %s 2.1'
>   + using_gmake
>   + case $am__using_gmake in
>   + make --version -v
>   + grep GNU
>   GNU Make 3.81
>   + am__using_gmake=yes
>   + return 0
>   + make test-2
>    cd . && /bin/bash /home/cjwatson/src/ubuntu/automake1.13/tmp/t/automake1.13-1.13.2/t/remake-configure-dependencies.dir/missing automake-1.13 --foreign
>   CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/cjwatson/src/ubuntu/automake1.13/tmp/t/automake1.13-1.13.2/t/remake-configure-dependencies.dir/missing autoconf
>   test 1.0 = 2.1
>   make: *** [test-2] Error 1
>   + am_exit_trap 2
>   + exit_status=2
>   + set +e
>   + cd /home/cjwatson/src/ubuntu/automake1.13/tmp/t/automake1.13-1.13.2
>   + test none = tap
>   + case $am_explicit_skips in
>   + test 2 -eq 0
>   + keep_testdirs=yes
>   + am_keeping_testdirs
>   + case $keep_testdirs in
>   + return 0
>   + set +x
>   remake-configure-dependencies: exit 2
> 
> I think perhaps a sprinkling of $sleep is called for in this test?
>
You are perfectly right.  I thought the sleeps implicit in configure
invocations were enough to avoid this kind of issues, but after a more
careful consideration I realized I was mistaken (see commit message in
the patch below for an extended rationale).

Can you confirm the patch works for you?

Thanks,
  Stefano

---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ---- 8< ----

From b4eefc79759fcb2c5941a65759d242488af8ed1a Mon Sep 17 00:00:00 2001
Message-Id: <b4eefc79759fcb2c5941a65759d242488af8ed1a.1370251672.git.stefano.lattarini <at> gmail.com>
From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Date: Mon, 3 Jun 2013 11:27:49 +0200
Subject: [PATCH] tests: fix spurious failure due to missing sleeps

Fixes automake bug#14528.

* THANKS: Give credit to that bug's original reporter.

* t/remake-configure-dependencies.sh: Add few missing '$sleep'
invocations.  I thought that the sleeps implicit in the configure
invocation were enough, but they were not, actually.  Here is what
can happen:

  1. The config.status script is generated by a configure run.
  2. ./config.status and make are run.
  3. The 'print-version' script is modified.
  4. Since that script is listed in $(CONFIGURE_DEPENDENCIES),
     autoconf is re-run.
  5. On a fast-enough machine, the three steps 2-4 above, even
     combined, might have taken less than a second to run;
  6. If the filesystem doesn't have a sub-second timestamp
     resolution, that means the newly-generated configure has
     the same timestamp of the old config.status;
  7. So, config.status is not re-run, and the Makefiles are
     not updated.
  8. Spurious failure!

So we really need more explicit sleeps.

Signed-off-by: Stefano Lattarini <stefano.lattarini <at> gmail.com>
---
 THANKS                             | 1 +
 t/remake-configure-dependencies.sh | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/THANKS b/THANKS
index dbcb1ab..c5c7c49 100644
--- a/THANKS
+++ b/THANKS
@@ -67,6 +67,7 @@ Christian Cornelssen            ccorn <at> cs.tu-berlin.de
 Christina Gratorp               christina.gratorp <at> gmail.com
 Claudio Fontana                 sick_soul <at> yahoo.it
 Clifford Wolf                   clifford <at> clifford.at
+Colin Watson                    cjwatson <at> ubuntu.com
 Dagobert Michelsen              dam <at> opencsw.org
 Daiki Ueno                      ueno <at> unixuser.org
 Dalibor Topic                   robilad <at> kaffe.org
diff --git a/t/remake-configure-dependencies.sh b/t/remake-configure-dependencies.sh
index 2e5df88..d81d881 100644
--- a/t/remake-configure-dependencies.sh
+++ b/t/remake-configure-dependencies.sh
@@ -61,6 +61,7 @@ $AUTOMAKE
 ./configure
 $MAKE test-1

+$sleep
 (echo '#!/bin/sh' && echo 'printf %s 2.1') > print-version
 using_gmake || $MAKE Makefile
 $MAKE test-2
@@ -70,6 +71,8 @@ mkdir build
 cd build
 ../configure
 $MAKE test-2
+
+$sleep
 (echo '#!/bin/sh' && echo 'printf %s 3.14') > ../print-version
 using_gmake || $MAKE Makefile
 $MAKE test-3
-- 
1.8.3.rc3.8.g5e49f30





Added tag(s) patch. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 03 Jun 2013 09:32:02 GMT) Full text and rfc822 format available.

Severity set to 'minor' from 'normal' Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 03 Jun 2013 10:01:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#14528; Package automake. (Mon, 03 Jun 2013 10:50:02 GMT) Full text and rfc822 format available.

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

From: Colin Watson <cjwatson <at> ubuntu.com>
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Cc: 14528 <at> debbugs.gnu.org
Subject: Re: bug#14528: remake-configure-dependencies test fails on fast
	systems without subsecond timestamps
Date: Mon, 3 Jun 2013 11:47:56 +0100
On Mon, Jun 03, 2013 at 11:29:08AM +0200, Stefano Lattarini wrote:
> You are perfectly right.  I thought the sleeps implicit in configure
> invocations were enough to avoid this kind of issues, but after a more
> careful consideration I realized I was mistaken (see commit message in
> the patch below for an extended rationale).
> 
> Can you confirm the patch works for you?

Before this patch, I got 32 passes from 100 runs; after this patch, I
get 100 passes from 100 runs.  So it looks good to me.

Thanks,

-- 
Colin Watson                                       [cjwatson <at> ubuntu.com]




Reply sent to Stefano Lattarini <stefano.lattarini <at> gmail.com>:
You have taken responsibility. (Mon, 03 Jun 2013 13:20:02 GMT) Full text and rfc822 format available.

Notification sent to Colin Watson <cjwatson <at> ubuntu.com>:
bug acknowledged by developer. (Mon, 03 Jun 2013 13:20:02 GMT) Full text and rfc822 format available.

Message #20 received at 14528-done <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Colin Watson <cjwatson <at> ubuntu.com>
Cc: 14528-done <at> debbugs.gnu.org
Subject: Re: bug#14528: remake-configure-dependencies test fails on fast
	systems without subsecond timestamps
Date: Mon, 03 Jun 2013 15:17:01 +0200
On 06/03/2013 12:47 PM, Colin Watson wrote:
> On Mon, Jun 03, 2013 at 11:29:08AM +0200, Stefano Lattarini wrote:
>> You are perfectly right.  I thought the sleeps implicit in configure
>> invocations were enough to avoid this kind of issues, but after a more
>> careful consideration I realized I was mistaken (see commit message in
>> the patch below for an extended rationale).
>>
>> Can you confirm the patch works for you?
> 
> Before this patch, I got 32 passes from 100 runs; after this patch, I
> get 100 passes from 100 runs.  So it looks good to me.
> 
Thanks for confirming.  I'm closing the bug report then, and I'll push
the fix shortly (so that it will appear in Automake 1.13.3, that should
be released this evening or tomorrow).

Regards,
  Stefano





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

This bug report was last modified 11 years and 356 days ago.

Previous Next


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