]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: consistent skip messages
authorEric Blake <eblake@redhat.com>
Tue, 26 Feb 2013 16:36:27 +0000 (09:36 -0700)
committerEric Blake <eblake@redhat.com>
Tue, 26 Feb 2013 17:06:25 +0000 (10:06 -0700)
On RHEL 5, I noticed this test failure message:

TEST: qemumonitorjsontest
libvirt not compiled with yajl, skippingSKIP: qemumonitorjsontest

* tests/virstoragetest.c (testPrepImages): Use simpler fputs.
* tests/qemumonitorjsontest.c (mymain): Ensure trailing newline.

tests/qemumonitorjsontest.c
tests/virstoragetest.c

index 16e1f98a6fbfb7a6b615d49ad4b454417946a4e1..04b8f7702bbfe5609099e1d1d859a8446fe513b6 100644 (file)
@@ -445,7 +445,7 @@ mymain(void)
     virCapsPtr caps;
 
 #if !WITH_YAJL
-    fprintf(stderr, "libvirt not compiled with yajl, skipping");
+    fputs("libvirt not compiled with yajl, skipping this test\n", stderr);
     return EXIT_AM_SKIP;
 #endif
 
index 9da58f38232789bd3fdf1c88fe2630c445b453fd..6ca7b9a1da20093cf3708136227fc0d26f1d1a92 100644 (file)
@@ -90,7 +90,7 @@ testPrepImages(void)
     if (!qemuimg)
         qemuimg = virFindFileInPath("qemu-img");
     if (!qemuimg) {
-        fprintf(stderr, "qemu-img missing or too old; skipping this test\n");
+        fputs("qemu-img missing or too old; skipping this test\n", stderr);
         return EXIT_AM_SKIP;
     }
 
@@ -136,7 +136,7 @@ testPrepImages(void)
     cmd = virCommandNewArgList("qemu-img", "rebase", "-u", "-f", "qcow2",
                                "-F", "raw", "-b", "raw", "qcow2", NULL);
     if (virCommandRun(cmd, NULL) < 0) {
-        fprintf(stderr, "qemu-img is too old; skipping this test\n");
+        fputs("qemu-img is too old; skipping this test\n", stderr);
         ret = EXIT_AM_SKIP;
         goto cleanup;
     }