develooper Front page | perl.perl5.porters | Postings from January 2018

Re: [perl #132648] Cwd: different return values between pure perland XS variants

Thread Previous | Thread Next
January 15, 2018 23:28
Re: [perl #132648] Cwd: different return values between pure perland XS variants
Message ID:
Tony Cook wrote:
>#   Failed test 'regular getcwd result on non-existent directory'
>#   at t/cwd_enoent.t line 30.
>#          got: '/tmp/4WuHD3C4IY/testdir'
>#     expected: undef

For getcwd() to yield a non-error return for a non-existent directory
seems like a bug.  Cygwin seems to prefer _backtick_pwd() as its
implementation of getcwd(), so maybe this is a bug in Cygwin's pwd(1).
Would someone on Cygwin please check, firstly, whether pwd(1) actually
exhibits this behaviour for a removed directory, and secondly, whether
the removed directory can actually be addressed by this name.  (If it
can be addressed by name, that would seem to be a bug in rmdir().)

>.: No such file or directory at t/cwd_enoent.t line 33.
># Looks like your test exited with 2 just after 2.

This is another problem.  That's abs_path() dying, which it shouldn't:
it's documented to return errors as undef+$!.  Cygwin actually uses
fast_abs_path() as its abs_path(), and fast_abs_path() is coded to die
rather than yield undef+$!, so that's a clear bug in fast_abs_path().


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About