Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit cc4ff87

Browse files
committed
Take sepgsql regression tests out of the regular regression test mechanism.
Because these tests require root privileges, not to mention invasive changes to the security configuration of the host system, it's not reasonable for them to be invoked by a regular "make check" or "make installcheck". Instead, dike out the Makefile's knowledge of the tests, and change chkselinuxenv (now renamed "test_sepgsql") into a script that verifies the environment is workable and then runs the tests. It's expected that test_sepgsql will only be run manually. While at it, do some cleanup in the error checking in the script, and do some wordsmithing in the documentation.
1 parent bbd38af commit cc4ff87

File tree

4 files changed

+419
-363
lines changed

4 files changed

+419
-363
lines changed

contrib/sepgsql/Makefile

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ OBJS = hooks.o selinux.o uavc.o label.o dml.o \
55
database.o schema.o relation.o proc.o
66
DATA_built = sepgsql.sql
77

8-
REGRESS = label dml misc
9-
REGRESS_PREP = check_selinux_environment
10-
REGRESS_OPTS = --launcher $(top_builddir)/contrib/sepgsql/launcher
11-
12-
EXTRA_CLEAN = -r tmp *.pp sepgsql-regtest.if sepgsql-regtest.fc
8+
# Note: because we don't tell the Makefile there are any regression tests,
9+
# we have to clean those result files explicitly
10+
EXTRA_CLEAN = -r $(pg_regress_clean_files) tmp/ *.pp sepgsql-regtest.if sepgsql-regtest.fc
1311

1412
ifdef USE_PGXS
1513
PG_CONFIG = pg_config
@@ -23,6 +21,3 @@ include $(top_srcdir)/contrib/contrib-global.mk
2321
endif
2422

2523
SHLIB_LINK += -lselinux
26-
27-
check_selinux_environment:
28-
@$(top_builddir)/contrib/sepgsql/chkselinuxenv "$(bindir)" "$(datadir)"

contrib/sepgsql/chkselinuxenv

Lines changed: 0 additions & 230 deletions
This file was deleted.

0 commit comments

Comments
 (0)