Change 29578 by [EMAIL PROTECTED] on 2006/12/18 11:47:56
Subject: [PATCH 5.8.8] Fixes for the test suite on OS/2
From: Ilya Zakharevich <[EMAIL PROTECTED]>
Date: Wed, 13 Dec 2006 18:32:22 -0800
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/ext/IO/t/io_unix.t#6 edit
... //depot/perl/lib/ExtUtils/t/eu_command.t#5 edit
... //depot/perl/lib/Time/Local.t#18 edit
... //depot/perl/os2/OS2/ExtAttr/t/os2_ea.t#6 edit
... //depot/perl/t/io/fs.t#60 edit
... //depot/perl/t/op/stat.t#87 edit
Differences ...
==== //depot/perl/ext/IO/t/io_unix.t#6 (text) ====
Index: perl/ext/IO/t/io_unix.t
--- perl/ext/IO/t/io_unix.t#5~27710~ 2006-04-04 03:34:10.000000000 -0700
+++ perl/ext/IO/t/io_unix.t 2006-12-18 03:47:56.000000000 -0800
@@ -38,6 +38,13 @@
$PATH = "sock-$$";
+if ($^O eq 'os2') { # Can't create sockets with relative path...
+ require Cwd;
+ my $d = Cwd::cwd();
+ $d =~ s/^[a-z]://i;
+ $PATH = "$d/$PATH";
+}
+
# Test if we can create the file within the tmp directory
if (-e $PATH or not open(TEST, ">$PATH") and $^O ne 'os2') {
print "1..0 # Skip: cannot open '$PATH' for write\n";
==== //depot/perl/lib/ExtUtils/t/eu_command.t#5 (text) ====
Index: perl/lib/ExtUtils/t/eu_command.t
--- perl/lib/ExtUtils/t/eu_command.t#4~28989~ 2006-10-10 09:23:48.000000000
-0700
+++ perl/lib/ExtUtils/t/eu_command.t 2006-12-18 03:47:56.000000000 -0800
@@ -263,6 +263,7 @@
{
{ local @ARGV = 'd2utest'; mkpath; }
open(FILE, '>d2utest/foo');
+ binmode(FILE);
print FILE "stuff\015\012and thing\015\012";
close FILE;
==== //depot/perl/lib/Time/Local.t#18 (xtext) ====
Index: perl/lib/Time/Local.t
--- perl/lib/Time/Local.t#17~28683~ 2006-08-09 05:43:19.000000000 -0700
+++ perl/lib/Time/Local.t 2006-12-18 03:47:56.000000000 -0800
@@ -55,7 +55,8 @@
# Use 3 days before the start of the epoch because with Borland on
# Win32 it will work for -3600 _if_ your time zone is +01:00 (or
# greater).
-my $neg_epoch_ok = defined ((localtime(-259200))[0]) ? 1 : 0;
+my $neg_epoch_ok = # take into account systems with unsigned time too
+ (defined ((localtime(-259200))[0]) and (localtime(-259200))[5] == 69) ? 1
: 0;
# use vmsish 'time' makes for oddness around the Unix epoch
if ($^O eq 'VMS') {
==== //depot/perl/os2/OS2/ExtAttr/t/os2_ea.t#6 (text) ====
Index: perl/os2/OS2/ExtAttr/t/os2_ea.t
--- perl/os2/OS2/ExtAttr/t/os2_ea.t#5~1575~ 1998-07-19 18:27:14.000000000
-0700
+++ perl/os2/OS2/ExtAttr/t/os2_ea.t 2006-12-18 03:47:56.000000000 -0800
@@ -37,9 +37,14 @@
print "ok 2\n";
keys %a == 0 ? print "ok 3\n" : print "not ok 3\n";
- $a{'++'} = '---';
+# Standard Extended Attributes (SEAs) have a dot (.) as a prefix.
+# This identifies the extended attribute as a SEA. The leading dot is reserved,
+# so applications should not define extended attributes that start with a dot.
+# Also, extended attributes
+# that start with the characters $, @, &, or + are reserved for system use.
+ $a{'X--Y'} = '---'; # '++', -++', '!++', 'X++Y' fail on JFS
print "ok 4\n";
- $a{'AAA'} = 'xyz';
+ $a{'AAA'} = 'xyz'; # Name is going to be uppercased???
print "ok 5\n";
}
@@ -51,10 +56,10 @@
my $c = keys %a;
$c == 2 ? print "ok 7\n" : print "not ok 7\n# c=$c\n";
my @b = sort keys %a;
- "@b" eq '++ AAA' ? print "ok 8\n" : print "not ok 8\n# [EMAIL PROTECTED]'\n";
- $a{'++'} eq '---' ? print "ok 9\n" : print "not ok 9\n";;
+ "@b" eq 'AAA X--Y' ? print "ok 8\n" : print "not ok 8\n# [EMAIL
PROTECTED]'\n";
+ $a{'X--Y'} eq '---' ? print "ok 9\n" : print "not ok 9\n";;
$a{'AAA'} eq 'xyz' ? print "ok 10\n" : print "not ok 10\n# aaa->`$a{AAA}'\n";
- $c = delete $a{'++'};
+ $c = delete $a{'X--Y'};
$c eq '---' ? print "ok 11\n" : print "not ok 11\n# deleted->`$c'\n";;
}
@@ -70,10 +75,11 @@
"@b" eq 'AAA' ? print "ok 15\n" : print "not ok 15\n";
$a{'AAA'} eq 'xyz' ? print "ok 16\n" : print "not ok 16\n";;
! exists $a{'+'} ? print "ok 17\n" : print "not ok 17\n";;
- ! defined $a{'+'} ? print "ok 18\n" : print "not ok 18\n# ->`$a{'++'}'\n";;
- ! exists $a{'++'} ? print "ok 19\n" : print "not ok 19\n";;
- ! defined $a{'++'} ? print "ok 20\n" : print "not ok 20\n# ->`$a{'++'}'\n";;
+ ! defined $a{'+'} ? print "ok 18\n" : print "not ok 18\n# ->`$a{'X--Y'}'\n";;
+ ! exists $a{'X--Y'} ? print "ok 19\n" : print "not ok 19\n";;
+ ! defined $a{'X--Y'} ? print "ok 20\n" : print "not ok 20\n#
->`$a{'X--Y'}'\n";;
}
print "ok 21\n";
unlink 't.out';
+
==== //depot/perl/t/io/fs.t#60 (xtext) ====
Index: perl/t/io/fs.t
--- perl/t/io/fs.t#59~27239~ 2006-02-20 01:31:03.000000000 -0800
+++ perl/t/io/fs.t 2006-12-18 03:47:56.000000000 -0800
@@ -203,7 +203,7 @@
skip "has fchown", 1 if ($Config{d_fchown} || "") eq "define";
open(my $fh, "<", "a");
eval { chown(0, 0, $fh); };
- like($@, qr/^The fchown function is unimplemented at/, "fchown is
unimplemented");
+ like($@, qr/^The f?chown function is unimplemented at/, "fchown is
unimplemented");
}
is(rename('a','b'), 1, "rename a b");
==== //depot/perl/t/op/stat.t#87 (xtext) ====
Index: perl/t/op/stat.t
--- perl/t/op/stat.t#86~29234~ 2006-11-08 06:02:46.000000000 -0800
+++ perl/t/op/stat.t 2006-12-18 03:47:56.000000000 -0800
@@ -41,7 +41,7 @@
my $tmpfile = 'Op_stat.tmp';
my $tmpfile_link = $tmpfile.'2';
-
+chmod 0666, $tmpfile;
1 while unlink $tmpfile;
open(FOO, ">$tmpfile") || DIE("Can't open temp test file: $!");
close FOO;
@@ -508,5 +508,6 @@
}
END {
+ chmod 0666, $tmpfile;
1 while unlink $tmpfile;
}
End of Patch.