From: Andrew Dunstan <andrew@dunslane.net>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: clean up test_rls_hooks module
Date: Wed, 23 Mar 2022 09:31:04 -0400
Message-ID: <43bcaaab-077e-cebe-35be-3cd7f2633449@dunslane.net> (raw)
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-D403F2B45175@enterprisedb.com
--
Andrew Dunstan
EDB: https://www.enterprisedb.comAttachments:0001-fix-test_rls_hooks.patch (text/x-patch, 2.1K) download
From 21f316d29881c3294f8d0b1bc2f0dde8eec38c2d Mon Sep 17 00:00:00 2001
From: Andrew Dunstan <andrew@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/Makefileindex 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.confdeleted file mode 100644index a522c0e550..0000000000--- a/src/test/modules/test_rls_hooks/rls_hooks.conf+++ /dev/null@@ -1 +0,0 @@-shared_preload_libraries = test_rls_hooksdiff --git a/src/test/modules/test_rls_hooks/test_rls_hooks.control b/src/test/modules/test_rls_hooks/test_rls_hooks.controldeleted file mode 100644index 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: andrew@dunslane.net, pgsql-hackers@lists.postgresql.org
Subject: Re: clean up test_rls_hooks module
In-Reply-To: <43bcaaab-077e-cebe-35be-3cd7f2633449@dunslane.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox