On Mon, Aug 31, 2026 at 01:43:22PM +0300, Nazir Bilal Yavuz wrote:
> Doesn't '--limit N' decrease coverage? For example,

Yeah, I am worried about that for tests with dedicated outputs
checked.

> @lines =
> test_pg_waldump($path, $start_lsn, $end_lsn, '--rmgr' => 'Btree');
> is(grep(!/^rmgr: Btree/, @lines), 0, 'only Btree lines');
> `
> was checking all Btree records from $start to $end. However,
> 
> Also, if I am not mistaken, after this patch there is no test that
> confirms pg_waldump runs correctly from start to end.

I'd still want that once, yes.

>> -       my @lines = test_pg_waldump($path, $start_lsn, $end_lsn);
>> -       is(grep(!/^rmgr: \w/, @lines), 0, 'all output lines are rmgr lines');
>> -
>> -       @lines = test_pg_waldump($path, $contrecord_lsn, $end_lsn);
>> +       my @lines = test_pg_waldump($path, $contrecord_lsn, $end_lsn);
>>
>> Does this removal imply a loss of coverage?
> 
> I think you are right. At least, we lose coverage of tar and gzip inputs.

As far as I remember my read of the patch yesterday, various --limit=1
additions don't really matter because we do not care about checking
dedicated output patterns: we just want to make a quick check that some
command pattern works.  If we only include these, how much time are we
able to cut?  I'd guess that it would still be a nice chunk, but I did
not test..  And we could backpatch that as well.
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to