Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
tests/domaincapstest.c | 8 +++--
...{caps_1.2.2-1.caps => caps_1.2.2-1.x86_64.caps} | 0
...1.2.2-1.replies => caps_1.2.2-1.x86_64.replies} | 0
...{caps_1.3.1-1.caps => caps_1.3.1-1.x86_64.caps} | 0
...1.3.1-1.replies => caps_1.3.1-1.x86_64.replies} | 0
...{caps_1.4.2-1.caps => caps_1.4.2-1.x86_64.caps} | 0
...1.4.2-1.replies => caps_1.4.2-1.x86_64.replies} | 0
...{caps_1.5.3-1.caps => caps_1.5.3-1.x86_64.caps} | 0
...1.5.3-1.replies => caps_1.5.3-1.x86_64.replies} | 0
...{caps_1.6.0-1.caps => caps_1.6.0-1.x86_64.caps} | 0
...1.6.0-1.replies => caps_1.6.0-1.x86_64.replies} | 0
...aps_1.6.50-1.caps => caps_1.6.50-1.x86_64.caps} | 0
...6.50-1.replies => caps_1.6.50-1.x86_64.replies} | 0
...{caps_2.1.1-1.caps => caps_2.1.1-1.x86_64.caps} | 0
...2.1.1-1.replies => caps_2.1.1-1.x86_64.replies} | 0
...{caps_2.4.0-1.caps => caps_2.4.0-1.x86_64.caps} | 0
...2.4.0-1.replies => caps_2.4.0-1.x86_64.replies} | 0
...{caps_2.5.0-1.caps => caps_2.5.0-1.x86_64.caps} | 0
...2.5.0-1.replies => caps_2.5.0-1.x86_64.replies} | 0
...{caps_2.6.0-1.caps => caps_2.6.0-1.x86_64.caps} | 0
...2.6.0-1.replies => caps_2.6.0-1.x86_64.replies} | 0
tests/qemucapabilitiestest.c | 40 ++++++++++++----------
22 files changed, 26 insertions(+), 22 deletions(-)
rename tests/qemucapabilitiesdata/{caps_1.2.2-1.caps => caps_1.2.2-1.x86_64.caps}
(100%)
rename tests/qemucapabilitiesdata/{caps_1.2.2-1.replies =>
caps_1.2.2-1.x86_64.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_1.3.1-1.caps => caps_1.3.1-1.x86_64.caps}
(100%)
rename tests/qemucapabilitiesdata/{caps_1.3.1-1.replies =>
caps_1.3.1-1.x86_64.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_1.4.2-1.caps => caps_1.4.2-1.x86_64.caps}
(100%)
rename tests/qemucapabilitiesdata/{caps_1.4.2-1.replies =>
caps_1.4.2-1.x86_64.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_1.5.3-1.caps => caps_1.5.3-1.x86_64.caps}
(100%)
rename tests/qemucapabilitiesdata/{caps_1.5.3-1.replies =>
caps_1.5.3-1.x86_64.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_1.6.0-1.caps => caps_1.6.0-1.x86_64.caps}
(100%)
rename tests/qemucapabilitiesdata/{caps_1.6.0-1.replies =>
caps_1.6.0-1.x86_64.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_1.6.50-1.caps => caps_1.6.50-1.x86_64.caps}
(100%)
rename tests/qemucapabilitiesdata/{caps_1.6.50-1.replies =>
caps_1.6.50-1.x86_64.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_2.1.1-1.caps => caps_2.1.1-1.x86_64.caps}
(100%)
rename tests/qemucapabilitiesdata/{caps_2.1.1-1.replies =>
caps_2.1.1-1.x86_64.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_2.4.0-1.caps => caps_2.4.0-1.x86_64.caps}
(100%)
rename tests/qemucapabilitiesdata/{caps_2.4.0-1.replies =>
caps_2.4.0-1.x86_64.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_2.5.0-1.caps => caps_2.5.0-1.x86_64.caps}
(100%)
rename tests/qemucapabilitiesdata/{caps_2.5.0-1.replies =>
caps_2.5.0-1.x86_64.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_2.6.0-1.caps => caps_2.6.0-1.x86_64.caps}
(100%)
rename tests/qemucapabilitiesdata/{caps_2.6.0-1.replies =>
caps_2.6.0-1.x86_64.replies} (100%)
diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c
index bfe66b4..1aa6bb1 100644
--- a/tests/domaincapstest.c
+++ b/tests/domaincapstest.c
@@ -95,6 +95,7 @@ fillAllCaps(virDomainCapsPtr domCaps)
static int
fillQemuCaps(virDomainCapsPtr domCaps,
const char *name,
+ virArch arch,
virQEMUDriverConfigPtr cfg)
{
int ret = -1;
@@ -102,8 +103,8 @@ fillQemuCaps(virDomainCapsPtr domCaps,
virQEMUCapsPtr qemuCaps = NULL;
virDomainCapsLoaderPtr loader = &domCaps->os.loader;
- if (virAsprintf(&path, "%s/qemucapabilitiesdata/%s.caps",
- abs_srcdir, name) < 0 ||
+ if (virAsprintf(&path, "%s/qemucapabilitiesdata/%s.%s.caps",
+ abs_srcdir, name, virArchToString(arch)) < 0 ||
!(qemuCaps = qemuTestParseCapabilities(path)))
goto cleanup;
@@ -186,7 +187,8 @@ test_virDomainCapsFormat(const void *opaque)
case CAPS_QEMU:
#if WITH_QEMU
- if (fillQemuCaps(domCaps, data->capsName, data->capsOpaque) < 0)
+ if (fillQemuCaps(domCaps, data->capsName, data->arch,
+ data->capsOpaque) < 0)
goto cleanup;
#endif
break;
diff --git a/tests/qemucapabilitiesdata/caps_1.2.2-1.caps
b/tests/qemucapabilitiesdata/caps_1.2.2-1.x86_64.caps
similarity index 100%
rename from tests/qemucapabilitiesdata/caps_1.2.2-1.caps
rename to tests/qemucapabilitiesdata/caps_1.2.2-1.x86_64.caps
diff --git a/tests/qemucapabilitiesdata/caps_1.2.2-1.replies
b/tests/qemucapabilitiesdata/caps_1.2.2-1.x86_64.replies
similarity index 100%
rename from tests/qemucapabilitiesdata/caps_1.2.2-1.replies
rename to tests/qemucapabilitiesdata/caps_1.2.2-1.x86_64.replies
diff --git a/tests/qemucapabilitiesdata/caps_1.3.1-1.caps
b/tests/qemucapabilitiesdata/caps_1.3.1-1.x86_64.caps
similarity index 100%
rename from tests/qemucapabilitiesdata/caps_1.3.1-1.caps
rename to tests/qemucapabilitiesdata/caps_1.3.1-1.x86_64.caps
diff --git a/tests/qemucapabilitiesdata/caps_1.3.1-1.replies
b/tests/qemucapabilitiesdata/caps_1.3.1-1.x86_64.replies
similarity index 100%
rename from tests/qemucapabilitiesdata/caps_1.3.1-1.replies
rename to tests/qemucapabilitiesdata/caps_1.3.1-1.x86_64.replies
diff --git a/tests/qemucapabilitiesdata/caps_1.4.2-1.caps
b/tests/qemucapabilitiesdata/caps_1.4.2-1.x86_64.caps
similarity index 100%
rename from tests/qemucapabilitiesdata/caps_1.4.2-1.caps
rename to tests/qemucapabilitiesdata/caps_1.4.2-1.x86_64.caps
diff --git a/tests/qemucapabilitiesdata/caps_1.4.2-1.replies
b/tests/qemucapabilitiesdata/caps_1.4.2-1.x86_64.replies
similarity index 100%
rename from tests/qemucapabilitiesdata/caps_1.4.2-1.replies
rename to tests/qemucapabilitiesdata/caps_1.4.2-1.x86_64.replies
diff --git a/tests/qemucapabilitiesdata/caps_1.5.3-1.caps
b/tests/qemucapabilitiesdata/caps_1.5.3-1.x86_64.caps
similarity index 100%
rename from tests/qemucapabilitiesdata/caps_1.5.3-1.caps
rename to tests/qemucapabilitiesdata/caps_1.5.3-1.x86_64.caps
diff --git a/tests/qemucapabilitiesdata/caps_1.5.3-1.replies
b/tests/qemucapabilitiesdata/caps_1.5.3-1.x86_64.replies
similarity index 100%
rename from tests/qemucapabilitiesdata/caps_1.5.3-1.replies
rename to tests/qemucapabilitiesdata/caps_1.5.3-1.x86_64.replies
diff --git a/tests/qemucapabilitiesdata/caps_1.6.0-1.caps
b/tests/qemucapabilitiesdata/caps_1.6.0-1.x86_64.caps
similarity index 100%
rename from tests/qemucapabilitiesdata/caps_1.6.0-1.caps
rename to tests/qemucapabilitiesdata/caps_1.6.0-1.x86_64.caps
diff --git a/tests/qemucapabilitiesdata/caps_1.6.0-1.replies
b/tests/qemucapabilitiesdata/caps_1.6.0-1.x86_64.replies
similarity index 100%
rename from tests/qemucapabilitiesdata/caps_1.6.0-1.replies
rename to tests/qemucapabilitiesdata/caps_1.6.0-1.x86_64.replies
diff --git a/tests/qemucapabilitiesdata/caps_1.6.50-1.caps
b/tests/qemucapabilitiesdata/caps_1.6.50-1.x86_64.caps
similarity index 100%
rename from tests/qemucapabilitiesdata/caps_1.6.50-1.caps
rename to tests/qemucapabilitiesdata/caps_1.6.50-1.x86_64.caps
diff --git a/tests/qemucapabilitiesdata/caps_1.6.50-1.replies
b/tests/qemucapabilitiesdata/caps_1.6.50-1.x86_64.replies
similarity index 100%
rename from tests/qemucapabilitiesdata/caps_1.6.50-1.replies
rename to tests/qemucapabilitiesdata/caps_1.6.50-1.x86_64.replies
diff --git a/tests/qemucapabilitiesdata/caps_2.1.1-1.caps
b/tests/qemucapabilitiesdata/caps_2.1.1-1.x86_64.caps
similarity index 100%
rename from tests/qemucapabilitiesdata/caps_2.1.1-1.caps
rename to tests/qemucapabilitiesdata/caps_2.1.1-1.x86_64.caps
diff --git a/tests/qemucapabilitiesdata/caps_2.1.1-1.replies
b/tests/qemucapabilitiesdata/caps_2.1.1-1.x86_64.replies
similarity index 100%
rename from tests/qemucapabilitiesdata/caps_2.1.1-1.replies
rename to tests/qemucapabilitiesdata/caps_2.1.1-1.x86_64.replies
diff --git a/tests/qemucapabilitiesdata/caps_2.4.0-1.caps
b/tests/qemucapabilitiesdata/caps_2.4.0-1.x86_64.caps
similarity index 100%
rename from tests/qemucapabilitiesdata/caps_2.4.0-1.caps
rename to tests/qemucapabilitiesdata/caps_2.4.0-1.x86_64.caps
diff --git a/tests/qemucapabilitiesdata/caps_2.4.0-1.replies
b/tests/qemucapabilitiesdata/caps_2.4.0-1.x86_64.replies
similarity index 100%
rename from tests/qemucapabilitiesdata/caps_2.4.0-1.replies
rename to tests/qemucapabilitiesdata/caps_2.4.0-1.x86_64.replies
diff --git a/tests/qemucapabilitiesdata/caps_2.5.0-1.caps
b/tests/qemucapabilitiesdata/caps_2.5.0-1.x86_64.caps
similarity index 100%
rename from tests/qemucapabilitiesdata/caps_2.5.0-1.caps
rename to tests/qemucapabilitiesdata/caps_2.5.0-1.x86_64.caps
diff --git a/tests/qemucapabilitiesdata/caps_2.5.0-1.replies
b/tests/qemucapabilitiesdata/caps_2.5.0-1.x86_64.replies
similarity index 100%
rename from tests/qemucapabilitiesdata/caps_2.5.0-1.replies
rename to tests/qemucapabilitiesdata/caps_2.5.0-1.x86_64.replies
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0-1.caps
b/tests/qemucapabilitiesdata/caps_2.6.0-1.x86_64.caps
similarity index 100%
rename from tests/qemucapabilitiesdata/caps_2.6.0-1.caps
rename to tests/qemucapabilitiesdata/caps_2.6.0-1.x86_64.caps
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0-1.replies
b/tests/qemucapabilitiesdata/caps_2.6.0-1.x86_64.replies
similarity index 100%
rename from tests/qemucapabilitiesdata/caps_2.6.0-1.replies
rename to tests/qemucapabilitiesdata/caps_2.6.0-1.x86_64.replies
diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c
index ac9f7a8..dc9fba3 100644
--- a/tests/qemucapabilitiestest.c
+++ b/tests/qemucapabilitiestest.c
@@ -30,6 +30,7 @@ typedef struct _testQemuData testQemuData;
typedef testQemuData *testQemuDataPtr;
struct _testQemuData {
virDomainXMLOptionPtr xmlopt;
+ const char *archName;
const char *base;
};
@@ -120,10 +121,10 @@ testQemuCaps(const void *opaque)
qemuMonitorTestPtr mon = NULL;
virQEMUCapsPtr capsProvided = NULL, capsComputed = NULL;
- if (virAsprintf(&repliesFile, "%s/qemucapabilitiesdata/%s.replies",
- abs_srcdir, data->base) < 0 ||
- virAsprintf(&capsFile, "%s/qemucapabilitiesdata/%s.caps",
- abs_srcdir, data->base) < 0)
+ if (virAsprintf(&repliesFile, "%s/qemucapabilitiesdata/%s.%s.replies",
+ abs_srcdir, data->base, data->archName) < 0 ||
+ virAsprintf(&capsFile, "%s/qemucapabilitiesdata/%s.%s.caps",
+ abs_srcdir, data->base, data->archName) < 0)
goto cleanup;
if (virtTestLoadFile(repliesFile, &replies) < 0)
@@ -176,23 +177,24 @@ mymain(void)
data.xmlopt = driver.xmlopt;
-#define DO_TEST(name) \
- do { \
- data.base = name; \
- if (virtTestRun(name, testQemuCaps, &data) < 0) \
- ret = -1; \
+#define DO_TEST(arch, name) \
+ do { \
+ data.archName = arch; \
+ data.base = name; \
+ if (virtTestRun(name "(" arch ")", testQemuCaps, &data)
< 0) \
+ ret = -1; \
} while (0)
- DO_TEST("caps_1.2.2-1");
- DO_TEST("caps_1.3.1-1");
- DO_TEST("caps_1.4.2-1");
- DO_TEST("caps_1.5.3-1");
- DO_TEST("caps_1.6.0-1");
- DO_TEST("caps_1.6.50-1");
- DO_TEST("caps_2.1.1-1");
- DO_TEST("caps_2.4.0-1");
- DO_TEST("caps_2.5.0-1");
- DO_TEST("caps_2.6.0-1");
+ DO_TEST("x86_64", "caps_1.2.2-1");
+ DO_TEST("x86_64", "caps_1.3.1-1");
+ DO_TEST("x86_64", "caps_1.4.2-1");
+ DO_TEST("x86_64", "caps_1.5.3-1");
+ DO_TEST("x86_64", "caps_1.6.0-1");
+ DO_TEST("x86_64", "caps_1.6.50-1");
+ DO_TEST("x86_64", "caps_2.1.1-1");
+ DO_TEST("x86_64", "caps_2.4.0-1");
+ DO_TEST("x86_64", "caps_2.5.0-1");
+ DO_TEST("x86_64", "caps_2.6.0-1");
/*
* Run "tests/qemucapsprobe /path/to/qemu/binary >foo.replies"
--
2.8.2