Re: incorrect xlog.c coverage report - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: incorrect xlog.c coverage report
Date
Msg-id 20181121143711.rpgx6jrh4wteaunq@alvherre.pgsql
Whole thread Raw
In response to Re: incorrect xlog.c coverage report  (Masahiko Sawada <sawada.mshk@gmail.com>)
Responses Re: incorrect xlog.c coverage report
List pgsql-hackers
On 2018-Nov-21, Masahiko Sawada wrote:

> I've looked into this issue and this happens on my environment (CentOS
> 6.9 and gcob 4.4.7) as well. ISTM the cause would related to the
> immediate shutdown mode we're using in test_recovery_standby.
> Interestingly in my environment with the attached one-line patch the
> coverage reports the branches parsing the individual recovery options
> correctly.
> 
> If my investigation is correct, all tests where use an immediate
> shutdown might not counted by gcov.

Confirmed these results here, thanks for the research.

I think we should change all calls of ->teardown_node to ->stop(),
except the one in the END block, and look for places which are currently
relying too much on END (i.e. add more ->stop() calls where needed).

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Libpq support to connect to standby server as priority
Next
From: Christoph Berg
Date:
Subject: [PATCH] Log PostgreSQL version number on startup