]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: authconfigtest: move declarations
authorJán Tomko <jtomko@redhat.com>
Tue, 28 Jul 2020 18:11:01 +0000 (20:11 +0200)
committerJán Tomko <jtomko@redhat.com>
Tue, 25 Aug 2020 17:03:12 +0000 (19:03 +0200)
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/virauthconfigtest.c

index a88b4535433cea84b53b4eb80cdfc960712d384e..1bff3debb0d3927735a04d314a85a0725c674986 100644 (file)
@@ -84,20 +84,6 @@ mymain(void)
 
     virAuthConfigPtr config;
 
-#ifndef WIN32
-    signal(SIGPIPE, SIG_IGN);
-#endif /* WIN32 */
-
-#define TEST_LOOKUP(config, hostname, service, credname, expect) \
-    do  { \
-        const struct ConfigLookupData data = { \
-            config, hostname, service, credname, expect \
-        }; \
-        if (virTestRun("Test Lookup " hostname "-" service "-" credname, \
-                        testAuthLookup, &data) < 0) \
-            ret = -1; \
-    } while (0)
-
     const char *confdata =
         "[credentials-test]\n"
         "username=fred\n"
@@ -119,6 +105,20 @@ mymain(void)
         "[auth-libvirt-prod1.example.com]\n"
         "credentials=prod\n";
 
+#define TEST_LOOKUP(config, hostname, service, credname, expect) \
+    do  { \
+        const struct ConfigLookupData data = { \
+            config, hostname, service, credname, expect \
+        }; \
+        if (virTestRun("Test Lookup " hostname "-" service "-" credname, \
+                        testAuthLookup, &data) < 0) \
+            ret = -1; \
+    } while (0)
+
+#ifndef WIN32
+    signal(SIGPIPE, SIG_IGN);
+#endif /* WIN32 */
+
     if (!(config = virAuthConfigNewData("auth.conf", confdata, strlen(confdata))))
         return EXIT_FAILURE;