From b4fdda9a095b81f51f29343feffd87aa305a70c2 Mon Sep 17 00:00:00 2001 From: Michael Nguyen Date: Thu, 28 Apr 2022 07:48:36 -0400 Subject: [PATCH] tests: check for avc denials around daemon-reload xref https://bugzilla.redhat.com/show_bug.cgi?id=1924869 --- tests/kola/systemd/systemd-daemon-reload-avc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 tests/kola/systemd/systemd-daemon-reload-avc diff --git a/tests/kola/systemd/systemd-daemon-reload-avc b/tests/kola/systemd/systemd-daemon-reload-avc new file mode 100755 index 0000000000..c071952825 --- /dev/null +++ b/tests/kola/systemd/systemd-daemon-reload-avc @@ -0,0 +1,18 @@ +#!/bin/bash +# kola: { "exclusive": true } +# Verify there are no AVC denial before and after reloading the systemd manager configuration +# +# https://bugzilla.redhat.com/show_bug.cgi?id=1924869 +set -xeuo pipefail + +. $KOLA_EXT_DATA/commonlib.sh + +if ausearch -m avc | grep 'avc: denied'; then + fatal "Found AVC denials" +fi + +systemctl daemon-reload + +if ausearch -m avc | grep 'avc: denied'; then + fatal "Found AVC denials after systemctl daemon-reload" +fi