From: Tom Lane Date: Mon, 11 Nov 2024 18:57:21 +0000 (-0500) Subject: Fix cross-version upgrade tests. X-Git-Tag: REL_12_21~3 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=9fc1c3a02ddc4cf2a34550c0f985288cea7094bd;p=postgresql.git Fix cross-version upgrade tests. TestUpgradeXversion knows how to make the main regression database's references to pg_regress.so be version-independent. But it doesn't do that for plperl's database, so that the C function added by commit b7e3a52a8 is causing cross-version upgrade test failures. Path of least resistance is to just drop the function at the end of the new test. In <= v14, also take the opportunity to clean up the generated test files. Security: CVE-2024-10979 --- diff --git a/src/pl/plperl/GNUmakefile b/src/pl/plperl/GNUmakefile index a8e2e0f68f5..7d292768140 100644 --- a/src/pl/plperl/GNUmakefile +++ b/src/pl/plperl/GNUmakefile @@ -122,6 +122,7 @@ submake: clean distclean maintainer-clean: clean-lib rm -f SPI.c Util.c $(OBJS) perlchunks.h plperl_opmask.h + rm -f sql/plperl_env.sql expected/plperl_env.out rm -rf $(pg_regress_clean_files) ifeq ($(PORTNAME), win32) rm -f $(perlwithver).def diff --git a/src/pl/plperl/input/plperl_env.source b/src/pl/plperl/input/plperl_env.source index 8fe526e1b8b..49f03acb1dc 100644 --- a/src/pl/plperl/input/plperl_env.source +++ b/src/pl/plperl/input/plperl_env.source @@ -50,3 +50,6 @@ $$ } $$ LANGUAGE plperl; + +-- clean up to simplify cross-version upgrade testing +DROP FUNCTION get_environ(); diff --git a/src/pl/plperl/output/plperl_env.source b/src/pl/plperl/output/plperl_env.source index 37b7e23d5ce..ef75d5d5556 100644 --- a/src/pl/plperl/output/plperl_env.source +++ b/src/pl/plperl/output/plperl_env.source @@ -47,3 +47,5 @@ $$ $$ LANGUAGE plperl; WARNING: attempted alteration of $ENV{TEST_PLPERL_ENV_FOO} at line 12. NOTICE: environ unaffected +-- clean up to simplify cross-version upgrade testing +DROP FUNCTION get_environ();