X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2Fsyslfs.t;h=f04b115d92eef70dc05cc86087341f6b70c083e5;hb=f06a04a3c518babd8e380099d750295752ca626b;hp=cd82dfb5306d478ce0ff83b2559e7dc04da108e7;hpb=38762f023a7a0aba09aa3c465e5ed1d34ca9d4d5;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/lib/syslfs.t b/t/lib/syslfs.t index cd82dfb..f04b115 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; } }