summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorAndreas König <a.koenig@mind.de>2000-12-30 23:35:37 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2000-12-30 21:47:49 +0000
commitf06a04a3c518babd8e380099d750295752ca626b (patch)
tree8659d10c8ed9d9694e982767eb0d617b848ed9f1 /t
parent38762f023a7a0aba09aa3c465e5ed1d34ca9d4d5 (diff)
downloadperl-f06a04a3c518babd8e380099d750295752ca626b.tar.gz
Re: [ID 20001229.001] Not OK: perl v5.7.0 +DEVEL8221 on i686-linux 2.4.0-test13pre4-ac2 -2 (UNINSTALLED)
Message-ID: <m3vgs1a8ye.fsf@ak-71.mind.de> The 32-bit wraparound test wasn't quite right. p4raw-id: //depot/perl@8278
Diffstat (limited to 't')
-rw-r--r--t/lib/syslfs.t12
-rw-r--r--t/op/lfs.t12
2 files changed, 20 insertions, 4 deletions
diff --git a/t/lib/syslfs.t b/t/lib/syslfs.t
index cd82dfb530..f04b115d92 100644
--- a/t/lib/syslfs.t
+++ b/t/lib/syslfs.t
@@ -174,10 +174,18 @@ sub offset ($$) {
unless ($offset_is == $offset_want) {
print "# bad offset $offset_is, want $offset_want\n";
if (unpack("L", pack("L", $offset_want)) == $offset_is) {
- my $offset_func = ($offset_will_be =~ /^(\w+)/);
+ my($offset_func) = ($offset_will_be =~ /^(\w+)/);
print "# 32-bit wraparound suspected in $offset_func() since\n";
print "# $offset_want cast into 32 bits is $offset_is.\n";
- }
+ } elsif ($offset_want - unpack("L", pack("L", $offset_want)) - 1
+ == $offset_is){
+ my($offset_func) = ($offset_will_be =~ /^(\w+)/);
+ print "# 32-bit wraparound suspected in $offset_func() since\n";
+ printf "# %s - unpack('L', pack('L', %s)) - 1 equals %s.\n",
+ $offset_want,
+ $offset_want,
+ $offset_is;
+ }
fail;
}
}
diff --git a/t/op/lfs.t b/t/op/lfs.t
index e04e1a1dac..0ae3182f69 100644
--- a/t/op/lfs.t
+++ b/t/op/lfs.t
@@ -177,10 +177,18 @@ sub offset ($$) {
unless ($offset_is == $offset_want) {
print "# bad offset $offset_is, want $offset_want\n";
if (unpack("L", pack("L", $offset_want)) == $offset_is) {
- my $offset_func = ($offset_will_be =~ /^(\w+)/);
+ my($offset_func) = ($offset_will_be =~ /^(\w+)/);
print "# 32-bit wraparound suspected in $offset_func() since\n";
print "# $offset_want cast into 32 bits is $offset_is.\n";
- }
+ } elsif ($offset_want - unpack("L", pack("L", $offset_want)) - 1
+ == $offset_is){
+ my($offset_func) = ($offset_will_be =~ /^(\w+)/);
+ print "# 32-bit wraparound suspected in $offset_func() since\n";
+ printf "# %s - unpack('L', pack('L', %s)) - 1 equals %s.\n",
+ $offset_want,
+ $offset_want,
+ $offset_is;
+ }
fail;
}
}