[libvirt] [PATCH] fchosttest: Run the test only under linux

Michal Privoznik mprivozn at redhat.com
Fri Sep 27 14:51:35 UTC 2013


Currently, we have functions to handle fc_host implemented just
for linux. On all other platforms an error is thrown. It makes no
sense to run the test on those platforms then.

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
 tests/fchosttest.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/fchosttest.c b/tests/fchosttest.c
index 05ff20b..46bd784 100644
--- a/tests/fchosttest.c
+++ b/tests/fchosttest.c
@@ -163,6 +163,11 @@ mymain(void)
 {
     int ret = 0;
 
+#ifndef __linux__
+    fputs("Not compiled under linux, skipping this test\n", stderr);
+    return EXIT_AM_SKIP;
+#endif
+
     if (virAsprintf(&fchost_prefix, "%s/%s", abs_srcdir,
                     "fchostdata/fc_host/") < 0) {
         ret = -1;
-- 
1.8.1.5




More information about the libvir-list mailing list