Test libvirtd's config-processing code.

And remove a minor diagnostic inconsistency.
* tests/daemon-conf: New test.
* tests/Makefile.am (TESTS_ENVIRONMENT): Prepend qemud/ to PATH,
so we can invoke libvirtd without an absolute name.
(test_scripts): Add daemon-conf.
* qemud/qemud.c (remoteConfigGetAuth): Use checkType,
rather than open-coding it with a different diagnostic.
This commit is contained in:
Jim Meyering
2007-12-11 21:20:13 +00:00
parent ac6bb7e131
commit 5a190594f4
4 changed files with 79 additions and 3 deletions
+1 -3
View File
@@ -1783,10 +1783,8 @@ static int remoteConfigGetAuth(virConfPtr conf, const char *key, int *auth, cons
if (!p)
return 0;
if (p->type != VIR_CONF_STRING) {
qemudLog (QEMUD_ERR, "remoteReadConfigFile: %s: %s: should be a string\n", filename, key);
if (checkType (p, filename, key, VIR_CONF_STRING) < 0)
return -1;
}
if (!p->str)
return 0;