Re: incorrect xlog.c coverage report

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: incorrect xlog.c coverage report
Date: 2019-05-31 17:05:03
Message-ID: 20190531170503.GA24057@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-May-31, Alvaro Herrera wrote:

> On 2019-May-30, Michael Paquier wrote:
>
> > On Wed, May 29, 2019 at 12:09:08PM -0400, Alvaro Herrera wrote:
> > > Are there objections to doing that now on the master branch?
> >
> > Adding the flush call just on HEAD is fine for me. Not sure that
> > there is an actual reason to back-patch that.
>
> Okay ... I did that (patch attached), and while my new __gcov_flush()
> shows as covered after I run the src/test/recovery tests, the function I
> mentioned earlier (validateRecoveryParameters) is not any more covered
> after the patch than it was before.

I forgot to mention that this patch produces a new warning:

/pgsql/source/master/src/backend/tcop/postgres.c: In function 'quickdie':
/pgsql/source/master/src/backend/tcop/postgres.c:2737:2: warning: implicit declaration of function '__gcov_flush'; did you mean 'pq_flush'? [-Wimplicit-function-declaration]
__gcov_flush();
^~~~~~~~~~~~
pq_flush

I couldn't find a way to squelch that. gcc devs in their infinite
wisdom don't provide a prototype for it, apparently.

Another thing I thought about was adding a configure test for the
function, but a) apparently the function is very old so it's not
necessary, and b) it fails anyway apparently because of that warning.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-05-31 17:30:58 Re: incorrect xlog.c coverage report
Previous Message Alvaro Herrera 2019-05-31 16:44:20 Re: incorrect xlog.c coverage report