From nobody Mon Feb 9 01:48:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1617808265; cv=none; d=zohomail.com; s=zohoarc; b=BFQ/ofZp4Fp2r3Aibce7mTKBZleGLkwqhzkrwLAHlCAmHocrPx1nyzFKmJcD8dAH1Do39OShuM7xtpJtJBkmduz2VNRscLicLBq9TnozbGX2OQ0ORqXAcwHON6CZSmME06EIikNfW/9vmzXb2Pmh90qLIu5gaOkk9rMIWx1Y+ag= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1617808265; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lXLc0kvll4HcN/VPOT4Cgj1FiAl9mc9KHcvx2JIAxDY=; b=njA5cexcFp4w+jFM0NHARFxOp2BQ1CfEUwQUKgLzRqPQ6DhDN9AcXdHAvRB8MfuyNKnttojDR5zUn02XJrVZnJiVs1ysM3W5t7Zsot4sZobTyj6eV0tRlkqrEFeed9daQHxmZtsZs43Hx9rAdQvSBaqBtdh3KGdmR5unmOVCpRw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1617808265442665.1103880890364; Wed, 7 Apr 2021 08:11:05 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-165-mhOo-NQCPRKMTpqdSqcLtw-1; Wed, 07 Apr 2021 11:10:23 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 70D5481746A; Wed, 7 Apr 2021 15:10:16 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0CF7319D9D; Wed, 7 Apr 2021 15:10:16 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A9AA91806D12; Wed, 7 Apr 2021 15:10:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 137FAEq0031864 for ; Wed, 7 Apr 2021 11:10:14 -0400 Received: by smtp.corp.redhat.com (Postfix) id A5EFC19D9D; Wed, 7 Apr 2021 15:10:14 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 03D9819D9F for ; Wed, 7 Apr 2021 15:10:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617808264; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=lXLc0kvll4HcN/VPOT4Cgj1FiAl9mc9KHcvx2JIAxDY=; b=dw3/QQwERYSjUhlaJhy2J+vvkKL5hMH9ac8kJONOIyDvN2zkkKJIOT9TbwoU6TO1gn1P6B Hin7tPhsG/VJxrMulVRIX6qN6rfXFtohnWJ4k04XES7NTo9RAZPp1EMaK6bRtZQGT1aYJ0 qUrrt/z3rbIGmqXmH39SLckCwBhWE+0= X-MC-Unique: mhOo-NQCPRKMTpqdSqcLtw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 08/24] virCommandSetDryRun: Add flags to linebreak and strip prefix from the command buffer Date: Wed, 7 Apr 2021 17:09:31 +0200 Message-Id: <656c9d695573882a91fbfadc020b0a8727d10909.1617807877.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" 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 --- src/util/vircommand.c | 21 ++++++++++++++++----- src/util/vircommandpriv.h | 2 ++ tests/networkxml2firewalltest.c | 2 +- tests/nodedevmdevctltest.c | 4 ++-- tests/nwfilterebiptablestest.c | 14 +++++++------- tests/nwfilterxml2firewalltest.c | 2 +- tests/sysinfotest.c | 2 +- tests/virfirewalltest.c | 20 ++++++++++---------- tests/viriscsitest.c | 6 +++--- tests/virkmodtest.c | 4 ++-- tests/virnetdevbandwidthtest.c | 2 +- 11 files changed, 46 insertions(+), 33 deletions(-) diff --git a/src/util/vircommand.c b/src/util/vircommand.c index 7b2588f5c8..3eb4f3a6d5 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -158,6 +158,8 @@ struct _virCommand { /* See virCommandSetDryRun for description for this variable */ static virBufferPtr dryRunBuffer; +static bool dryRunBufferArgLinebreaks; +static bool dryRunBufferCommandStripPath; static virCommandDryRunCallback dryRunCallback; static void *dryRunOpaque; #ifndef WIN32 @@ -2585,18 +2587,18 @@ virCommandRunAsync(virCommandPtr cmd, pid_t *pid) goto cleanup; } - str =3D virCommandToString(cmd, false); if (dryRunBuffer || dryRunCallback) { + g_autofree char *cmdstr =3D NULL; dryRunStatus =3D 0; - if (!str) { - /* error already reported by virCommandToString */ + + if (!(cmdstr =3D virCommandToStringFull(cmd, dryRunBufferArgLinebr= eaks, + dryRunBufferCommandStripPath= ))) goto cleanup; - } if (dryRunBuffer) { VIR_DEBUG("Dry run requested, appending stringified " "command to dryRunBuffer=3D%p", dryRunBuffer); - virBufferAdd(dryRunBuffer, str, -1); + virBufferAdd(dryRunBuffer, cmdstr, -1); virBufferAddChar(dryRunBuffer, '\n'); } if (dryRunCallback) { @@ -2609,6 +2611,7 @@ virCommandRunAsync(virCommandPtr cmd, pid_t *pid) goto cleanup; } + str =3D virCommandToString(cmd, false); VIR_DEBUG("About to run %s", str ? str : cmd->args[0]); ret =3D virExec(cmd); VIR_DEBUG("Command result %d, with PID %d", @@ -3102,6 +3105,8 @@ virCommandDoAsyncIO(virCommandPtr cmd) /** * virCommandSetDryRun: * @buf: buffer to store stringified commands + * @bufArgLinebreaks: add linebreaks after command and every argument or a= rgument pair + * @bufCommandStripPath: strip leading paths of command * @callback: callback to process input/output/args * * Sometimes it's desired to not actually run given command, but @@ -3134,10 +3139,14 @@ virCommandDoAsyncIO(virCommandPtr cmd) void virCommandSetDryRun(virCommandDryRunToken tok G_GNUC_UNUSED, virBufferPtr buf, + bool bufArgLinebreaks, + bool bufCommandStripPath, virCommandDryRunCallback cb, void *opaque) { dryRunBuffer =3D buf; + dryRunBufferArgLinebreaks =3D bufArgLinebreaks; + dryRunBufferCommandStripPath =3D bufCommandStripPath; dryRunCallback =3D cb; dryRunOpaque =3D opaque; } @@ -3147,6 +3156,8 @@ void virCommandDryRunResetHelper(virCommandDryRunToken *tok G_GNUC_UNUSED) { dryRunBuffer =3D NULL; + dryRunBufferArgLinebreaks =3D false; + dryRunBufferCommandStripPath =3D false; dryRunCallback =3D NULL; dryRunOpaque =3D NULL; } diff --git a/src/util/vircommandpriv.h b/src/util/vircommandpriv.h index 8a47a6d5e3..23a604ccd9 100644 --- a/src/util/vircommandpriv.h +++ b/src/util/vircommandpriv.h @@ -39,6 +39,8 @@ typedef int virCommandDryRunToken; void virCommandSetDryRun(virCommandDryRunToken tok, virBufferPtr buf, + bool bufArgLinebreaks, + bool bufCommandStripPath, virCommandDryRunCallback cb, void *opaque); diff --git a/tests/networkxml2firewalltest.c b/tests/networkxml2firewalltes= t.c index 574b553fa6..2e4ff59fa6 100644 --- a/tests/networkxml2firewalltest.c +++ b/tests/networkxml2firewalltest.c @@ -98,7 +98,7 @@ static int testCompareXMLToArgvFiles(const char *xml, char *actual; VIR_COMMAND_DRY_RUN_TOKEN; - virCommandSetDryRun(dryRunToken, &buf, testCommandDryRun, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, testCommandDryRun= , NULL); if (!(def =3D virNetworkDefParseFile(xml, NULL))) goto cleanup; diff --git a/tests/nodedevmdevctltest.c b/tests/nodedevmdevctltest.c index ce8e5e85f6..bd32519498 100644 --- a/tests/nodedevmdevctltest.c +++ b/tests/nodedevmdevctltest.c @@ -72,7 +72,7 @@ testMdevctlStart(const char *virt_type, if (!cmd) goto cleanup; - virCommandSetDryRun(dryRunToken, &buf, testCommandDryRunCallback, &std= inbuf); + virCommandSetDryRun(dryRunToken, &buf, false, false, testCommandDryRun= Callback, &stdinbuf); if (virCommandRun(cmd, NULL) < 0) goto cleanup; @@ -127,7 +127,7 @@ testMdevctlStop(const void *data) if (!cmd) goto cleanup; - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); if (virCommandRun(cmd, NULL) < 0) goto cleanup; diff --git a/tests/nwfilterebiptablestest.c b/tests/nwfilterebiptablestest.c index 0893548c0a..14601031a7 100644 --- a/tests/nwfilterebiptablestest.c +++ b/tests/nwfilterebiptablestest.c @@ -105,7 +105,7 @@ testNWFilterEBIPTablesAllTeardown(const void *opaque G_= GNUC_UNUSED) int ret =3D -1; VIR_COMMAND_DRY_RUN_TOKEN; - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); if (ebiptables_driver.allTeardown("vnet0") < 0) goto cleanup; @@ -172,7 +172,7 @@ testNWFilterEBIPTablesTearOldRules(const void *opaque G= _GNUC_UNUSED) int ret =3D -1; VIR_COMMAND_DRY_RUN_TOKEN; - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); if (ebiptables_driver.tearOldRules("vnet0") < 0) goto cleanup; @@ -217,7 +217,7 @@ testNWFilterEBIPTablesRemoveBasicRules(const void *opaq= ue G_GNUC_UNUSED) int ret =3D -1; VIR_COMMAND_DRY_RUN_TOKEN; - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); if (ebiptables_driver.removeBasicRules("vnet0") < 0) goto cleanup; @@ -247,7 +247,7 @@ testNWFilterEBIPTablesTearNewRules(const void *opaque G= _GNUC_UNUSED) int ret =3D -1; VIR_COMMAND_DRY_RUN_TOKEN; - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); if (ebiptables_driver.tearNewRules("vnet0") < 0) goto cleanup; @@ -315,7 +315,7 @@ testNWFilterEBIPTablesApplyBasicRules(const void *opaqu= e G_GNUC_UNUSED) virMacAddr mac =3D { .addr =3D { 0x10, 0x20, 0x30, 0x40, 0x50, 0x60 } = }; VIR_COMMAND_DRY_RUN_TOKEN; - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); if (ebiptables_driver.applyBasicRules("vnet0", &mac) < 0) goto cleanup; @@ -401,7 +401,7 @@ testNWFilterEBIPTablesApplyDHCPOnlyRules(const void *op= aque G_GNUC_UNUSED) }; VIR_COMMAND_DRY_RUN_TOKEN; - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); if (ebiptables_driver.applyDHCPOnlyRules("vnet0", &mac, &val, false) <= 0) goto cleanup; @@ -470,7 +470,7 @@ testNWFilterEBIPTablesApplyDropAllRules(const void *opa= que G_GNUC_UNUSED) int ret =3D -1; VIR_COMMAND_DRY_RUN_TOKEN; - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); if (ebiptables_driver.applyDropAllRules("vnet0") < 0) goto cleanup; diff --git a/tests/nwfilterxml2firewalltest.c b/tests/nwfilterxml2firewallt= est.c index a3b8ae70c1..446461c122 100644 --- a/tests/nwfilterxml2firewalltest.c +++ b/tests/nwfilterxml2firewalltest.c @@ -375,7 +375,7 @@ static int testCompareXMLToArgvFiles(const char *xml, memset(&inst, 0, sizeof(inst)); - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); if (!vars) goto cleanup; diff --git a/tests/sysinfotest.c b/tests/sysinfotest.c index 85687e995a..b3bab0a627 100644 --- a/tests/sysinfotest.c +++ b/tests/sysinfotest.c @@ -102,7 +102,7 @@ testSysinfo(const void *data) cpuinfo =3D g_strdup_printf("%s/sysinfodata/%scpuinfo.data", abs_srcdi= r, testdata->name); expected =3D g_strdup_printf("%s/sysinfodata/%ssysinfo.expect", abs_sr= cdir, testdata->name); - virCommandSetDryRun(dryRunToken, NULL, testDMIDecodeDryRun, sysinfo); + virCommandSetDryRun(dryRunToken, NULL, false, false, testDMIDecodeDryR= un, sysinfo); virSysinfoSetup(sysinfo, cpuinfo); diff --git a/tests/virfirewalltest.c b/tests/virfirewalltest.c index c442aca9da..80b287acdb 100644 --- a/tests/virfirewalltest.c +++ b/tests/virfirewalltest.c @@ -197,7 +197,7 @@ testFirewallSingleGroup(const void *opaque) if (data->expectBackend =3D=3D VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend =3D=3D VIR_FIREWALL_BACKEND_FIREWALLD) - virCommandSetDryRun(dryRunToken, &cmdbuf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, false, false, NULL, NULL= ); else fwBuf =3D &cmdbuf; @@ -251,7 +251,7 @@ testFirewallRemoveRule(const void *opaque) if (data->expectBackend =3D=3D VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend =3D=3D VIR_FIREWALL_BACKEND_FIREWALLD) - virCommandSetDryRun(dryRunToken, &cmdbuf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, false, false, NULL, NULL= ); else fwBuf =3D &cmdbuf; @@ -312,7 +312,7 @@ testFirewallManyGroups(const void *opaque G_GNUC_UNUSED) if (data->expectBackend =3D=3D VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend =3D=3D VIR_FIREWALL_BACKEND_FIREWALLD) - virCommandSetDryRun(dryRunToken, &cmdbuf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, false, false, NULL, NULL= ); else fwBuf =3D &cmdbuf; @@ -400,7 +400,7 @@ testFirewallIgnoreFailGroup(const void *opaque G_GNUC_U= NUSED) if (data->expectBackend =3D=3D VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend =3D=3D VIR_FIREWALL_BACKEND_FIREWALLD) { - virCommandSetDryRun(dryRunToken, &cmdbuf, testFirewallRollbackHook= , NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, false, false, testFirewa= llRollbackHook, NULL); } else { fwBuf =3D &cmdbuf; fwError =3D true; @@ -469,7 +469,7 @@ testFirewallIgnoreFailRule(const void *opaque G_GNUC_UN= USED) if (data->expectBackend =3D=3D VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend =3D=3D VIR_FIREWALL_BACKEND_FIREWALLD) { - virCommandSetDryRun(dryRunToken, &cmdbuf, testFirewallRollbackHook= , NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, false, false, testFirewa= llRollbackHook, NULL); } else { fwBuf =3D &cmdbuf; fwError =3D true; @@ -535,7 +535,7 @@ testFirewallNoRollback(const void *opaque G_GNUC_UNUSED) if (data->expectBackend =3D=3D VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend =3D=3D VIR_FIREWALL_BACKEND_FIREWALLD) { - virCommandSetDryRun(dryRunToken, &cmdbuf, testFirewallRollbackHook= , NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, false, false, testFirewa= llRollbackHook, NULL); } else { fwBuf =3D &cmdbuf; fwError =3D true; @@ -599,7 +599,7 @@ testFirewallSingleRollback(const void *opaque G_GNUC_UN= USED) if (data->expectBackend =3D=3D VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend =3D=3D VIR_FIREWALL_BACKEND_FIREWALLD) { - virCommandSetDryRun(dryRunToken, &cmdbuf, testFirewallRollbackHook= , NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, false, false, testFirewa= llRollbackHook, NULL); } else { fwError =3D true; fwBuf =3D &cmdbuf; @@ -679,7 +679,7 @@ testFirewallManyRollback(const void *opaque G_GNUC_UNUS= ED) if (data->expectBackend =3D=3D VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend =3D=3D VIR_FIREWALL_BACKEND_FIREWALLD) { - virCommandSetDryRun(dryRunToken, &cmdbuf, testFirewallRollbackHook= , NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, false, false, testFirewa= llRollbackHook, NULL); } else { fwBuf =3D &cmdbuf; fwError =3D true; @@ -767,7 +767,7 @@ testFirewallChainedRollback(const void *opaque G_GNUC_U= NUSED) if (data->expectBackend =3D=3D VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend =3D=3D VIR_FIREWALL_BACKEND_FIREWALLD) { - virCommandSetDryRun(dryRunToken, &cmdbuf, testFirewallRollbackHook= , NULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, false, false, testFirewa= llRollbackHook, NULL); } else { fwBuf =3D &cmdbuf; fwError =3D true; @@ -963,7 +963,7 @@ testFirewallQuery(const void *opaque G_GNUC_UNUSED) if (data->expectBackend =3D=3D VIR_FIREWALL_BACKEND_DIRECT || data->expectBackend =3D=3D VIR_FIREWALL_BACKEND_FIREWALLD) { - virCommandSetDryRun(dryRunToken, &cmdbuf, testFirewallQueryHook, N= ULL); + virCommandSetDryRun(dryRunToken, &cmdbuf, false, false, testFirewa= llQueryHook, NULL); } else { fwBuf =3D &cmdbuf; fwError =3D true; diff --git a/tests/viriscsitest.c b/tests/viriscsitest.c index 2927e235cd..de50ec3770 100644 --- a/tests/viriscsitest.c +++ b/tests/viriscsitest.c @@ -216,7 +216,7 @@ testISCSIGetSession(const void *data) cbData.output_version =3D info->output_version; - virCommandSetDryRun(dryRunToken, NULL, testIscsiadmCb, &cbData); + virCommandSetDryRun(dryRunToken, NULL, false, false, testIscsiadmCb, &= cbData); actual_session =3D virISCSIGetSession(info->device_path, true); @@ -252,7 +252,7 @@ testISCSIScanTargets(const void *data) size_t i; VIR_COMMAND_DRY_RUN_TOKEN; - virCommandSetDryRun(dryRunToken, NULL, testIscsiadmCb, NULL); + virCommandSetDryRun(dryRunToken, NULL, false, false, testIscsiadmCb, N= ULL); if (virISCSIScanTargets(info->portal, NULL, false, &ntargets, &targets) < 0) @@ -299,7 +299,7 @@ testISCSIConnectionLogin(const void *data) int ret =3D -1; VIR_COMMAND_DRY_RUN_TOKEN; - virCommandSetDryRun(dryRunToken, NULL, testIscsiadmCb, &cbData); + virCommandSetDryRun(dryRunToken, NULL, false, false, testIscsiadmCb, &= cbData); if (virISCSIConnectionLogin(info->portal, info->initiatoriqn, info->ta= rget) < 0) goto cleanup; diff --git a/tests/virkmodtest.c b/tests/virkmodtest.c index 725c204667..c4bd098740 100644 --- a/tests/virkmodtest.c +++ b/tests/virkmodtest.c @@ -63,7 +63,7 @@ testKModLoad(const void *args G_GNUC_UNUSED) g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; VIR_COMMAND_DRY_RUN_TOKEN; - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); errbuf =3D virKModLoad(MODNAME); if (errbuf) { @@ -90,7 +90,7 @@ testKModUnload(const void *args G_GNUC_UNUSED) g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; VIR_COMMAND_DRY_RUN_TOKEN; - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); errbuf =3D virKModUnload(MODNAME); if (errbuf) { diff --git a/tests/virnetdevbandwidthtest.c b/tests/virnetdevbandwidthtest.c index 5233fc47d3..640d10d300 100644 --- a/tests/virnetdevbandwidthtest.c +++ b/tests/virnetdevbandwidthtest.c @@ -79,7 +79,7 @@ testVirNetDevBandwidthSet(const void *data) if (!iface) iface =3D "eth0"; - virCommandSetDryRun(dryRunToken, &buf, NULL, NULL); + virCommandSetDryRun(dryRunToken, &buf, false, false, NULL, NULL); if (virNetDevBandwidthSet(iface, band, info->hierarchical_class, true)= < 0) goto cleanup; --=20 2.30.2