Our tests should use either VIRT_TEST_MAIN() or
VIRT_TEST_MAIN_PRELOAD() macros which create main() function and
call the passed callback subsequently. This is important because
the wrapper which calls the callback eventually does important
stuff like setting logging based on env variables and such.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
virauthconfigtest_LDADD = $(LDADDS)
seclabeltest_SOURCES = \
- seclabeltest.c
+ seclabeltest.c testutils.h testutils.c
seclabeltest_LDADD = $(LDADDS)
if WITH_SECDRIVER_SELINUX
#include <errno.h>
#include "security/security_driver.h"
#include "virrandom.h"
+#include "testutils.h"
-int
-main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+static int
+mymain(void)
{
virSecurityManagerPtr mgr;
const char *doi, *model;
return 0;
}
+
+VIRT_TEST_MAIN(mymain)