1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-23 21:34:54 +03:00
libvirt/tests/seclabeltest.c
Peng Liang 48e8c36b05 tests: Remove unused includes
Signed-off-by: Peng Liang <tcx4c70@gmail.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-06-16 06:43:58 +02:00

39 lines
853 B
C

#include <config.h>
#include <unistd.h>
#include "security/security_driver.h"
#include "testutils.h"
static int
mymain(void)
{
virSecurityManager *mgr;
const char *doi, *model;
mgr = virSecurityManagerNew(NULL, "QEMU", VIR_SECURITY_MANAGER_DEFAULT_CONFINED);
if (mgr == NULL) {
fprintf(stderr, "Failed to start security driver");
return EXIT_FAILURE;
}
model = virSecurityManagerGetModel(mgr);
if (!model) {
fprintf(stderr, "Failed to copy secModel model: %s",
g_strerror(errno));
return EXIT_FAILURE;
}
doi = virSecurityManagerGetDOI(mgr);
if (!doi) {
fprintf(stderr, "Failed to copy secModel DOI: %s",
g_strerror(errno));
return EXIT_FAILURE;
}
virObjectUnref(mgr);
return EXIT_SUCCESS;
}
VIR_TEST_MAIN(mymain)