octave-maintainers
[Top][All Lists]
Advanced

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

Re: test failure (HAVE_GETPWUID) on MacOS X


From: Ben Abbott
Subject: Re: test failure (HAVE_GETPWUID) on MacOS X
Date: Tue, 5 Jan 2010 09:02:36 -0500

On Jan 5, 2010, at 1:39 AM, John W. Eaton wrote:

> On 31-Dec-2009, Ben Abbott wrote:
> 
> | I've posted this before, but as there has been no reply, I'm trying again 
> ... with a more specific subject this time.
> | 
> |     
> http://old.nabble.com/2-test-failures-on-Mac-OS-10.6-tc26892662.html#a26892662
> | 
> | The test below fails during "make check".
> | 
> | 349 >>>>> processing test_system
> | 350   ***** testif HAVE_GETPWUID
> | 351  x = getpwuid (getuid ());
> | 352  assert((strcmp (x.dir, tilde_expand ("~"))
> | 353  && strcmp (x.dir, tilde_expand (sprintf ("~%s", x.name)))
> | 354  && strcmp ("foobar", tilde_expand ("foobar"))));
> | 355 !!!!! test failed
> | 356 assert ((strcmp (x.dir, tilde_expand ("~")) && strcmp (x.dir, 
> tilde_expand (sprintf ("~%s", x.name))) && strcmp ("foobar", tilde_expand 
> ("foobar")))) failed
> | 357 >>>>> processing test_transpose
> | 358 >>>>> processing test_try
> | 359 >>>>> processing test_unwind
> | 360 >>>>> processing test_while
> | 361 
> | 362 Files with no tests:
> | 
> | However, the "assert" passes when I try it on the command line.
> | 
> | octave:14> (strcmp (x.dir, tilde_expand ("~")) && strcmp (x.dir, 
> tilde_expand (sprintf ("~%s", x.name))) && strcmp ("foobar", tilde_expand 
> ("foobar")))
> | ans =  1
> 
> I can't duplicate this problem.  To debug what is happening, I'd start
> by looking at the individual components of the expression when the
> test is run by make check.  Try inserting something like the
> following into the test:
> 
>  x = getpwuid (getuid ());
>  fid = fopen ("foo", "w");
>  fdisp (fid, x);
>  fdisp (fid, tilde_expand ("~"));
>  fdisp (fid, sprintf ("~%s", x.name));
>  fdisp (fid, tilde_expand (sprintf ("~%s", x.name)));
>  fdisp (fid, tilde_expand ("foobar"));
>  fclose (fid);
> 
> and then see if the file gives you any clues about why the
> comparisons are failing.
> 
> jwe

After haunting me for a few weeks, this one disappeared with the new year.

When/if it returns I'll try what you suggest.

Ben






reply via email to

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