bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: parallel-tests


From: Ralf Wildenhues
Subject: Re: parallel-tests
Date: Tue, 17 Mar 2009 22:36:41 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hi Jim,

* Jim Meyering wrote on Tue, Mar 17, 2009 at 02:40:59PM CET:
> Ralf Wildenhues wrote:
> > this patch enables the use of Automake's parallel-tests instead of using
> > check.mk (use the 'next' branch of git Automake).  With it, coreutils
> >   make -jN check
> >
> > still passes, but distcheck fails, for reasons not yet apparent to me.

> I tried that patch, reproduced the failure, and tracked it down
> to what must be a change in how the internal (to 'make check's
> Makefile code) $tst variable is set.  Before CuTmpdir would get
> a directory based on builddir, but the new $tst is in $srcdir,
> and part of "make distcheck"s job is to ensure that nothing modifies
> srcdir, so it makes the whole tree read-only.  Then, CuTmpdir's
> attempt to create a temporary directory for "make check" would fail.
> 
> If I make the following change, to use "$f" instead (also undocumented),
> "make distcheck" passes once again:

Yes, while I don't like much that you need to use these variables, I
also don't like to change them gratuitously, but this change was a
necessary measure in order to get VPATH handling working with different
make implementations.  Solaris make will VPATH-rewrite the test
prerequisite, the test driver fixes that now.  The rewrite fixing code
is in automake/lib/am/inst-vars.am and used in several places in the
automake code snippets, so its variable naming scheme, while not all
that cool, is more or less fixed.

Thanks for analyzing and fixing this!

BTW, I've had a patch in my tree for a while that I think fixes a latent
bug in the coreutils test scripts.  Probably not really needed, but here
it is for reference.  I might have sent it to you before, I don't
remember.  Without the patch, the else branch may reference an undefined
$dir variable.

Cheers,
Ralf

    avoid use of undefined variable in warning
    
    * tests/CuTmpdir.pm (chmod_tree): Do not warn if $dir is
    undefined.

diff --git a/tests/CuTmpdir.pm b/tests/CuTmpdir.pm
index 166e50b..e172bd4 100644
--- a/tests/CuTmpdir.pm
+++ b/tests/CuTmpdir.pm
@@ -45,15 +45,18 @@ sub chmod_1
 
 sub chmod_tree
 {
-  if (defined $dir && chdir $dir)
+  if (defined $dir)
     {
-      # Perform the equivalent of find . -type d -print0|xargs -0 chmod -R 700.
-      my $options = {untaint => 1, wanted => \&chmod_1};
-      find ($options, '.');
-    }
-  else
-    {
-      warn "$ME: failed to chdir to $dir: $!\n";
+      if (chdir $dir)
+       {
+         # Perform the equivalent of find . -type d -print0|xargs -0 chmod -R 
700.
+         my $options = {untaint => 1, wanted => \&chmod_1};
+         find ($options, '.');
+       }
+      else
+       {
+         warn "$ME: failed to chdir to $dir: $!\n";
+       }
     }
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]