summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.beos31
-rw-r--r--ext/Storable/t/integer.t45
-rw-r--r--lib/ExtUtils/t/basic.t6
-rw-r--r--perlio.c8
-rw-r--r--pod/perlapio.pod3
-rw-r--r--pod/perldelta.pod26
6 files changed, 93 insertions, 26 deletions
diff --git a/README.beos b/README.beos
index b931add73d..de7bfaa3d0 100644
--- a/README.beos
+++ b/README.beos
@@ -57,21 +57,30 @@ please email me.
Tom Spindler
dogcow@isi.net
-=head2 Update 2002-03-02
+=head2 Update 2002-05-25
-The following tests fail on pre-5.8.0 Perl in BeOS Personal 5.0:
+The following tests fail on 5.8.0 Perl in BeOS Personal 5.03:
- op/magic 24-26
- ext/POSIX/t/sigaction 13
- ext/POSIX/t/waitpid 1
- lib/ExtUtils/t/Installed 9-10 25-27 29-30 33-36
+ t/op/lfs............................FAILED at test 17
+ t/op/magic..........................FAILED at test 24
+ ext/Fcntl/t/syslfs..................FAILED at test 17
+ ext/File/Glob/t/basic...............FAILED at test 3
+ ext/POSIX/t/sigaction...............FAILED at test 13
+ ext/POSIX/t/waitpid.................FAILED at test 1
+ lib/Tie/File/t/16_handle............FAILED at test 39
-None of the failures look too serious:
+The reasons for the failures are as follows:
=over 4
=item *
+The op/lfs and Fcntl/t/syslfs seem to hit a real bug: though we can
+seek around past the 2GB limit, reading from there doesn't work.
+Therefore, please don't try doing large files in BeOS with Perl.
+
+=item *
+
The op/magic failures look like something funny going on with $0 and
$^X that I can't now figure out: none of the generated pathnames are
wrong as such, they just seem to accumulate "./" prefixes and infixes
@@ -79,6 +88,11 @@ in ways that define logic.
=item *
+The Glob/t/basic indicates a bug in the getpw*() functions of Perl:
+they do not always return the correct user db entries.
+
+=item *
+
The sigaction #13 means that signal mask doesn't get properly restored
if sigaction returns early.
@@ -90,7 +104,8 @@ errno to ECHILD). In BeOS, it doesn't seem to.
=item *
-The Installed test has some filesystem portability assumptions.
+The Tie/File/t/16_handle seems to indicate some brokenness
+(non-UNIXness) in how BeOS handles pipes.
=back
diff --git a/ext/Storable/t/integer.t b/ext/Storable/t/integer.t
index de33647dec..1230b8f25b 100644
--- a/ext/Storable/t/integer.t
+++ b/ext/Storable/t/integer.t
@@ -55,7 +55,7 @@ my @processes = (["dclone", \&do_clone],
);
my @numbers =
(# IV bounds of 8 bits
- -1, 0, 1, -127, -128, -129, 42, 126, 127, 128, 129, 254, 255, 256, 256,
+ -1, 0, 1, -127, -128, -129, 42, 126, 127, 128, 129, 254, 255, 256, 257,
# IV bounds of 32 bits
-2147483647, -2147483648, -2147483649, 2147483646, 2147483647, 2147483648,
# IV bounds
@@ -67,7 +67,7 @@ my @numbers =
$max_iv_p1, $max_uv_m1, $max_uv, $lots_of_9C,
);
-plan tests => @processes * @numbers * 4;
+plan tests => @processes * @numbers * 5;
my $file = "integer.$$";
die "Temporary file '$file' already exists" if -e $file;
@@ -125,17 +125,48 @@ foreach (@processes) {
# conversion macros affecting later runs, so pass a copy to Storable:
my $copy1 = my $copy0 = $number;
my $copy_s = &$sub (\$copy0);
- # use Devel::Peek; Dump $copy0;
if (is (ref $copy_s, "SCALAR", "got back a scalar ref?")) {
# Test inside use integer to see if the bit pattern is identical
# and outside to see if the sign is right.
# On 5.8 we don't need this trickery anymore.
- my $eq = do {use integer; $$copy_s == $copy1} && $$copy_s == $copy1;
- ok ($eq, "$process $copy1") or
- printf "# Passed in $copy1, got back %s\n",
- defined $$copy_s ? $$copy_s : undef;
+ # We really do need 2 copies here, as conversion may have side effect
+ # bugs. In particular, I know that this happens:
+ # perl5.00503 -le '$a = "-2147483649"; $a & 0; print $a; print $a+1'
+ # -2147483649
+ # 2147483648
+
+ my $copy_s1 = my $copy_s2 = $$copy_s;
+ # On 5.8 can do this with a straight ==, due to the integer/float maths
+ # on 5.6 can't do this with
+ # my $eq = do {use integer; $copy_s1 == $copy1} && $copy_s1 == $copy1;
+ # because on builds with IV as long long it tickles bugs.
+ # (Uncomment it and the Devel::Peek line below to see the messed up
+ # state of the scalar, with PV showing the correct string for the
+ # number, and IV holding a bogus value which has been truncated to 32 bits
+
+ # So, check the bit patterns are identical, and check that the sign is the
+ # same. This works on all the versions in all the sizes.
+ # $eq = && (($copy_s1 <=> 0) == ($copy1 <=> 0));
+ # Split this into 2 tests, to cater for 5.005_03
+
+ my $bit = ok (($copy_s1 ^ $copy1 == 0), "$process $copy1 (bitpattern)");
+ # This is sick. 5.005_03 survives without the IV/UV flag, and somehow
+ # gets it right, providing you don't have side effects of conversion.
+# local $TODO;
+# $TODO = "pre 5.6 doesn't have flag to distinguish IV/UV"
+# if $[ < 5.005_56 and $copy1 > $max_iv;
+ my $sign = ok (($copy_s2 <=> 0) == ($copy1 <=> 0),
+ "$process $copy1 (sign)");
+
+ unless ($bit and $sign) {
+ printf "# Passed in %s (%#x, %i)\n# got back '%s' (%#x, %i)\n",
+ $copy1, $copy1, $copy1, $copy_s1, $copy_s1, $copy_s1;
+ # use Devel::Peek; Dump $copy_s1; Dump $$copy_s;
+ }
+ # unless ($bit) { use Devel::Peek; Dump $copy_s1; Dump $$copy_s; }
} else {
fail ("$process $copy1");
+ fail ("$process $copy1");
}
}
}
diff --git a/lib/ExtUtils/t/basic.t b/lib/ExtUtils/t/basic.t
index 548e85eb4d..9080434333 100644
--- a/lib/ExtUtils/t/basic.t
+++ b/lib/ExtUtils/t/basic.t
@@ -33,10 +33,10 @@ if( $^O eq 'VMS' ) {
$ IF F$TRNLNM("PERL_CORE") .EQS. "" .AND. F$TYPE(PERL_CORE) .EQS. ""
$ THEN
$! building CPAN version
-$ BFD_TEST_ROOT = F$PARSE("[.t]",,,,"NO_CONCEAL")-".][000000"-"]["-"].;"+".]"
+$ BFD_TEST_ROOT = F$PARSE("SYS$DISK:[]",,,,"NO_CONCEAL")-".][000000"-"]["-"].;"+".]"
$ ELSE
$! we're in the core
-$ BFD_TEST_ROOT = F$PARSE("SYS$DISK:[]",,,,"NO_CONCEAL")-".][000000"-"]["-"].;"+".]"
+$ BFD_TEST_ROOT = F$PARSE("SYS$DISK:[-]",,,,"NO_CONCEAL")-".][000000"-"]["-"].;"+".]"
$ ENDIF
$ DEFINE/JOB/NOLOG/TRANSLATION=CONCEALED BFD_TEST_ROOT 'BFD_TEST_ROOT'
COMMAND
@@ -44,7 +44,7 @@ COMMAND
system '@bfdtesttmp.com';
END { 1 while unlink 'bfdtesttmp.com' }
- $root_dir = 'BFD_TEST_ROOT:[000000]';
+ $root_dir = 'BFD_TEST_ROOT:[t]';
}
chdir $root_dir;
diff --git a/perlio.c b/perlio.c
index 23864b56e9..b41b6d2735 100644
--- a/perlio.c
+++ b/perlio.c
@@ -2446,21 +2446,25 @@ PerlIO_importFILE(FILE *stdio, int fl)
/* We need to probe to see how we can open the stream
so start with read/write and then try write and read
we dup() so that we can fclose without loosing the fd.
+
+ Note that the errno value set by a failing fdopen
+ varies between stdio implementations.
*/
int fd = PerlLIO_dup(fileno(stdio));
char *mode = "r+";
FILE *f2 = fdopen(fd, mode);
PerlIOStdio *s;
- if (!f2 && errno == EINVAL) {
+ if (!f2) {
mode = "w";
f2 = fdopen(fd, mode);
}
- if (!f2 && errno == EINVAL) {
+ if (!f2) {
mode = "r";
f2 = fdopen(fd, mode);
}
if (!f2) {
/* Don't seem to be able to open */
+ PerlLIO_close(fd);
return f;
}
fclose(f2);
diff --git a/pod/perlapio.pod b/pod/perlapio.pod
index 0597687d48..981ee2048b 100644
--- a/pod/perlapio.pod
+++ b/pod/perlapio.pod
@@ -315,6 +315,9 @@ code attempts to empirically determine the mode in which I<f> is open.
Once called the FILE * should I<ONLY> be closed by calling
C<PerlIO_close()> on the returned PerlIO *.
+The PerlIO is set to textmode. Use PerlIO_binmode if this is
+not the desired mode.
+
=item B<PerlIO_exportFILE(f,flags)>
Given a PerlIO * create a 'native' FILE * suitable for passing to code
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 2bf605ddf7..217c7ca60f 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -2730,12 +2730,12 @@ such as sudo ( see http://www.courtesan.com/sudo/ ).
=head1 New Tests
-Several new tests have been added, especially for the F<lib>
-subsection. There are now about 56 000 individual tests (spread over
-about 620 test scripts), in the regression suite (5.6.1 has about
-11700 tests, in 258 test scripts) Many of the new tests are introduced
-by the new modules, but still in general Perl is now more thoroughly
-tested.
+Several new tests have been added, especially for the F<lib> and F<ext>
+subsections. There are now about 65 000 individual tests (spread over
+about 700 test scripts), in the regression suite (5.6.1 has about
+11700 tests, in 258 test scripts) Many of the new tests are of course
+introduced by the new modules, but still in general Perl is now more
+thoroughly tested.
Because of the large number of tests, running the regression suite
will take considerably longer time than it used to: expect the suite
@@ -2784,6 +2784,20 @@ having slightly different types for their first argument.
=back
+=head2 BeOS
+
+The following tests fail on 5.8.0 Perl in BeOS Personal 5.03:
+
+ t/op/lfs............................FAILED at test 17
+ t/op/magic..........................FAILED at test 24
+ ext/Fcntl/t/syslfs..................FAILED at test 17
+ ext/File/Glob/t/basic...............FAILED at test 3
+ ext/POSIX/t/sigaction...............FAILED at test 13
+ ext/POSIX/t/waitpid.................FAILED at test 1
+ lib/Tie/File/t/16_handle............FAILED at test 39
+
+See L<perlbeos> (README.beos) for more details.
+
=head2 ext/threads/t/libc
If this test fails, it indicates that your libc (C library) is not