From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Improve logrotate test so that it meaningfully exercises syslogg
Date: Sun, 19 May 2019 17:55:48 +0000
Message-ID: <E1hSQ2G-0002da-ME@gemulon.postgresql.org> (raw)
Improve logrotate test so that it meaningfully exercises syslogger.
Discussion of bug #15804 reveals that this test didn't really prove
that the syslogger child process ever launched successfully, much
less did anything. It was only checking that the expected log file
gets created, and that's done in the postmaster. Moreover, the
test assumed it could rename the log file, which is likely to fail
on Windows (cf. commit d611175e5).
Instead, use the default log file name pattern, which should result
in a new file name being chosen after 1 second, and verify that
rotation has occurred by checking for a new file name. Also add code
to test that messages actually do propagate through the syslogger.
In theory this version of the test should work on Windows, so
revert d611175e5.
Discussion: https://postgr.es/m/15804-3721117bf40fb654@postgresql.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/9d5c22d28f8c161aa729d841aeec936c646044d4
Modified Files
--------------
src/bin/pg_ctl/t/004_logrotate.pl | 91 +++++++++++++++++++++++++++------------
1 file changed, 63 insertions(+), 28 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Improve logrotate test so that it meaningfully exercises syslogg
In-Reply-To: <E1hSQ2G-0002da-ME@gemulon.postgresql.org>
References: <E1hSQ2G-0002da-ME@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox