mirror of
https://github.com/postgres/postgres.git
synced 2025-04-29 13:56:47 +03:00
Fix new test case to work on (some?) big-endian architectures.
Use of pack("L") gets around the basic endian problem, but it doesn't deal with the fact that the order of the bitfields within the struct may differ. This patch fixes it to work with gcc on NetBSD/macppc, but I wonder whether that will be enough --- in principle, there could be four different combinations of bitpatterns needed here. Discussion: https://postgr.es/m/1650745.1679513221@sss.pgh.pa.us
This commit is contained in:
parent
b48af6d174
commit
c75a623304
@ -630,7 +630,7 @@ for (my $tupidx = 0; $tupidx < $ROWCOUNT; $tupidx++)
|
|||||||
die "offnum $offnum should be a redirect" if defined $tup;
|
die "offnum $offnum should be a redirect" if defined $tup;
|
||||||
sysseek($file, 92, 0) or BAIL_OUT("sysseek failed: $!");
|
sysseek($file, 92, 0) or BAIL_OUT("sysseek failed: $!");
|
||||||
syswrite($file,
|
syswrite($file,
|
||||||
pack("L", $ENDIANNESS eq 'little' ? 0x00010011 : 0x11000100))
|
pack("L", $ENDIANNESS eq 'little' ? 0x00010011 : 0x00230000))
|
||||||
or BAIL_OUT("syswrite failed: $!");
|
or BAIL_OUT("syswrite failed: $!");
|
||||||
push @expected,
|
push @expected,
|
||||||
qr/${header}redirected line pointer points to another redirected line pointer at offset \d+/;
|
qr/${header}redirected line pointer points to another redirected line pointer at offset \d+/;
|
||||||
@ -647,7 +647,7 @@ for (my $tupidx = 0; $tupidx < $ROWCOUNT; $tupidx++)
|
|||||||
# rewrite line pointer with lp.off = 25, lp_flags = 2, lp_len = 0
|
# rewrite line pointer with lp.off = 25, lp_flags = 2, lp_len = 0
|
||||||
sysseek($file, 108, 0) or BAIL_OUT("sysseek failed: $!");
|
sysseek($file, 108, 0) or BAIL_OUT("sysseek failed: $!");
|
||||||
syswrite($file,
|
syswrite($file,
|
||||||
pack("L", $ENDIANNESS eq 'little' ? 0x00010019 : 0x19000100))
|
pack("L", $ENDIANNESS eq 'little' ? 0x00010019 : 0x00330000))
|
||||||
or BAIL_OUT("syswrite failed: $!");
|
or BAIL_OUT("syswrite failed: $!");
|
||||||
push @expected,
|
push @expected,
|
||||||
qr/${header}redirect line pointer points to offset \d+, but offset \d+ also points there/;
|
qr/${header}redirect line pointer points to offset \d+, but offset \d+ also points there/;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user