summaryrefslogtreecommitdiff
path: root/tests/nodedevxml2xmltest.c
diff options
context:
space:
mode:
authorJonathon Jongsma <jjongsma@redhat.com>2021-07-16 13:46:52 -0500
committerJonathon Jongsma <jjongsma@redhat.com>2021-08-06 15:02:32 -0500
commitd5ae634ba284fcb1aa40634ad3c0a9e820ec916a (patch)
tree488669223d3f4ee37fd0939104e7c3059489fd13 /tests/nodedevxml2xmltest.c
parente44408dd9c45cb4f5e41caef4a9d2b7d2b8eb528 (diff)
downloadlibvirt-d5ae634ba284fcb1aa40634ad3c0a9e820ec916a.tar.gz
nodedev: Add parser validation for node devices
At the moment, this is only for mediated devices. When a new mediated device is created or defined, the xml is expected specify the nodedev name of an existing device as its parent. We were not previously validating this and were simply accepting any string here. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Diffstat (limited to 'tests/nodedevxml2xmltest.c')
-rw-r--r--tests/nodedevxml2xmltest.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/nodedevxml2xmltest.c b/tests/nodedevxml2xmltest.c
index e9716726d7..d8f81456ee 100644
--- a/tests/nodedevxml2xmltest.c
+++ b/tests/nodedevxml2xmltest.c
@@ -25,7 +25,8 @@ testCompareXMLToXMLFiles(const char *xml, const char *outfile)
if (virTestLoadFile(xml, &xmlData) < 0)
goto fail;
- if (!(dev = virNodeDeviceDefParseString(xmlData, EXISTING_DEVICE, NULL)))
+ if (!(dev = virNodeDeviceDefParseString(xmlData, EXISTING_DEVICE, NULL,
+ NULL, NULL)))
goto fail;
/* Calculate some things that are not read in */