diff --git a/src/test/test_driver.c b/src/test/test_driver.c old mode 100644 new mode 100755 index 3c20f3f525..735142e2ff --- 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; @@ -7874,6 +7902,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 */