Re: [PATCH] Reduce src/test/recovery verbosity - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [PATCH] Reduce src/test/recovery verbosity
Date
Msg-id CAB7nPqR0ZGkSPV-4u__yxUUZgf0Enwa+He3qFqX40388u=zi=g@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Reduce src/test/recovery verbosity  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
On Thu, Mar 30, 2017 at 4:08 AM, Stephen Frost <sfrost@snowman.net> wrote:
> * Alvaro Herrera (alvherre@2ndquadrant.com) wrote:
>> Stephen Frost wrote:
>> > * Dagfinn Ilmari Mannsåker (ilmari@ilmari.org) wrote:
>>
>> > > Non-verbose prove still lists each test script, it just doesn't list
>> > > each individual test within the script.
>> >
>> > I agree that it'd be better to just show the per-script results rather
>> > than every little test result because it's just too much.
>>
>> Well, for some test files a single test could take half a minute.  A
>> dozen lines taking in total about a minute seems fine to me.  The
>> problem I see is a (pg_dump I think) script that has over 500 tests.
>
> Not sure that I see that as a "problem". :)
>
>> > If there's a way to change the verbosity for just those scripts, I'd be
>> > happy to do that, if we're unable to agree on reducing it across the
>> > board..
>>
>> I'd rather silence only scripts that are overly verbose.
>
> I'm fine with that, but how?

The important point to me is not to show the tests that passed, it is
to show the tests that are failing when running them. So I would
suggest to just remove the --verbose flag in PROVE_FLAGS. If you do
so, the test of pg_dump would show up like that, printing as well a
count number while running:
t/001_basic.pl ......... ok
t/002_pg_dump.pl ....... ok
t/010_dump_connstr.pl .. ok

And failures would still show up, here is an example breaking manually
a recovery test:
t/001_stream_rep.pl .................. 1/28
#   Failed test 'read-only queries on standby 2'
#   at t/001_stream_rep.pl line 59.
#          got: '3'
#     expected: '0'
# testing connection parameter "target_session_attrs"
# switching to physical replication slot
t/001_stream_rep.pl .................. 11/28 # enabling hot_standby_feedback
t/001_stream_rep.pl .................. 15/28 # doing some work to advance xmin
# new xmin 1442, old xmin 558
t/001_stream_rep.pl .................. 19/28 # new xmin 1553, old xmin 558
# disabling hot_standby_feedback
t/001_stream_rep.pl .................. 23/28 # re-enabling
hot_standby_feedback and disabling while stopped
t/001_stream_rep.pl .................. 28/28 # Looks like you failed 1
test of 28.
t/001_stream_rep.pl .................. Dubious, test returned 1 (wstat
256, 0x100)
Failed 1/28 subtests
t/002_archiving.pl ................... ok
t/003_recovery_targets.pl ............ ok
t/004_timeline_switch.pl ............. ok

Attached is a patch.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: logical replication access control patches
Next
From: Venkata B Nagothi
Date:
Subject: Re: [BUGS] Bug in Physical Replication Slots (at least 9.5)?