On 1/19/18 4:43 PM, Peter Eisentraut wrote:
> On 1/19/18 14:07, David Steele wrote:
>> I have yet to add tests for pg_rewindwal and pg_upgrade. pg_rewindwal
>> doesn't *have* any tests as far as I can tell and pg_upgrade has tests
>> in a shell script -- it's not clear how I would extend it or reuse the
>> Perl code for perm testing.
>>
>> Does anyone have suggestions on tests for pg_resetwal and pg_upgrade?
>> Should I start from scratch?
>
> A test suite for pg_resetwal would be nice.
Agreed.
> TAP tests for pg_upgrade will create problems with the build farm.
> There was a recent thread about that.
OK, that being the case I have piggy-backed on the current pg_upgrade
tests in the same way that --wal-segsize did.
There are now three patches:
1) 01-pgresetwal-test
Adds a *very* basic test suite for pg_resetwal. I was able to make this
utility core dump (floating point errors) pretty easily with empty or
malformed pg_control files so I focused on WAL reset functionality plus
the basic help/command tests that every utility has.
2) 02-mkdir
Converts mkdir() calls to MakeDirectoryDefaultPerm() if the original
call used default permissions.
3) 03-group
Allow group access on PGDATA. This includes backend changes, utility
changes (initdb, pg_ctl, pg_upgrade, etc.) and tests for each utility.
Regards,
--
-David
david@pgmasters.net