Front page | perl.perl5.porters |
Postings from December 2000
Re: [ID 20001229.001] Not OK: perl v5.7.0 +DEVEL8221 on i686-linux 2.4.0-test13pre4-ac2 -2 (UNINSTALLED)
Thread Previous
|
Thread Next
From:
andreas.koenig
Date:
December 30, 2000 13:35
Subject:
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
>>>>> On Sat, 30 Dec 2000 10:28:15 -0600, Jarkko Hietaniemi <jhi@iki.fi> said:
> Did the patches tests point at the 32-bitness of tell()?
Nope. But I have a backup system to boot from where I can reproduce the test:
./perl harness -v op/lfs.t
op/lfs..............# checking whether we have sparse files...
# s1 = 8451 296124 33188 1 0 0 0 1000003 978209982 978209982 978209982 4096 16
# s2 = 8451 296125 33188 1 0 0 0 2000003 978209982 978209982 978209982 4096 16
# we seem to have sparse files...
# 8451 296124 33188 1 0 0 0 5000000003 978209982 978209982 978209982 4096 32
1..17
ok 1
ok 2
ok 3
ok 4
ok 5
# bad offset 205032704, want 4500000000
not ok 6
ok 7
# bad offset 205032705, want 4500000001
not ok 8
ok 9
# bad offset 205032704, want 4500000000
not ok 10
ok 11
# bad offset 705032704, want 5000000000
not ok 12
ok 13
ok 14
ok 15
ok 16
ok 17
FAILED tests 6, 8, 10, 12
Failed 4/17 tests, 76.47% okay
Failed Test Status Wstat Total Fail Failed List of Failed
--------------------------------------------------------------------------------
op/lfs.t 17 4 23.53% 6, 8, 10, 12
Failed 1/1 test scripts, 0.00% okay. 4/17 subtests failed, 76.47% okay.
Approaching your new code in the debugger gives:
main::offset(op/lfs.t:178): print "# bad offset $offset_is, want $offset_want\n";
DB<2>
# bad offset 205032704, want 4500000000
main::offset(op/lfs.t:179): if (unpack("L", pack("L", $offset_want)) == $offset_is) {
DB<2> x unpack("L", pack("L", $offset_want))
0 4294967295
DB<3> x 4500000000-4294967295
0 205032705
So I applied this patch to come closer to the output you intended:
--- op/lfs.t-8265 Sat Dec 30 22:10:26 2000
+++ op/lfs.t Sat Dec 30 22:30:29 2000
@@ -177,10 +177,18 @@
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;
}
}
Here is the output after the patch:
./perl op/lfs.t
# checking whether we have sparse files...
# s1 = 8451 296124 33188 1 0 0 0 1000003 978211830 978211830 978211830 4096 16
# s2 = 8451 296125 33188 1 0 0 0 2000003 978211830 978211830 978211830 4096 16
# we seem to have sparse files...
# 8451 296124 33188 1 0 0 0 5000000003 978211830 978211830 978211830 4096 32
1..17
ok 1
ok 2
ok 3
ok 4
ok 5
# bad offset 205032704, want 4500000000
# 32-bit wraparound suspected in tell() since
# 4500000000 - unpack('L', pack('L', 4500000000)) - 1 equals 205032704.
not ok 6
ok 7
# bad offset 205032705, want 4500000001
# 32-bit wraparound suspected in tell() since
# 4500000001 - unpack('L', pack('L', 4500000001)) - 1 equals 205032705.
not ok 8
ok 9
# bad offset 205032704, want 4500000000
# 32-bit wraparound suspected in tell() since
# 4500000000 - unpack('L', pack('L', 4500000000)) - 1 equals 205032704.
not ok 10
ok 11
# bad offset 705032704, want 5000000000
# 32-bit wraparound suspected in tell() since
# 5000000000 - unpack('L', pack('L', 5000000000)) - 1 equals 705032704.
not ok 12
ok 13
ok 14
ok 15
ok 16
ok 17
Let me know if you want me to do further tests with the broken system.
--
andreas
Thread Previous
|
Thread Next