Re: Reproducible builds: genbki.pl and Gen_fmgrtab.pl - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Reproducible builds: genbki.pl and Gen_fmgrtab.pl
Date
Msg-id 21250.1514416849@sss.pgh.pa.us
Whole thread Raw
In response to Re: Reproducible builds: genbki.pl and Gen_fmgrtab.pl  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> On 12/21/17 08:13, Andrew Dunstan wrote:
>> Looks reasonable. Regarding the change to TestLib.pm, we should make
>> sure that the tests have unique names. There is a small amount of
>> duplication currently:
>> 
>> ./src/bin/pg_dump/t/001_basic.pl
>> ./src/bin/pg_rewind/t/001_basic.pl
>> ./src/test/modules/commit_ts/t/001_base.pl
>> ./src/test/modules/test_pg_dump/t/001_base.pl

> But that's one of the reasons one has directories, so you don't need to
> have globally unique names.

I agree that it's not obvious that we need to rename these scripts.
In the current setup for running regression tests, the associated
postmaster logs would go into different subdirectories, so the conflict
in "application" names appearing in log entries doesn't seem like it
would lead to real confusion.

> I don't actually see why the change in
> TestLib.pm is necessary or how it relates to this thread.

Basically, as the code stood:

    $ENV{PGAPPNAME} = $0;

running any TAP test in a VPATH build would result in PGAPPNAME becoming a
full path, resulting in different log entries than you get in a non-VPATH
build.  That seemed undesirable to me, so I added basename() to eliminate
the difference in behavior.

There's some room to argue that given that we have duplicate script names,
a (partial) path would be a good thing.  But if you believe that, then we
should attempt to make that happen the same way with or without VPATH.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Unique indexes & constraints on partitioned tables
Next
From: Tatsuo Ishii
Date:
Subject: Re: [HACKERS] [PATCH] Lockable views