summaryrefslogtreecommitdiff
path: root/src/test/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/modules')
-rw-r--r--src/test/modules/injection_points/Makefile15
-rw-r--r--src/test/modules/injection_points/injection_points.c6
-rw-r--r--src/test/modules/injection_points/meson.build11
-rw-r--r--src/test/modules/test_dsa/test_dsa.c6
-rw-r--r--src/test/modules/test_dsm_registry/test_dsm_registry.c7
5 files changed, 26 insertions, 19 deletions
diff --git a/src/test/modules/injection_points/Makefile b/src/test/modules/injection_points/Makefile
index c85034eb8cc..bfdb3f53377 100644
--- a/src/test/modules/injection_points/Makefile
+++ b/src/test/modules/injection_points/Makefile
@@ -14,12 +14,15 @@ REGRESS_OPTS = --dlpath=$(top_builddir)/src/test/regress
ISOLATION = basic \
inplace \
- syscache-update-pruned \
- index-concurrently-upsert \
- index-concurrently-upsert-predicate \
- reindex-concurrently-upsert \
- reindex-concurrently-upsert-on-constraint \
- reindex-concurrently-upsert-partitioned
+ syscache-update-pruned
+
+# Temporarily disabled because of flakiness
+#ISOLATION =+
+# index-concurrently-upsert \
+# index-concurrently-upsert-predicate \
+# reindex-concurrently-upsert \
+# reindex-concurrently-upsert-on-constraint \
+# reindex-concurrently-upsert-partitioned
# The injection points are cluster-wide, so disable installcheck
NO_INSTALLCHECK = 1
diff --git a/src/test/modules/injection_points/injection_points.c b/src/test/modules/injection_points/injection_points.c
index 417b61f31c5..25340e8d81b 100644
--- a/src/test/modules/injection_points/injection_points.c
+++ b/src/test/modules/injection_points/injection_points.c
@@ -115,7 +115,7 @@ static shmem_startup_hook_type prev_shmem_startup_hook = NULL;
* when initializing dynamically with a DSM or when loading the module.
*/
static void
-injection_point_init_state(void *ptr)
+injection_point_init_state(void *ptr, void *arg)
{
InjectionPointSharedState *state = (InjectionPointSharedState *) ptr;
@@ -159,7 +159,7 @@ injection_shmem_startup(void)
* First time through, so initialize. This is shared with the dynamic
* initialization using a DSM.
*/
- injection_point_init_state(inj_state);
+ injection_point_init_state(inj_state, NULL);
}
LWLockRelease(AddinShmemInitLock);
@@ -179,7 +179,7 @@ injection_init_shmem(void)
inj_state = GetNamedDSMSegment("injection_points",
sizeof(InjectionPointSharedState),
injection_point_init_state,
- &found);
+ &found, NULL);
}
/*
diff --git a/src/test/modules/injection_points/meson.build b/src/test/modules/injection_points/meson.build
index 8d6f662040d..493e11053dc 100644
--- a/src/test/modules/injection_points/meson.build
+++ b/src/test/modules/injection_points/meson.build
@@ -46,11 +46,12 @@ tests += {
'basic',
'inplace',
'syscache-update-pruned',
- 'index-concurrently-upsert',
- 'index-concurrently-upsert-predicate',
- 'reindex-concurrently-upsert',
- 'reindex-concurrently-upsert-on-constraint',
- 'reindex-concurrently-upsert-partitioned',
+ # temporarily disabled because of flakiness
+ # 'index-concurrently-upsert',
+ # 'index-concurrently-upsert-predicate',
+ # 'reindex-concurrently-upsert',
+ # 'reindex-concurrently-upsert-on-constraint',
+ # 'reindex-concurrently-upsert-partitioned',
],
'runningcheck': false, # see syscache-update-pruned
# Some tests wait for all snapshots, so avoid parallel execution
diff --git a/src/test/modules/test_dsa/test_dsa.c b/src/test/modules/test_dsa/test_dsa.c
index 21e4ce6a745..b9c45c0d41c 100644
--- a/src/test/modules/test_dsa/test_dsa.c
+++ b/src/test/modules/test_dsa/test_dsa.c
@@ -21,7 +21,7 @@
PG_MODULE_MAGIC;
static void
-init_tranche(void *ptr)
+init_tranche(void *ptr, void *arg)
{
int *tranche_id = (int *) ptr;
@@ -39,7 +39,7 @@ test_dsa_basic(PG_FUNCTION_ARGS)
dsa_pointer p[100];
tranche_id = GetNamedDSMSegment("test_dsa", sizeof(int),
- init_tranche, &found);
+ init_tranche, &found, NULL);
a = dsa_create(*tranche_id);
for (int i = 0; i < 100; i++)
@@ -80,7 +80,7 @@ test_dsa_resowners(PG_FUNCTION_ARGS)
ResourceOwner childowner;
tranche_id = GetNamedDSMSegment("test_dsa", sizeof(int),
- init_tranche, &found);
+ init_tranche, &found, NULL);
/* Create DSA in parent resource owner */
a = dsa_create(*tranche_id);
diff --git a/src/test/modules/test_dsm_registry/test_dsm_registry.c b/src/test/modules/test_dsm_registry/test_dsm_registry.c
index 4cc2ccdac3f..3e5f4f3cda1 100644
--- a/src/test/modules/test_dsm_registry/test_dsm_registry.c
+++ b/src/test/modules/test_dsm_registry/test_dsm_registry.c
@@ -44,10 +44,13 @@ static const dshash_parameters dsh_params = {
};
static void
-init_tdr_dsm(void *ptr)
+init_tdr_dsm(void *ptr, void *arg)
{
TestDSMRegistryStruct *dsm = (TestDSMRegistryStruct *) ptr;
+ if ((int) (intptr_t) arg != 5432)
+ elog(ERROR, "unexpected arg value %d", (int) (intptr_t) arg);
+
LWLockInitialize(&dsm->lck, LWLockNewTrancheId("test_dsm_registry"));
dsm->val = 0;
}
@@ -60,7 +63,7 @@ tdr_attach_shmem(void)
tdr_dsm = GetNamedDSMSegment("test_dsm_registry_dsm",
sizeof(TestDSMRegistryStruct),
init_tdr_dsm,
- &found);
+ &found, (void *) (intptr_t) 5432);
if (tdr_dsa == NULL)
tdr_dsa = GetNamedDSA("test_dsm_registry_dsa", &found);