Fix pgbench permute tests.
authorDean Rasheed <dean.a.rasheed@gmail.com>
Wed, 19 May 2021 11:50:58 +0000 (12:50 +0100)
committerDean Rasheed <dean.a.rasheed@gmail.com>
Wed, 19 May 2021 11:50:58 +0000 (12:50 +0100)
One of the tests for the pgbench permute() function added by
6b258e3d68 fails on some 32-bit platforms, due to variations in the
floating point computations in getrand(). The remaining tests give
sufficient coverage, so just remove the failing test.

Reported by Christoph Berg. Analysis by Thomas Munro and Tom Lane.
Based on patch by Fabien Coelho.

Discussion: https://postgr.es/m/YKQnUoYV63GRJBDD@msg.df7cb.de

src/bin/pgbench/t/001_pgbench_with_server.pl

index 2eaf9ab4c29c52531c033844b363a0ea98d03803..9cc5270e02c914d498ba5fbb18d3bed5d33b71e7 100644 (file)
@@ -496,8 +496,6 @@ pgbench(
        qr{command=109.: boolean true\b},
        qr{command=110.: boolean true\b},
        qr{command=111.: boolean true\b},
-       qr{command=112.: int 9223372036854775797\b},
-       qr{command=113.: boolean true\b},
    ],
    'pgbench expressions',
    {
@@ -643,15 +641,6 @@ SELECT :v0, :v1, :v2, :v3;
 \set t debug(permute(:v, 1) = 0)
 \set t debug(permute(0, 2, 5432) = 0 and permute(1, 2, 5432) = 1 and \
              permute(0, 2, 5435) = 1 and permute(1, 2, 5435) = 0)
--- 63 bits tests
-\set size debug(:max - 10)
-\set t debug(permute(:size-1, :size, 5432) = 5301702756001087507 and \
-             permute(:size-2, :size, 5432) = 8968485976055840695 and \
-             permute(:size-3, :size, 5432) = 6708495591295582115 and \
-             permute(:size-4, :size, 5432) = 2801794404574855121 and \
-             permute(:size-5, :size, 5432) = 1489011409218895840 and \
-             permute(:size-6, :size, 5432) = 2267749475878240183 and \
-             permute(:size-7, :size, 5432) = 1300324176838786780)
 }
    });