Re: incorrect xlog.c coverage report

Поиск
Список
Период
Сортировка
От Masahiko Sawada
Тема Re: incorrect xlog.c coverage report
Дата
Msg-id CAD21AoAk3526uVb+9Js_XaMYeMF34YiG+SefRY9-Npq+foPsPQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: incorrect xlog.c coverage report  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: incorrect xlog.c coverage report  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
On Wed, Nov 21, 2018 at 12:50 AM Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
>
> I noticed some strangeness in the test coverage reporting.  For example,
> in
> https://coverage.postgresql.org/src/backend/access/transam/xlog.c.gcov.html
> in the function readRecoveryCommandFile(), most of the branches parsing
> the individual recovery options (recovery_target_xid,
> recovery_target_time, etc.) are shown as never hit, even though there
> are explicit tests for this in
> src/test/recovery/t/003_recovery_targets.pl.  I tried this locally and
> also with -O0 just in case, but I get the same results.  Any ideas?
>

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.

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: A WalSnd issue related to state WALSNDSTATE_STOPPING
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: [HACKERS] proposal: schema variables