From 054a66037dc0cb9834e05b7582804fa22e04db1d Mon Sep 17 00:00:00 2001 From: Julio Faracco Date: Tue, 1 May 2018 12:56:09 -0300 Subject: [PATCH] test: avoid slash characters to the new domain name. As QEMU driver, test driver does not accept slashes inside domain names. This commit fixes this problem checking slashes inside the new name when 'domrename' is executed. Signed-off-by: Julio Faracco Reviewed-by: John Ferlan --- src/test/test_driver.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index a1888c0c9f..974369f28a 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -2638,6 +2638,12 @@ testDomainRenameCallback(virDomainObjPtr privdom, virCheckFlags(0, -1); + if (strchr(new_name, '/')) { + virReportError(VIR_ERR_XML_ERROR, + _("name %s cannot contain '/'"), new_name); + return -1; + } + if (VIR_STRDUP(new_dom_name, new_name) < 0) goto cleanup; -- GitLab