virCommandSetDryRun: Add flags to linebreak and strip prefix from the command buffer

virCommandToStringFull used internally when virCommandSetDryRun is
requested allows to strip command path and wrap lines nicely. Expose
these via virCommandSetDryRun so that tests can use those features
instead of local hacks.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Peter Krempa committed 2021-04-12 15:55:10 +02:00
1 parent 0dffca8f95
commit 01c357a4c9
11 files changed
+47 -34

No files matched your search

+1 -1
View File
@@ -79,7 +79,7 @@ testVirNetDevBandwidthSet(const void *data)
if (!iface)
iface = "eth0";
virCommandSetDryRun(dryRunToken, &buf, NULL, NULL);
virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL);
if (virNetDevBandwidthSet(iface, band, info->hierarchical_class, true) < 0)
goto cleanup;