diff options
author | Andres Freund <andres@anarazel.de> | 2020-06-08 16:36:51 -0700 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2020-06-18 14:06:21 -0700 |
commit | 3b37a6de027c27f1e4ac865aaa34dd92cf5dc7a1 (patch) | |
tree | 6b7f410f4df1ed5314fd70d9f3286524b8118cad /src/backend/executor/execParallel.c | |
parent | a3235a53ae9f6f21f823081c610b0901db6aa665 (diff) | |
download | postgresql-3b37a6de027c27f1e4ac865aaa34dd92cf5dc7a1.tar.gz postgresql-3b37a6de027c27f1e4ac865aaa34dd92cf5dc7a1.zip |
Add basic spinlock tests to regression tests.
As s_lock_test, the already existing test for spinlocks, isn't run in
an automated fashion (and doesn't test a normal backend environment),
adding tests that are run as part of a normal regression run is a good
idea. Particularly in light of several recent and upcoming spinlock
related fixes.
Currently the new tests are run as part of the pre-existing
test_atomic_ops() test. That perhaps can be quibbled about, but for
now seems ok.
The only operations that s_lock_test tests but the new tests don't are
the detection of a stuck spinlock and S_LOCK_FREE (which is otherwise
unused, not implemented on all platforms, and will be removed).
This currently contains a test for more than INT_MAX spinlocks (only
run with --disable-spinlocks), to ensure the recent commit fixing a
bug with more than INT_MAX spinlock initializations is correct. That
test is somewhat slow, so we might want to disable it after a few
days.
It might be worth retiring s_lock_test after this. The added coverage
of a stuck spinlock probably isn't worth the added complexity?
Author: Andres Freund
Discussion: https://postgr.es/m/20200606023103.avzrctgv7476xj7i@alap3.anarazel.de
Diffstat (limited to 'src/backend/executor/execParallel.c')
0 files changed, 0 insertions, 0 deletions