diff --git a/src/test/meson.build b/src/test/meson.build index 835be6466e..70450ea1c5 100644 --- a/src/test/meson.build +++ b/src/test/meson.build @@ -757,7 +757,8 @@ tests += [ librt, libblkid, libkmod, - libacl], + libacl, + libselinux], '', 'manual', '-DLOG_REALM=LOG_REALM_UDEV'], [['src/test/test-id128.c'], diff --git a/src/test/test-udev.c b/src/test/test-udev.c index c0b215dadc..a9eda10437 100644 --- a/src/test/test-udev.c +++ b/src/test/test-udev.c @@ -71,6 +71,12 @@ static int run(int argc, char *argv[]) { if (r < 0) return r; + /* Let's make sure the test runs with selinux assumed disabled. */ +#if HAVE_SELINUX + fini_selinuxmnt(); +#endif + mac_selinux_retest(); + if (argc == 2) { if (!streq(argv[1], "check")) { log_error("Unknown argument: %s", argv[1]);