List Info

Thread: t/op/magic.t failures under Cygwin




t/op/magic.t failures under Cygwin
user name
2007-09-04 14:31:49
I am experiencing failures with t/op/magic.t when build
blead under Cygwin on Windows.

I mount my 'build' drive using:

    mount -f "C:/" /c

This allow me to use use paths such as /c/foo instead of
/cygdrive/c/foo.

When I run 'make test', t/op/magic.t fails with:

t/op/magic..................................................
..FAILED at test 26

The output from
    ./perl.exe -I`pwd`/../lib harness -v -torture
2>&1" show
produces:

op/magic....................................................
.....1..58
ok 1
    [SNIP]
ok 25
not ok 26
# Failed test at line 258
#  :$^X is /c/perl_tmp/31788/perl-current/perl, $0 is
/cygdrive/c/perl_tmp/31788/perl-current/show-shebang
:!=:$^X is /cygdrive/c/perl_tmp/31788/perl-current/perl, $0
is
/cygdrive/c/perl_tmp/31788/perl-current/show-shebang
:
not ok 27
# Failed test at line 263
#  :$^X is /c/perl_tmp/31788/perl-current/perl, $0 is
/cygdrive/c/perl_tmp/31788/perl-current/show-shebang
:!=:$^X is /cygdrive/c/perl_tmp/31788/perl-current/perl, $0
is
/cygdrive/c/perl_tmp/31788/perl-current/show-shebang
: after `/cygdrive/c/perl_tmp/31788/perl-current/perl
/cygdrive/c/perl_tmp/31788/perl-current/show-shebang`
ok 28
    [SNIP]
ok 58
FAILED tests 26-27
	Failed 2/58 tests, 96.55% okay

However, when I run it from the command line, it suceeds:

> perl -Ilib t/op/magic.t
1..58
ok 1
    [SNIP]
ok 25
ok 26
ok 27
ok 28
    [SNIP]

Does this require a change to t/op/magic.t or a fix
elsewhere?

Re: t/op/magic.t failures under Cygwin
user name
2007-09-05 00:32:07
Jerry D. Hedden sent two issues with:
>     mount -f "C:/" /c
 > #  :$^X is /c/perl_tmp/31788/perl-current/perl, $0 is
 > /cygdrive/c/perl_tmp/31788/perl-current/show-shebang
...
> Does this require a change to t/op/magic.t or a fix
elsewhere?

This can be easily fixed in the two test files.
But I wonder if we need a unique path resolution in CORE for
$^X or $0
in such corner cases. This is a potential security problem.
Maybe just a cygpath->windows->realpath->cygpath
round.

How is that solved in unices?
I only know man 2 path_resolution and realpath().
-- 
Reini Urban
http://phpwiki.org/  http://murbreak.at/
http://helsinki.at/  http://spacemovie.mur.at/

[1-2]

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