Re: s_lock_test no longer works

2024-01-24 Thread Andres Freund
Hi,

On 2024-01-24 15:05:12 -0500, Tom Lane wrote:
> Andres Freund  writes:
> > On 2024-01-24 12:14:17 +0100, Alvaro Herrera wrote:
> >> I do wonder if we want to keep this around, given that it's been more
> >> than one year broken and nobody seems to have noticed, and the Meson
> >> build does not support the test as a target.
> 
> > Perhaps we should just make the test built and run by default instead?  
> > OTOH,
> > regress.c:test_spinlock() actually covers about as much as the standalone
> > test...
> 
> If your spinlocks aren't working, it's unlikely you'll get as far as
> being able to run test_spinlock().  I think the standalone test does
> have some value; it's just that it's not needed very often these days.

As long as the uncontended case works, you can get surprisingly far... But
still, fair enough. If so, I think we should just rig things so the standalone
test gets built and run by default. It's not like that'd be a measurably
expensive thing to do.

Greetings,

Andres Freund




Re: s_lock_test no longer works

2024-01-24 Thread Tom Lane
Andres Freund  writes:
> On 2024-01-24 12:14:17 +0100, Alvaro Herrera wrote:
>> I do wonder if we want to keep this around, given that it's been more
>> than one year broken and nobody seems to have noticed, and the Meson
>> build does not support the test as a target.

> Perhaps we should just make the test built and run by default instead?  OTOH,
> regress.c:test_spinlock() actually covers about as much as the standalone
> test...

If your spinlocks aren't working, it's unlikely you'll get as far as
being able to run test_spinlock().  I think the standalone test does
have some value; it's just that it's not needed very often these days.

regards, tom lane




Re: s_lock_test no longer works

2024-01-24 Thread Andres Freund
Hi,

On 2024-01-24 12:14:17 +0100, Alvaro Herrera wrote:
> I do wonder if we want to keep this around, given that it's been more
> than one year broken and nobody seems to have noticed, and the Meson
> build does not support the test as a target.

Perhaps we should just make the test built and run by default instead?  OTOH,
regress.c:test_spinlock() actually covers about as much as the standalone
test...

Greetings,

Andres Freund




Re: s_lock_test no longer works

2024-01-24 Thread Tom Lane
Alvaro Herrera  writes:
> I do wonder if we want to keep this around, given that it's been more
> than one year broken and nobody seems to have noticed, and the Meson
> build does not support the test as a target.

The last time it was broken, it took us multiple years to notice, too.
I'm not sure that that's a reason to remove the test scaffolding,
though.  You'd probably only really use it to smoke-test some new
spinlock assembly code, and how often does anyone do that anymore?

regards, tom lane