mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-27 18:03:50 +03:00
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 <jcfaracco@gmail.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
4e1a970219
commit
054a66037d
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user