Commit 8421d887 authored by Simon McVittie's avatar Simon McVittie

bus tests: Shut down audit socket

Some CI environments run build-time tests as root with CAP_AUDIT_WRITE.
In this case we need to close the audit socket so that it will not be
reported as leaked.
Signed-off-by: Simon McVittie's avatarSimon McVittie <smcv@collabora.com>
parent 1b1c5ddd
......@@ -27,6 +27,7 @@
#include <dbus/dbus-test-tap.h>
#include "bus/audit.h"
#include "bus/selinux.h"
#include "test/test-utils.h"
......@@ -44,6 +45,8 @@ test_post_hook (void)
{
if (_dbus_getenv ("DBUS_TEST_SELINUX"))
bus_selinux_shutdown ();
bus_audit_shutdown ();
}
static DBusTestCase test = { "dispatch-sha1", bus_dispatch_sha1_test };
......
......@@ -27,6 +27,7 @@
#include <dbus/dbus-test-tap.h>
#include "bus/audit.h"
#include "bus/selinux.h"
#include "test/test-utils.h"
......@@ -44,6 +45,8 @@ test_post_hook (void)
{
if (_dbus_getenv ("DBUS_TEST_SELINUX"))
bus_selinux_shutdown ();
bus_audit_shutdown ();
}
static DBusTestCase test = { "dispatch", bus_dispatch_test };
......
......@@ -28,6 +28,7 @@
#include <dbus/dbus-test-tap.h>
#include "bus/audit.h"
#include "bus/selinux.h"
#include "test/test-utils.h"
......@@ -45,6 +46,8 @@ test_post_hook (void)
{
if (_dbus_getenv ("DBUS_TEST_SELINUX"))
bus_selinux_shutdown ();
bus_audit_shutdown ();
}
static DBusTestCase tests[] =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment