[PATCH 01/12] tests/qemucapabilities: Separate inputDir and outputDir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We'll need this later.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 tests/qemucapabilitiestest.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c
index a9a1e75587..bb4ce74a29 100644
--- a/tests/qemucapabilitiestest.c
+++ b/tests/qemucapabilitiestest.c
@@ -35,7 +35,8 @@ typedef struct _testQemuData testQemuData;
 typedef testQemuData *testQemuDataPtr;
 struct _testQemuData {
     virQEMUDriver driver;
-    const char *dataDir;
+    const char *inputDir;
+    const char *outputDir;
     const char *archName;
     const char *base;
     int ret;
@@ -48,7 +49,8 @@ testQemuDataInit(testQemuDataPtr data)
     if (qemuTestDriverInit(&data->driver) < 0)
         return -1;
 
-    data->dataDir = TEST_QEMU_CAPS_PATH;
+    data->inputDir = TEST_QEMU_CAPS_PATH;
+    data->outputDir = TEST_QEMU_CAPS_PATH;
 
     data->ret = 0;
 
@@ -77,9 +79,9 @@ testQemuCaps(const void *opaque)
     const char *p;
 
     if (virAsprintf(&repliesFile, "%s/%s.%s.replies",
-                    data->dataDir, data->base, data->archName) < 0 ||
+                    data->inputDir, data->base, data->archName) < 0 ||
         virAsprintf(&capsFile, "%s/%s.%s.xml",
-                    data->dataDir, data->base, data->archName) < 0)
+                    data->outputDir, data->base, data->archName) < 0)
         goto cleanup;
 
     if (!(mon = qemuMonitorTestNewFromFileFull(repliesFile, &data->driver, NULL,
@@ -146,7 +148,7 @@ testQemuCapsCopy(const void *opaque)
     char *actual = NULL;
 
     if (virAsprintf(&capsFile, "%s/%s.%s.xml",
-                    data->dataDir, data->base, data->archName) < 0)
+                    data->outputDir, data->base, data->archName) < 0)
         goto cleanup;
 
     if (!(caps = virCapabilitiesNew(virArchFromString(data->archName),
-- 
2.21.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux