Warnings and uninitialized variables in TAP tests

Started by Michael Paquierover 8 years ago3 messageshackers
Beta feature

Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.

won't retrytests failedCI history

You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:

docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t38520
psql -h localhost -U postgres

Built from patchset v1 (message #1), July 27, 2026 at 08:42 PM.

Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:

git clone --branch t38520_1 https://github.com/hackorum-dev/postgres.git

In a checkout you already have, add the fork once:

git remote add hackorum https://github.com/hackorum-dev/postgres.git

then, for this patchset and every later one:

git fetch hackorum t38520_1 && git checkout t38520_1

Patchset v1 (message #1) is on t38520_1

Jump to latest
#1Michael Paquier
michael@paquier.xyz

Hi all,

While looking at the output of the TAP tests, I have seen warnings like
the following:
Use of uninitialized value $target_lsn in concatenation (.) or string at
/home/foo/git/postgres/src/bin/pg_rewind/../../../src/test/perl/PostgresNode.pm
line 1540.
[...]
./src/bin/pg_basebackup/tmp_check/log/regress_log_010_pg_basebackup:Use
of uninitialized value $str in print at
/home/foo/git/postgres/src/bin/pg_basebackup/../../../src/test/perl/TestLib.pm
line 244.

The first one shows somethng like 30 times, and the second only once.

Attached is a patch to clean up all that. In order to find all that, I
simply ran the following and they pop up:
find . -name "regress_log*" | xargs grep -i "uninitialized"

What I have found is harmless, still they pollute the logs.

Thanks,
--
Michael

Attachments:

t38520_1
tap-init-fix.patchtext/x-diff; charset=us-asciiDownload+2-2
#2Magnus Hagander
magnus@hagander.net
In reply to: Michael Paquier (#1)
Re: Warnings and uninitialized variables in TAP tests

On Mon, Apr 9, 2018 at 3:15 AM, Michael Paquier <michael@paquier.xyz> wrote:

Hi all,

While looking at the output of the TAP tests, I have seen warnings like
the following:
Use of uninitialized value $target_lsn in concatenation (.) or string at
/home/foo/git/postgres/src/bin/pg_rewind/../../../src/
test/perl/PostgresNode.pm
line 1540.
[...]
./src/bin/pg_basebackup/tmp_check/log/regress_log_010_pg_basebackup:Use
of uninitialized value $str in print at
/home/foo/git/postgres/src/bin/pg_basebackup/../../../
src/test/perl/TestLib.pm
line 244.

The first one shows somethng like 30 times, and the second only once.

Attached is a patch to clean up all that. In order to find all that, I
simply ran the following and they pop up:
find . -name "regress_log*" | xargs grep -i "uninitialized"

What I have found is harmless, still they pollute the logs.

Applied, thanks.

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/&gt;
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/&gt;

#3Michael Paquier
michael@paquier.xyz
In reply to: Magnus Hagander (#2)
Re: Warnings and uninitialized variables in TAP tests

On Mon, Apr 09, 2018 at 09:46:29PM +0200, Magnus Hagander wrote:

Applied, thanks.

Thanks for the commit.
--
Michael