contrib/sepgsql regression tests have been broken for months

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Cc: Joe Conway <mail@joeconway.com>
Date: 2025-10-23T21:36:01Z
Lists: pgsql-hackers

Attachments

I tried to run contrib/sepgsql's regression tests today, and was
rather astonished when they failed.  Investigating, there are
some context lines like "LINE 1: ALTER TABLE regtest_table_4
ALTER COLUMN y TYPE float;" in the test output that were not there
before.  A bit of bisecting showed that the change happened with

65281391a937293db7fa747be218def0e9794550 is the first bad commit
commit 65281391a937293db7fa747be218def0e9794550 (HEAD)
Author: Michael Paquier <michael@paquier.xyz>
Date:   Mon Jan 27 13:51:23 2025 +0900

    Print out error position for some ALTER TABLE ALTER COLUMN type

So, okay, that's a perfectly respectable thing to do, and I can't
really fault Michael or Jian for not having tested its effects on
sepgsql.  But how come it took this long to notice?

I think that rhinoceros is the only BF member testing with
--with-selinux.  Looking at its logs, it is running the sepgsql tests
(as a custom module) in v17 and before, but not in v18 or HEAD.
I suppose that this is a consequence of trying to rely on the
TAP-test infrastructure that was installed by aeb8ea361 (just a few
days before the aforesaid change, as luck would have it).  That TAP
test does work for me, but it does not run on rhinoceros because
(1) there's no --enable-tap-tests in its configure command, and
(2) it doesn't set up environment variable PG_TEST_EXTRA to include
"sepgsql".

Anyway, we seem to need the attached in v18 and HEAD,
and we really ought to get BF coverage going again.

			regards, tom lane

Commits

  1. Update expected output for contrib/sepgsql's regression tests.

  2. Print out error position for some ALTER TABLE ALTER COLUMN type