Over at [1] Mark Dilger got led astray because he used src/test/modules/test_rls_hooks as a template for his new test module. It looks like that module was created with some over eager copying of another test module, but it has a couple of things wrong with it.
. it isn't an extension, so the Makefile shouldn't have an EXTENSION entry, and there shouldn't be a .control file . it doesn't need to be preloaded so there is no requirement for a special config, nor for corresponding REGRESS_OPTS and NO_INSTALLCHECK lines in the Makefile. Here's a patch to fix those things. cheers andrew [1] https://postgr.es/m/47f87a0e-c0e5-43a6-89f6-d403f2b45...@enterprisedb.com -- Andrew Dunstan EDB: https://www.enterprisedb.com
From 21f316d29881c3294f8d0b1bc2f0dde8eec38c2d Mon Sep 17 00:00:00 2001 From: Andrew Dunstan <and...@dunslane.net> Date: Wed, 23 Mar 2022 08:49:07 -0400 Subject: [PATCH] fix test_rls_hooks --- src/test/modules/test_rls_hooks/Makefile | 12 ++---------- src/test/modules/test_rls_hooks/rls_hooks.conf | 1 - .../modules/test_rls_hooks/test_rls_hooks.control | 4 ---- 3 files changed, 2 insertions(+), 15 deletions(-) delete mode 100644 src/test/modules/test_rls_hooks/rls_hooks.conf delete mode 100644 src/test/modules/test_rls_hooks/test_rls_hooks.control diff --git a/src/test/modules/test_rls_hooks/Makefile b/src/test/modules/test_rls_hooks/Makefile index a4f7d855c0..519eb9513d 100644 --- a/src/test/modules/test_rls_hooks/Makefile +++ b/src/test/modules/test_rls_hooks/Makefile @@ -1,19 +1,11 @@ # src/test/modules/test_rls_hooks/Makefile MODULE_big = test_rls_hooks -OBJS = \ - $(WIN32RES) \ - test_rls_hooks.o -PGFILEDESC = "test_rls_hooks - example use of RLS hooks" +OBJS = test_rls_hooks.o $(WIN32RES) -EXTENSION = test_rls_hooks -# DATA = test_rls_hooks--1.0.sql +PGFILEDESC = "test_rls_hooks - example use of RLS hooks" REGRESS = test_rls_hooks -REGRESS_OPTS = --temp-config=$(top_srcdir)/src/test/modules/test_rls_hooks/rls_hooks.conf -# Disabled because these tests require "shared_preload_libraries=test_rls_hooks", -# which typical installcheck users do not have (e.g. buildfarm clients). -NO_INSTALLCHECK = 1 ifdef USE_PGXS PG_CONFIG = pg_config diff --git a/src/test/modules/test_rls_hooks/rls_hooks.conf b/src/test/modules/test_rls_hooks/rls_hooks.conf deleted file mode 100644 index a522c0e550..0000000000 --- a/src/test/modules/test_rls_hooks/rls_hooks.conf +++ /dev/null @@ -1 +0,0 @@ -shared_preload_libraries = test_rls_hooks diff --git a/src/test/modules/test_rls_hooks/test_rls_hooks.control b/src/test/modules/test_rls_hooks/test_rls_hooks.control deleted file mode 100644 index 9f9f13f76c..0000000000 --- a/src/test/modules/test_rls_hooks/test_rls_hooks.control +++ /dev/null @@ -1,4 +0,0 @@ -comment = 'Test code for RLS hooks' -default_version = '1.0' -module_pathname = '$libdir/test_rls_hooks' -relocatable = true -- 2.25.1