Re: pg_waldump: add test for coverage

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: Tristen Raab <tristen.raab@highgo.ca>, pgsql-hackers@lists.postgresql.org
Date: 2023-07-05T09:01:33Z
Lists: pgsql-hackers
On 29.06.23 21:16, Tristen Raab wrote:
> I've reviewed your latest v3 patches on Ubuntu 23.04. Both patches apply correctly and all the tests run and pass as they should. Execution time was normal for me, I didn't notice any significant latency when compared to other tests. The only other feedback I can provide would be to add test coverage to some of the other options that aren't currently covered (ie. --bkp-details, --end, --follow, --path, etc.) for completeness. Other than that, this looks like a great patch.

Committed.

I added a test for the --quiet option.  --end and --path are covered.

The only options not covered now are

   -b, --bkp-details      output detailed information about backup blocks
   -f, --follow           keep retrying after reaching end of WAL
   -t, --timeline=TLI     timeline from which to read WAL records
   -x, --xid=XID          only show records with transaction ID XID

--follow is a bit tricky to test because you need to leave pg_waldump 
running in the background for a while, or something like that. 
--timeline and --xid can be tested but would need some work on the 
underlying test data (such as creating more than one timeline).  I don't 
know much about --bkp-details, so I don't have a good idea how to test 
it.  So I'll leave those as projects for the future.




Commits

  1. pg_waldump: Add test case for notice message

  2. pg_waldump: Add more tests