pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feed From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: r.zharkov@postgrespro.ru
Subject: BUG #16914: Regression test of the worker_spi fails if USE_MODULE_DB environment variable is set.
Date: Thu, 04 Mar 2021 07:43:11 +0000
Message-ID: <16914-ca8dd84fef8db291@postgresql.org> (raw )
The following bug has been logged on the website:
Bug reference: 16914
Logged by: Roman Zharkov
Email address: r.zharkov@postgrespro.ru
PostgreSQL version: Unsupported/Unknown
Operating system: Centos 7
Description:
Hello!
I found a little problem with the test on the master branch:
$ make -s -C src/test/modules/worker_spi check USE_MODULE_DB=TRUE
============== creating temporary instance ==============
============== initializing database system ==============
============== starting postmaster ==============
running on port 58080 with PID 2863
============== creating database "contrib_regression_worker_spi"
==============
CREATE DATABASE
ALTER DATABASE
============== running regression test queries ==============
test worker_spi ... FAILED 131652 ms
============== shutting down postmaster
$make -s -C src/test/modules/worker_spi check USE_MODULE_DB=
============== removing existing temp instance ==============
============== creating temporary instance ==============
============== initializing database system ==============
============== starting postmaster ==============
running on port 58080 with PID 1903
============== creating database "contrib_regression" ==============
CREATE DATABASE
ALTER DATABASE
============== running regression test queries ==============
test worker_spi ... ok 246 ms
============== shutting down postmaster ==============
============== removing temporary instance ==============
=====================
All 1 tests passed.
=====================
Something like this fixes the problem:
diff --git a/src/test/modules/worker_spi/.gitignore
b/src/test/modules/worker_spi/.gitignore
index
5dcb3ff9723501c3fe639bee1c1435e47a580a6f..8050cb6716c52fbade5ac5e80eabf3dd134737b8
100644
inline patch 1: src/test/modules/worker_spi/.gitignore, src/test/modules/worker_spi/Makefile (+1/-0 lines) download inline-1.patch --- a/src/test/modules/worker_spi/.gitignore
+++ b/src/test/modules/worker_spi/.gitignore
@@ -2,3 +2,4 @@
/log/
/results/
/tmp_check/
+dynamic_temp.conf
diff --git a/src/test/modules/worker_spi/Makefile
b/src/test/modules/worker_spi/Makefile
index
cbf9b2e37fd6da99b9250481f903eec1940e54ae..1865e578533eaaea8698f2396db01b4edb8a91ba
100644
inline patch 2: src/test/modules/worker_spi/Makefile (+0/-1 lines) download inline-2.patch --- a/src/test/modules/worker_spi/Makefile
+++ b/src/test/modules/worker_spi/Makefile
@@ -9,7 +9,15 @@ PGFILEDESC = "worker_spi - background worker example"
REGRESS = worker_spi
# enable our module in shared_preload_libraries for dynamic bgworkers
-REGRESS_OPTS = --temp-config
$(top_srcdir)/src/test/modules/worker_spi/dynamic.conf
+REGRESS_OPTS = --temp-config
$(top_srcdir)/src/test/modules/worker_spi/dynamic_temp.conf
+
+# Set the actual database name in the temp config.
+set-db-name:
+ cp $(top_srcdir)/src/test/modules/worker_spi/dynamic.conf
$(top_srcdir)/src/test/modules/worker_spi/dynamic_temp.conf
+ echo "worker_spi.database = $(CONTRIB_TESTDB)" >>
$(top_srcdir)/src/test/modules/worker_spi/dynamic_temp.conf
+.PHONY: set-db-name
+
+check: set-db-name
# Disable installcheck to ensure we cover dynamic bgworkers.
NO_INSTALLCHECK = 1
regards,
Roman Zharkov
Patches: download all (2 files, .tar.gz)
view thread (8+ messages) latest in thread
Message-ID: <16914-ca8dd84fef8db291@postgresql.org>
Permalink: ../16914-ca8dd84fef8db291@postgresql.org/
Also on: postgresql.org/message-id/16914-ca8dd84fef8db291@postgresql.org
copy link · copy postgr.es · copy git am
reply 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-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, r.zharkov@postgrespro.ru
Subject: Re: BUG #16914: Regression test of the worker_spi fails if USE_MODULE_DB environment variable is set.
In-Reply-To: <16914-ca8dd84fef8db291@postgresql.org>
* 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