bug-m4
[Top][All Lists]
Advanced

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

Re: debugging M4 on AIX 5.3


From: Ralf Wildenhues
Subject: Re: debugging M4 on AIX 5.3
Date: Wed, 25 Aug 2010 21:03:13 +0200
User-agent: Mutt/1.5.20 (2010-04-22)

* Eric Blake wrote on Mon, Aug 23, 2010 at 04:04:54PM CEST:
> On 08/21/2010 02:42 AM, Ralf Wildenhues wrote:
> >- 2 gnulib test failures in M4: test-strtod, test-rmdir.
> >
> >I inserted one fprintf in test-strtod.c, for the "0xp" input asserting
> >over 'ptr == input + 1':
> 
> The strtod problem should already be fixed in gnulib; it's just that
> I haven't (yet) pushed the m4 patch that updates the gnulib
> submodule to the appropriate commit where it was fixed in gnulib.

I can confirm that after checkout out current gnulib git in the
submodule and an 'gnulib-tool --update' in M4, a fresh build does not
have the test-strtod failure any more.

> >Any hints as to what could make the tests fail when run as part of the M4
> >git tree and not otherwise?
> 
> Hmm, nothing obvious to me at the moment.  Is there an strace-like
> functionality, where we could see the actual syscalls being made
> during test-rmdir?  Unless this is another case of using an
> out-of-date gnulib submodule.

This is the output from 'truss ./test-rmdir':
[...]
rmdir("test-rmdir.tdir/file/")                  Err#20 ENOTDIR
rmdir("test-rmdir.tdir")                        Err#17 EEXIST
rmdir("test-rmdir.tdir/file")                   Err#20 ENOTDIR
unlink("test-rmdir.tdir/file")                  = 0
rmdir("test-rmdir.tdir/.//")                    Err#17 EEXIST
[...]

If I read Posix correctly, then EEXIST is not allowed for this
condition; not sure whether gnulib should work around this though.
Anyway the patch below lets the test pass.  Is it acceptable for gnulib?

And apologies for this false cue:

> >- 'gnulib-tool --with-tests --test strtod rmdir' passes on this system.

that happened because I took that from a gnulib tree with the fix below
in it, done months ago but then forgotten about it.  :-/

I've confirmed that the fix is needed for test-unlinkat as well.

Thanks,
Ralf

    Fix test-unlinkat, test-rmdir failure on AIX 5.3.
    
    * tests/test-rmdir.h: Also accept EEXIST for
    rmdir ("dir/.//"), unlinkat.

diff --git a/tests/test-rmdir.h b/tests/test-rmdir.h
index 6d5d56e..e9e625f 100644
--- a/tests/test-rmdir.h
+++ b/tests/test-rmdir.h
@@ -66,7 +66,7 @@ test_rmdir_func (int (*func) (char const *name), bool print)
   ASSERT (unlink (BASE "dir/file") == 0);
   errno = 0;
   ASSERT (func (BASE "dir/.//") == -1);
-  ASSERT (errno == EINVAL || errno == EBUSY);
+  ASSERT (errno == EINVAL || errno == EBUSY || errno == EEXIST);
   ASSERT (func (BASE "dir") == 0);
 
   /* Test symlink behavior.  Specifying trailing slash should remove




reply via email to

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