test: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Michal Privoznik 2023-08-24 17:03:59 +02:00
parent a3b1b2a6aa
commit 67a89930c0

View File

@ -2710,8 +2710,7 @@ static int testDomainSetMemoryStatsPeriod(virDomainPtr dom,
if (!virDomainDefHasMemballoon(def)) { if (!virDomainDefHasMemballoon(def)) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("No memory balloon device configured, " _("No memory balloon device configured, can not set the collection period"));
"can not set the collection period"));
goto cleanup; goto cleanup;
} }
@ -2746,22 +2745,19 @@ static int testDomainSetMemoryFlags(virDomainPtr domain,
if (flags & VIR_DOMAIN_MEM_MAXIMUM) { if (flags & VIR_DOMAIN_MEM_MAXIMUM) {
if (live) { if (live) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("cannot resize the maximum memory on an " _("cannot resize the maximum memory on an active domain"));
"active domain"));
goto cleanup; goto cleanup;
} }
if (virDomainNumaGetNodeCount(def->numa) > 0) { if (virDomainNumaGetNodeCount(def->numa) > 0) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("initial memory size of a domain with NUMA " _("initial memory size of a domain with NUMA nodes cannot be modified with this API"));
"nodes cannot be modified with this API"));
goto cleanup; goto cleanup;
} }
if (def->mem.max_memory && def->mem.max_memory < memory) { if (def->mem.max_memory && def->mem.max_memory < memory) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("cannot set initial memory size greater than " _("cannot set initial memory size greater than the maximum memory size"));
"the maximum memory size"));
goto cleanup; goto cleanup;
} }
@ -3432,8 +3428,7 @@ testDomainSetMemoryParameters(virDomainPtr dom,
if (mem_limit > swap_limit) { if (mem_limit > swap_limit) {
virReportError(VIR_ERR_INVALID_ARG, "%s", virReportError(VIR_ERR_INVALID_ARG, "%s",
_("memory hard_limit tunable value must be lower " _("memory hard_limit tunable value must be lower than or equal to swap_hard_limit"));
"than or equal to swap_hard_limit"));
goto cleanup; goto cleanup;
} }
} }
@ -3964,32 +3959,28 @@ testDomainSetBlockIoTune(virDomainPtr dom,
if ((info.total_bytes_sec && info.read_bytes_sec) || if ((info.total_bytes_sec && info.read_bytes_sec) ||
(info.total_bytes_sec && info.write_bytes_sec)) { (info.total_bytes_sec && info.write_bytes_sec)) {
virReportError(VIR_ERR_INVALID_ARG, "%s", virReportError(VIR_ERR_INVALID_ARG, "%s",
_("total and read/write of bytes_sec " _("total and read/write of bytes_sec cannot be set at the same time"));
"cannot be set at the same time"));
goto cleanup; goto cleanup;
} }
if ((info.total_iops_sec && info.read_iops_sec) || if ((info.total_iops_sec && info.read_iops_sec) ||
(info.total_iops_sec && info.write_iops_sec)) { (info.total_iops_sec && info.write_iops_sec)) {
virReportError(VIR_ERR_INVALID_ARG, "%s", virReportError(VIR_ERR_INVALID_ARG, "%s",
_("total and read/write of iops_sec " _("total and read/write of iops_sec cannot be set at the same time"));
"cannot be set at the same time"));
goto cleanup; goto cleanup;
} }
if ((info.total_bytes_sec_max && info.read_bytes_sec_max) || if ((info.total_bytes_sec_max && info.read_bytes_sec_max) ||
(info.total_bytes_sec_max && info.write_bytes_sec_max)) { (info.total_bytes_sec_max && info.write_bytes_sec_max)) {
virReportError(VIR_ERR_INVALID_ARG, "%s", virReportError(VIR_ERR_INVALID_ARG, "%s",
_("total and read/write of bytes_sec_max " _("total and read/write of bytes_sec_max cannot be set at the same time"));
"cannot be set at the same time"));
goto cleanup; goto cleanup;
} }
if ((info.total_iops_sec_max && info.read_iops_sec_max) || if ((info.total_iops_sec_max && info.read_iops_sec_max) ||
(info.total_iops_sec_max && info.write_iops_sec_max)) { (info.total_iops_sec_max && info.write_iops_sec_max)) {
virReportError(VIR_ERR_INVALID_ARG, "%s", virReportError(VIR_ERR_INVALID_ARG, "%s",
_("total and read/write of iops_sec_max " _("total and read/write of iops_sec_max cannot be set at the same time"));
"cannot be set at the same time"));
goto cleanup; goto cleanup;
} }
@ -4597,8 +4588,7 @@ static int testDomainUndefineFlags(virDomainPtr domain,
if (privdom->hasManagedSave && if (privdom->hasManagedSave &&
!(flags & VIR_DOMAIN_UNDEFINE_MANAGED_SAVE)) { !(flags & VIR_DOMAIN_UNDEFINE_MANAGED_SAVE)) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("Refusing to undefine while domain managed " _("Refusing to undefine while domain managed save image exists"));
"save image exists"));
goto cleanup; goto cleanup;
} }
@ -6062,8 +6052,7 @@ testInterfaceChangeCommit(virConnectPtr conn,
if (!privconn->transaction_running) { if (!privconn->transaction_running) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("no transaction running, " _("no transaction running, nothing to be committed."));
"nothing to be committed."));
goto cleanup; goto cleanup;
} }
@ -6092,8 +6081,7 @@ testInterfaceChangeRollback(virConnectPtr conn,
if (!privconn->transaction_running) { if (!privconn->transaction_running) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("no transaction running, " _("no transaction running, nothing to rollback."));
"nothing to rollback."));
goto cleanup; goto cleanup;
} }
@ -9024,8 +9012,7 @@ testDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
(flags & (VIR_DOMAIN_SNAPSHOT_REVERT_RUNNING | (flags & (VIR_DOMAIN_SNAPSHOT_REVERT_RUNNING |
VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED)) == 0) { VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED)) == 0) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("transient domain needs to request run or pause " _("transient domain needs to request run or pause to revert to inactive snapshot"));
"to revert to inactive snapshot"));
goto cleanup; goto cleanup;
} }