From aeb8ea361a0a321a0e1cbc79a4cd3ec0b1191bf2 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 24 Jan 2025 11:37:20 +0100 Subject: Convert sepgsql tests to TAP Add a TAP test for sepgsql. This automates the previously required manual setup before the test. The actual tests are still run by pg_regress, as before, but now called from within the TAP Perl script. The previous manual test script (test_sepgsql) is left in place, since its purpose is (also) to test whether a running instance was properly initialized for sepgsql. But it has been changed to call pg_regress directly and no longer require make. Reviewed-by: Andreas Karlsson Discussion: https://www.postgresql.org/message-id/flat/651a5baf-5c45-4a5a-a202-0c8453a4ebf8@eisentraut.org --- doc/src/sgml/regress.sgml | 11 +++++++++++ doc/src/sgml/sepgsql.sgml | 17 +++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/regress.sgml b/doc/src/sgml/regress.sgml index f4cef9e80f7..7c474559bdf 100644 --- a/doc/src/sgml/regress.sgml +++ b/doc/src/sgml/regress.sgml @@ -284,6 +284,17 @@ make check-world PG_TEST_EXTRA='kerberos ldap ssl load_balance libpq_encryption' + + sepgsql + + + Runs the test suite under contrib/sepgsql. This + requires an SELinux environment that is set up in a specific way; see + . + + + + ssl diff --git a/doc/src/sgml/sepgsql.sgml b/doc/src/sgml/sepgsql.sgml index ca038d71042..03ed7d1c90d 100644 --- a/doc/src/sgml/sepgsql.sgml +++ b/doc/src/sgml/sepgsql.sgml @@ -151,14 +151,23 @@ $ for DBNAME in template0 template1 postgres; do Regression Tests + + The sepgsql test suite is run if + PG_TEST_EXTRA contains sepgsql (see + ). This method is suitable during + development of PostgreSQL. Alternatively, there + is a way to run the tests to checks whether a database instance has been + set up properly for sepgsql. + + Due to the nature of SELinux, running the regression tests for sepgsql requires several extra configuration steps, some of which must be done as root. - The regression tests will not be run by an ordinary - make check or make installcheck command; you must - set up the configuration and then invoke the test script manually. - The tests must be run in the contrib/sepgsql directory + + + + The manual tests must be run in the contrib/sepgsql directory of a configured PostgreSQL build tree. Although they require a build tree, the tests are designed to be executed against an installed server, that is they are comparable to make installcheck not -- cgit v1.2.3