List Info

Thread: Re: filetests sometimes do not set _




Re: filetests sometimes do not set _
user name
2007-10-18 14:46:50
>>>>> On Thu, 18 Oct 2007 16:07:18 +0100,
Nicholas Clark <nickccl4.org> said:

  > On Thu, Oct 18, 2007 at 05:29:36AM +0200, Andreas J.
Koenig wrote:
 >> >>>>> On Wed, 17 Oct 2007 11:02:18
+0200, Mark Overmeer <markovermeer.net> said:
 >> 
 >> > The code which now fails was ran by
cpan-testers on many many
 >> > systems, without problems in 5.6 and 5.8, but
fails on all 5.10/5.9.5
 >> 
 >> > According to the cpantesters results
 >> > (http:/
/cpantesters.perl.org/show/Mail-Box.html), it looks like
something
 >> > broke between 5.9.2 and 5.9.5.
 >> 
 >> Binary search reveals the test fails since 25986
 >> 
 >> Change 25986 by nicholasnicholas-saigo on
2005/11/04 13:02:42
 >> 
 >> ftrwrite, ftrexec, fteread, ftewrite and fteexec
can all be merged
 >> with Perl_pp_ftrread().

  > Mmm, I'm not sure about this. The script starts
failing for me on 5.8.1

  > $ cat 46463 
  > #!/usr/local/bin/perl5.10.0
  > use filetest 'access';

  > -d '/etc';
  > -w '/etc/passwd';
  > warn -f _ ? "filen" :
"directoryn";
  > warn -d _ ? "directoryn" :
"filen";

Ahh, this is a different bug then. Mark told us that he
could not
reproduce it in a small test case. What I tested was the
test suite of
Mail::Box. My binary search appears solid to me. Both perls
were
compiled yesterday and all parameters were equal.

----Program----
eval q{use Mail::Box 2.075};
print $ ? "N/A" : "OK";
print "n";

----Output of .../plC1Mru/perl-5.8.025985/bin/perl----
OK

----EOF ($?='0')----
----Output of .../pGlFMnW/perl-5.8.025986/bin/perl----
N/A

----EOF ($?='0')----

The N/A comes from the fact that the test suite failed.

Whereas your program says "directory" on both
2598[56].

A binary search for your program leads us to the interval
between
19367 and 19449. I'm running the binary search for this one
over night...

-- 
andreas

Re: filetests sometimes do not set _
user name
2007-10-18 17:08:41
* Andreas J. Koenig (andreas.koenig.7os6VVqRfranz.ak.mind.de) [071018 19:46]:
>   > $ cat 46463 
>   > #!/usr/local/bin/perl5.10.0
>   > use filetest 'access';
> 
>   > -d '/etc';
>   > -w '/etc/passwd';
>   > warn -f _ ? "filen" :
"directoryn";
>   > warn -d _ ? "directoryn" :
"filen";
> 
> Ahh, this is a different bug then. Mark told us that he
could not
> reproduce it in a small test case. What I tested was
the test suite of
> Mail::Box.

You may be very right.  This script does shows the same
problem and
solution, but I suspect that some other reason hid the bug
for a long
time.

Remove the 'use filetest', or use f.i. -s i.s.o -w does
solve the
problems in my program and in this example.

In the program the situation is far more complex: the '-d'
is run
in some other method.   There must something what was hiding
the
bug.

I have tried and tried, but no luck on a small example which
does
work on 5.8.7 and not on 5.10.0... only my Mail::Box test. 
For the
people who want to have a look at it:

  unpack Mail::Box-*gz
  cd Mail-Box-*
  perl5.8.7  ./test.pl -v 40mbox/50   --> success
  perl5.10.0 ./test.pl -v 40mbox/50   --> failure

tests 3 and 4 fail.  They call
Mail::Box::Mbox::listSubFolders().
The problem appears in "-f _", line 146 of
lib/Mail/Box/Mbox.pm

My hopes are that a fix for above bug will fix the second.
-- 
Thanks for investigating,

               MarkOv

------------------------------------------------------------
------------
       Mark Overmeer MSc                               
MARKOV Solutions
       MarkOvermeer.net                          solutionsovermeer.net
http://Mark.Overmeer.net
                  http://solutions.overme
er.net


Re: filetests sometimes do not set _
user name
2007-10-18 19:20:26
>>>>> On Thu, 18 Oct 2007 21:46:50 +0200,
andreas.koenig.7os6VVqRfranz.ak.mind.de (Andreas J. Koenig)
said:

  > A binary search for your program leads us to the
interval between
  > 19367 and 19449. I'm running the binary search for
this one over night...

---Program----
use filetest 'access';

-d '/etc';
-w '/etc/passwd';
warn -f _ ? "filen" : "directoryn";
warn -d _ ? "directoryn" : "filen";

----Output of .../pwzF3Lg/perl-5.8.019391/bin/perl----
file
file

----EOF ($?='0')----
----Output of .../p3rjkvF/perl-5.8.019392/bin/perl----
directory
directory

----EOF ($?='0')----

    Change 19392 by jhikosh on 2003/05/03 05:33:04

        Salvage 'use filetest "access"' from
compiletime to runtime.



-- 
andreas

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )