From: Matt Kraai Date: Tue, 27 Nov 2007 11:00:19 +0000 (-0800) Subject: Re: fpathconf test failures on QNX X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9487c2fc1a7c5851aa2ef68b55b8b1db0cffa826;p=p5sagit%2Fp5-mst-13.2.git Re: fpathconf test failures on QNX Message-ID: <20071127190019.GA6319@ftbfs.org> p4raw-id: //depot/perl@32524 --- diff --git a/ext/POSIX/t/sysconf.t b/ext/POSIX/t/sysconf.t index d908d2d..a1326a1 100644 --- a/ext/POSIX/t/sysconf.t +++ b/ext/POSIX/t/sysconf.t @@ -53,18 +53,24 @@ $curdir = VMS::Filespec::fileify($curdir) if $^O eq 'VMS'; my $r; +my $TTY = "/dev/tty"; + sub _check_and_report { my ($eval_status, $return_val, $description) = @_; my $success = defined($return_val) || $! == 0; is( $eval_status, '', $description ); - ok( $success, "\tchecking that the returned value is defined (" - . (defined($return_val) ? "yes, it's $return_val)" : "it isn't)" - . " or that errno is clear (" - . (!($!+0) ? "it is)" : "it isn't, it's $!)")) - ); + SKIP: { + skip "terminal constants set errno on QNX", 1 + if $^O eq 'nto' and $description =~ $TTY; + ok( $success, "\tchecking that the returned value is defined (" + . (defined($return_val) ? "yes, it's $return_val)" : "it isn't)" + . " or that errno is clear (" + . (!($!+0) ? "it is)" : "it isn't, it's $!)")) + ); + } SKIP: { skip "constant not implemented on $^O or no limit in effect", 1 - if $success && !defined($return_val); + if !defined($return_val); ok( looks_like_number($return_val), "\tchecking that the returned value looks like a number" ); } } @@ -91,8 +97,6 @@ for my $constant (@path_consts) { } SKIP: { - my $TTY = "/dev/tty"; - my $n = 2 * 3 * @path_consts_terminal; -c $TTY