Warnings and uninitialized variables in TAP tests - Mailing list pgsql-hackers

From Michael Paquier
Subject Warnings and uninitialized variables in TAP tests
Date
Msg-id 20180409011517.GB11599@paquier.xyz
Whole thread Raw
Responses Re: Warnings and uninitialized variables in TAP tests  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pgsql: Merge catalog/pg_foo_fn.h headers back into pg_foo.hheaders.
Next
From: Craig Ringer
Date:
Subject: Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS