Re: Regression tests versus the buildfarm environment

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Regression tests versus the buildfarm environment
Date: 2010-08-11 14:15:21
Message-ID: 4650.1281536121@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> On 08/11/2010 09:43 AM, Tom Lane wrote:
>> Andrew Dunstan<andrew(at)dunslane(dot)net> writes:
>>> Why not just add the configured port (DEF_PGPORT) into the calculation
>>> of the port to run on?

>> No, that would be just about the worst possible choice. It'd be
>> guaranteed to fail in the standard scenario that you are running
>> "make check" before updating an existing installation.

> One of us is missing something. I didn't say to run the checks using the
> configured port. I had in mind something like:

> port = 0xC000 | ((PG_VERSION_NUM + DEF_PGPORT) & 0x3FFF);

Oh, I see, modify the DEF_PGPORT don't just use it as-is. OK, except
that I think something like the above is still pretty risky for the
buildfarm, because you would still have conflicts for assorted
combinations of version numbers and branch_port settings.

How about just this:

port = 0xC000 | (DEF_PGPORT & 0x3FFF);

If anyone was actually using a DEF_PGPORT above 0xC000, this would mean
that they couldn't run "make check" on the same machine as their running
installation (at least not without adjusting pg_regress's port choice,
which I still think we need to tweak the makefiles to make easier).
But for ordinary buildfarm usage, this would be guaranteed not to
conflict as long as you'd chosen nonconflicting branch_ports for all
your branches and animals.

Or we could do something like

port = 0xC000 ^ (DEF_PGPORT & 0x7FFF);

which is absolutely guaranteed not to conflict with DEF_PGPORT, at the
cost of possibly shifting into the 32K-48K port number range if you
had set DEF_PGPORT above 48K.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-08-11 14:17:25 Re: Regression tests versus the buildfarm environment
Previous Message Robert Haas 2010-08-11 14:14:37 Re: MERGE command for inheritance