diskxmljsondata.driver = &driver;
- if (!(capslatest_x86_64 = testQemuGetLatestCapsForArch(abs_srcdir "/qemucapabilitiesdata",
- "x86_64", "xml")))
+ if (!(capslatest_x86_64 = testQemuGetLatestCapsForArch("x86_64", "xml")))
return EXIT_FAILURE;
VIR_TEST_VERBOSE("\nlatest caps x86_64: %s\n", capslatest_x86_64);
char *
-testQemuGetLatestCapsForArch(const char *dirname,
- const char *arch,
+testQemuGetLatestCapsForArch(const char *arch,
const char *suffix)
{
struct dirent *ent;
if (virAsprintf(&fullsuffix, "%s.%s", arch, suffix) < 0)
goto cleanup;
- if (virDirOpen(&dir, dirname) < 0)
+ if (virDirOpen(&dir, TEST_QEMU_CAPS_PATH) < 0)
goto cleanup;
- while ((rc = virDirRead(dir, &ent, dirname)) > 0) {
+ while ((rc = virDirRead(dir, &ent, TEST_QEMU_CAPS_PATH)) > 0) {
VIR_FREE(tmp);
if ((rc = VIR_STRDUP(tmp, STRSKIP(ent->d_name, "caps_"))) < 0)
if (!maxname) {
VIR_TEST_VERBOSE("failed to find capabilities for '%s' in '%s'\n",
- arch, dirname);
+ arch, TEST_QEMU_CAPS_PATH);
goto cleanup;
}
- ignore_value(virAsprintf(&ret, "%s/%s", dirname, maxname));
+ ignore_value(virAsprintf(&ret, "%s/%s", TEST_QEMU_CAPS_PATH, maxname));
cleanup:
VIR_FREE(tmp);
VIR_TEST_VERBOSE("\n");
for (i = 0; i < ARRAY_CARDINALITY(archs); ++i) {
- char *cap = testQemuGetLatestCapsForArch(abs_srcdir "/qemucapabilitiesdata",
- archs[i], "xml");
+ char *cap = testQemuGetLatestCapsForArch(archs[i], "xml");
if (!cap || virHashAddEntry(capslatest, archs[i], cap) < 0)
goto error;
int testQemuCapsSetGIC(virQEMUCapsPtr qemuCaps,
int gic);
-char *testQemuGetLatestCapsForArch(const char *dirname,
- const char *arch,
+char *testQemuGetLatestCapsForArch(const char *arch,
const char *suffix);
virHashTablePtr testQemuGetLatestCaps(void);
virJSONValuePtr reply = NULL;
virJSONValuePtr schema = NULL;
- if (!(capsLatestFile = testQemuGetLatestCapsForArch(abs_srcdir "/qemucapabilitiesdata",
- "x86_64", "replies"))) {
+ if (!(capsLatestFile = testQemuGetLatestCapsForArch("x86_64", "replies"))) {
VIR_TEST_VERBOSE("failed to find latest caps replies\n");
return NULL;
}