summaryrefslogtreecommitdiffstats
path: root/test/TEST-06-SELINUX
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2023-06-05 22:35:05 +0200
committerFrantisek Sumsal <frantisek@sumsal.cz>2023-06-05 22:52:38 +0200
commitfa5dee77c0d86b7b23f9d18ad0281e3b7ff08af9 (patch)
tree2830e8a74ac5db0a42477137b586d6c26ba9272c /test/TEST-06-SELINUX
parenttest: add a reasoning why we don't use the SELinux-provided units (diff)
downloadsystemd-fa5dee77c0d86b7b23f9d18ad0281e3b7ff08af9.tar.xz
systemd-fa5dee77c0d86b7b23f9d18ad0281e3b7ff08af9.zip
test: load the SELinux module outside of the VM
Turns out we can, apart from just building the module, "shove" it into the SELinux database in a chroot as well. This brings quite significant time savings, as the SELinux db rebuild takes 2 - 5 minutes in a VM without acceleration (and takes currently ~half of the runtime of the test in the C8S job).
Diffstat (limited to 'test/TEST-06-SELINUX')
-rwxr-xr-xtest/TEST-06-SELINUX/test.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/TEST-06-SELINUX/test.sh b/test/TEST-06-SELINUX/test.sh
index 5d72638ec6..85be3bed9b 100755
--- a/test/TEST-06-SELINUX/test.sh
+++ b/test/TEST-06-SELINUX/test.sh
@@ -42,16 +42,14 @@ test_append_files() {
fi
mkdir "$workspace/systemd-test-module"
- cp systemd_test.te "$workspace/systemd-test-module"
- cp systemd_test.if "$workspace/systemd-test-module"
- cp systemd_test.fc "$workspace/systemd-test-module"
+ cp -v systemd_test.* "$workspace/systemd-test-module/"
image_install -o sesearch
image_install runcon
image_install checkmodule semodule semodule_package m4 make load_policy sefcontext_compile
image_install -o /usr/libexec/selinux/hll/pp # Fedora/RHEL/...
image_install -o /usr/lib/selinux/hll/pp # Debian/Ubuntu/...
- if ! chroot "$workspace" make -C /systemd-test-module -f /usr/share/selinux/devel/Makefile clean systemd_test.pp; then
+ if ! chroot "$workspace" make -C /systemd-test-module -f /usr/share/selinux/devel/Makefile clean load systemd_test.pp QUIET=n; then
dfatal "Failed to build the systemd test module"
exit 1
fi