Make the test driver only support the VIR_TYPED_PARAM_STRING flag for
now.
Signed-off-by: Ilias Stamatis <stamatis.iliass(a)gmail.com>
---
src/test/test_driver.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
mode change 100644 => 100755 src/test/test_driver.c
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
old mode 100644
new mode 100755
index c14603e3af..74de8f13ad
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -1557,6 +1557,34 @@ testConnectGetType(virConnectPtr conn ATTRIBUTE_UNUSED)
return "TEST";
}
+
+static int
+testConnectSupportsFeature(virConnectPtr conn ATTRIBUTE_UNUSED,
+ int feature)
+{
+ switch ((virDrvFeature) feature) {
+ case VIR_DRV_FEATURE_TYPED_PARAM_STRING:
+ return 1;
+ case VIR_DRV_FEATURE_MIGRATION_V2:
+ case VIR_DRV_FEATURE_MIGRATION_V3:
+ case VIR_DRV_FEATURE_MIGRATION_P2P:
+ case VIR_DRV_FEATURE_MIGRATE_CHANGE_PROTECTION:
+ case VIR_DRV_FEATURE_FD_PASSING:
+ case VIR_DRV_FEATURE_XML_MIGRATABLE:
+ case VIR_DRV_FEATURE_MIGRATION_OFFLINE:
+ case VIR_DRV_FEATURE_MIGRATION_PARAMS:
+ case VIR_DRV_FEATURE_MIGRATION_DIRECT:
+ case VIR_DRV_FEATURE_MIGRATION_V1:
+ case VIR_DRV_FEATURE_PROGRAM_KEEPALIVE:
+ case VIR_DRV_FEATURE_REMOTE:
+ case VIR_DRV_FEATURE_REMOTE_CLOSE_CALLBACK:
+ case VIR_DRV_FEATURE_REMOTE_EVENT_CALLBACK:
+ default:
+ return 0;
+ }
+}
+
+
static int testConnectNumOfDomains(virConnectPtr conn)
{
testDriverPtr privconn = conn->privateData;
@@ -7576,6 +7604,7 @@ static virHypervisorDriver testHypervisorDriver = {
.connectGetCapabilities = testConnectGetCapabilities, /* 0.2.1 */
.connectGetSysinfo = testConnectGetSysinfo, /* 2.3.0 */
.connectGetType = testConnectGetType, /* 2.3.0 */
+ .connectSupportsFeature = testConnectSupportsFeature, /* 5.6.0 */
.connectListDomains = testConnectListDomains, /* 0.1.1 */
.connectNumOfDomains = testConnectNumOfDomains, /* 0.1.1 */
.connectListAllDomains = testConnectListAllDomains, /* 0.9.13 */
--
2.22.0