[libvirt PATCH 00/17] drop meson checks for runtime binaries

Recent attempt to add a lot of meson options to specify different runtime paths motivated me enough to cleanup this from meson. Pavel Hrdina (17): bridge_driver: fix comment about dnsmasqCaps virdnsmasq: drop unused dnsmasqCapsNewFromFile function virdnsmasq: drop unused dnsmasqCapsRefresh function virdnsmasq: remove binaryPath argument from dnsmasqCapsNewFromBuffer virdnsmasq: remove binaryPath argument from dnsmasqCapsNewFromBinary virfirewall: use virFindFileInPath instead of virFileIsExecutable tests: introduce virfirewallmock tests: use virfirewallmock instead of hasNetfilterTools virnetdev: move virNetDevSetRootQDisc to virnetdevbandwidth tests: testutilsqemu: move virFindFileInPath into domaincapsmock meson: don't check collie as program for sheepdog bhyvexml2argvtest: use virCommandToStringFull to strip command path storage: use virFindFileInPath to validate presence of mkfs virfile: introduce virFindFileInPathFull() qemu_conf: use virFindFileInPathFull for runtime binaries meson: drop check for runtime binary dependencies meson: optional_programs should be used only for building libvirt meson.build | 180 +----------------- src/bhyve/bhyve_command.c | 4 + src/libvirt_private.syms | 6 +- src/locking/lock_driver_lockd.c | 12 +- src/network/bridge_driver.c | 8 +- src/node_device/node_device_driver.c | 2 + src/qemu/qemu_conf.c | 23 ++- src/qemu/qemu_domain.c | 3 +- src/storage/storage_backend_fs.c | 24 +-- src/storage/storage_backend_logical.c | 13 ++ src/storage/storage_backend_sheepdog.c | 2 + src/storage/storage_backend_zfs.c | 3 + src/storage/storage_util.c | 2 + src/storage/storage_util.h | 6 + src/util/virdnsmasq.c | 56 +----- src/util/virdnsmasq.h | 8 +- src/util/virfile.c | 16 +- src/util/virfile.h | 6 +- src/util/virfirewall.c | 4 +- src/util/virfirewall.h | 4 + src/util/viriscsi.h | 2 + src/util/virkmod.h | 3 + src/util/virnetdev.c | 46 ----- src/util/virnetdev.h | 4 - src/util/virnetdevbandwidth.c | 50 +++++ src/util/virnetdevbandwidth.h | 6 + src/util/virnetdevip.c | 2 + src/util/virnetdevmidonet.c | 2 + src/util/virnetdevopenvswitch.c | 2 + src/util/virnuma.c | 1 + src/util/virsysinfo.c | 1 + src/util/virutil.c | 2 + .../bhyvexml2argv-acpiapic.args | 2 +- .../bhyvexml2argv-acpiapic.ldargs | 2 +- ...ml2argv-addr-isa-controller-on-slot-1.args | 2 +- ...2argv-addr-isa-controller-on-slot-1.ldargs | 2 +- ...l2argv-addr-isa-controller-on-slot-31.args | 2 +- ...argv-addr-isa-controller-on-slot-31.ldargs | 2 +- ...xml2argv-addr-more-than-32-sata-disks.args | 2 +- ...l2argv-addr-more-than-32-sata-disks.ldargs | 2 +- ...hyvexml2argv-addr-multiple-sata-disks.args | 2 +- ...vexml2argv-addr-multiple-sata-disks.ldargs | 2 +- ...vexml2argv-addr-multiple-virtio-disks.args | 2 +- ...xml2argv-addr-multiple-virtio-disks.ldargs | 2 +- ...rgv-addr-no32devs-multiple-sata-disks.args | 2 +- ...v-addr-no32devs-multiple-sata-disks.ldargs | 2 +- ...l2argv-addr-no32devs-single-sata-disk.args | 2 +- ...argv-addr-no32devs-single-sata-disk.ldargs | 2 +- ...rgv-addr-non-isa-controller-on-slot-1.args | 2 +- .../bhyvexml2argv-addr-single-sata-disk.args | 2 +- ...bhyvexml2argv-addr-single-sata-disk.ldargs | 2 +- ...bhyvexml2argv-addr-single-virtio-disk.args | 2 +- ...yvexml2argv-addr-single-virtio-disk.ldargs | 2 +- .../bhyvexml2argvdata/bhyvexml2argv-base.args | 2 +- .../bhyvexml2argv-base.ldargs | 2 +- .../bhyvexml2argv-bhyveload-bootorder.args | 2 +- .../bhyvexml2argv-bhyveload-bootorder.ldargs | 2 +- .../bhyvexml2argv-bhyveload-bootorder1.args | 2 +- .../bhyvexml2argv-bhyveload-bootorder1.ldargs | 2 +- .../bhyvexml2argv-bhyveload-bootorder3.args | 2 +- .../bhyvexml2argv-bhyveload-bootorder3.ldargs | 2 +- .../bhyvexml2argv-bhyveload-explicitargs.args | 2 +- ...hyvexml2argv-bhyveload-explicitargs.ldargs | 2 +- .../bhyvexml2argv-commandline.args | 2 +- .../bhyvexml2argv-commandline.ldargs | 2 +- ...gv-console-master-slave-not-specified.args | 2 +- ...-console-master-slave-not-specified.ldargs | 2 +- .../bhyvexml2argv-console.args | 2 +- .../bhyvexml2argv-console.ldargs | 2 +- .../bhyvexml2argv-cputopology.args | 2 +- .../bhyvexml2argv-cputopology.ldargs | 2 +- .../bhyvexml2argv-custom-loader.args | 2 +- .../bhyvexml2argv-custom-loader.ldargs | 2 +- .../bhyvexml2argv-disk-cdrom-grub.args | 2 +- .../bhyvexml2argv-disk-cdrom-grub.ldargs | 2 +- .../bhyvexml2argv-disk-cdrom.args | 2 +- .../bhyvexml2argv-disk-cdrom.ldargs | 2 +- .../bhyvexml2argv-disk-virtio.args | 2 +- .../bhyvexml2argv-disk-virtio.ldargs | 2 +- .../bhyvexml2argv-firmware-efi.args | 2 +- .../bhyvexml2argv-fs-9p-readonly.args | 2 +- .../bhyvexml2argv-fs-9p-readonly.ldargs | 2 +- .../bhyvexml2argv-fs-9p.args | 2 +- .../bhyvexml2argv-fs-9p.ldargs | 2 +- .../bhyvexml2argv-grub-bootorder.args | 2 +- .../bhyvexml2argv-grub-bootorder.ldargs | 2 +- .../bhyvexml2argv-grub-bootorder2.args | 2 +- .../bhyvexml2argv-grub-bootorder2.ldargs | 2 +- .../bhyvexml2argv-grub-defaults.args | 2 +- .../bhyvexml2argv-grub-defaults.ldargs | 2 +- .../bhyvexml2argv-input-xhci-tablet.args | 2 +- .../bhyvexml2argv-input-xhci-tablet.ldargs | 2 +- .../bhyvexml2argv-isa-controller.args | 2 +- .../bhyvexml2argv-isa-controller.ldargs | 2 +- .../bhyvexml2argv-localtime.args | 2 +- .../bhyvexml2argv-localtime.ldargs | 2 +- .../bhyvexml2argv-macaddr.args | 2 +- .../bhyvexml2argv-macaddr.ldargs | 2 +- .../bhyvexml2argvdata/bhyvexml2argv-msrs.args | 2 +- .../bhyvexml2argv-msrs.ldargs | 2 +- .../bhyvexml2argv-net-e1000.args | 2 +- .../bhyvexml2argv-net-e1000.ldargs | 2 +- .../bhyvexml2argv-serial-grub-nocons.args | 2 +- .../bhyvexml2argv-serial-grub-nocons.ldargs | 2 +- .../bhyvexml2argv-serial-grub.args | 2 +- .../bhyvexml2argv-serial-grub.ldargs | 2 +- .../bhyvexml2argv-serial.args | 2 +- .../bhyvexml2argv-serial.ldargs | 2 +- .../bhyvexml2argv-sound.args | 2 +- .../bhyvexml2argv-sound.ldargs | 2 +- .../bhyvexml2argvdata/bhyvexml2argv-uefi.args | 2 +- .../bhyvexml2argv-vnc-autoport.args | 2 +- .../bhyvexml2argv-vnc-password.args | 2 +- .../bhyvexml2argv-vnc-resolution.args | 2 +- .../bhyvexml2argv-vnc-vgaconf-io.args | 2 +- .../bhyvexml2argv-vnc-vgaconf-off.args | 2 +- .../bhyvexml2argv-vnc-vgaconf-on.args | 2 +- .../bhyvexml2argvdata/bhyvexml2argv-vnc.args | 2 +- .../bhyvexml2argv-wired.args | 2 +- .../bhyvexml2argv-wired.ldargs | 2 +- tests/bhyvexml2argvtest.c | 4 +- tests/domaincapsmock.c | 17 ++ tests/meson.build | 1 + tests/networkxml2conftest.c | 6 +- tests/networkxml2firewalltest.c | 16 +- tests/nwfilterebiptablestest.c | 15 +- tests/nwfilterxml2firewalltest.c | 14 +- tests/qemuxml2argvmock.c | 5 +- tests/testutilsqemu.c | 15 -- tests/virfirewallmock.c | 35 ++++ tests/virfirewalltest.c | 15 +- 131 files changed, 340 insertions(+), 482 deletions(-) create mode 100644 tests/virfirewallmock.c -- 2.30.2

We will never call dnsmasqCapsRefresh() so reflect what actually happens. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/network/bridge_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 1172dbbc18..706a557ee8 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -748,7 +748,7 @@ networkStateInitialize(bool privileged, false, getpid())) < 0) goto error; - /* if this fails now, it will be retried later with dnsmasqCapsRefresh() */ + /* if this fails now, it will be retried later with networkDnsmasqCapsRefresh() */ network_driver->dnsmasqCaps = dnsmasqCapsNewFromBinary(DNSMASQ); if (!(network_driver->networks = virNetworkObjListNew())) -- 2.30.2

Instead of removing binaryPath let's drop the function completely as it is not used anywhere. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/libvirt_private.syms | 1 - src/util/virdnsmasq.c | 30 ------------------------------ src/util/virdnsmasq.h | 2 -- 3 files changed, 33 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 0fcbf546a6..982e3bb68d 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2090,7 +2090,6 @@ dnsmasqCapsGetBinaryPath; dnsmasqCapsGetVersion; dnsmasqCapsNewFromBinary; dnsmasqCapsNewFromBuffer; -dnsmasqCapsNewFromFile; dnsmasqCapsRefresh; dnsmasqContextFree; dnsmasqContextNew; diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c index 3db718c1d9..57f7ef67f1 100644 --- a/src/util/virdnsmasq.c +++ b/src/util/virdnsmasq.c @@ -673,21 +673,6 @@ dnsmasqCapsSetFromBuffer(dnsmasqCaps *caps, const char *buf) } -static int -dnsmasqCapsSetFromFile(dnsmasqCaps *caps, const char *path) -{ - int ret = -1; - g_autofree char *buf = NULL; - - if (virFileReadAll(path, 1024 * 1024, &buf) < 0) - goto cleanup; - - ret = dnsmasqCapsSetFromBuffer(caps, buf); - - cleanup: - return ret; -} - static int dnsmasqCapsRefreshInternal(dnsmasqCaps *caps, bool force) { @@ -773,21 +758,6 @@ dnsmasqCapsNewFromBuffer(const char *buf, const char *binaryPath) return caps; } -dnsmasqCaps * -dnsmasqCapsNewFromFile(const char *dataPath, const char *binaryPath) -{ - dnsmasqCaps *caps = dnsmasqCapsNewEmpty(binaryPath); - - if (!caps) - return NULL; - - if (dnsmasqCapsSetFromFile(caps, dataPath) < 0) { - virObjectUnref(caps); - return NULL; - } - return caps; -} - dnsmasqCaps * dnsmasqCapsNewFromBinary(const char *binaryPath) { diff --git a/src/util/virdnsmasq.h b/src/util/virdnsmasq.h index 6cdc619d8f..09e6164dc0 100644 --- a/src/util/virdnsmasq.h +++ b/src/util/virdnsmasq.h @@ -101,8 +101,6 @@ int dnsmasqReload(pid_t pid); dnsmasqCaps *dnsmasqCapsNewFromBuffer(const char *buf, const char *binaryPath); -dnsmasqCaps *dnsmasqCapsNewFromFile(const char *dataPath, - const char *binaryPath); dnsmasqCaps *dnsmasqCapsNewFromBinary(const char *binaryPath); int dnsmasqCapsRefresh(dnsmasqCaps **caps, const char *binaryPath); bool dnsmasqCapsGet(dnsmasqCaps *caps, dnsmasqCapsFlags flag); -- 2.30.2

Instead of removing binaryPath let's drop the function completely as it is not used anywhere. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/libvirt_private.syms | 1 - src/util/virdnsmasq.c | 17 ----------------- src/util/virdnsmasq.h | 1 - 3 files changed, 19 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 982e3bb68d..912c328821 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2090,7 +2090,6 @@ dnsmasqCapsGetBinaryPath; dnsmasqCapsGetVersion; dnsmasqCapsNewFromBinary; dnsmasqCapsNewFromBuffer; -dnsmasqCapsRefresh; dnsmasqContextFree; dnsmasqContextNew; dnsmasqDelete; diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c index 57f7ef67f1..89f33c22a8 100644 --- a/src/util/virdnsmasq.c +++ b/src/util/virdnsmasq.c @@ -773,23 +773,6 @@ dnsmasqCapsNewFromBinary(const char *binaryPath) return caps; } -/** dnsmasqCapsRefresh: - * - * Refresh an existing caps object if the binary has changed. If - * there isn't yet a caps object (if it's NULL), create a new one. - * - * Returns 0 on success, -1 on failure - */ -int -dnsmasqCapsRefresh(dnsmasqCaps **caps, const char *binaryPath) -{ - if (!*caps) { - *caps = dnsmasqCapsNewFromBinary(binaryPath); - return *caps ? 0 : -1; - } - return dnsmasqCapsRefreshInternal(*caps, false); -} - const char * dnsmasqCapsGetBinaryPath(dnsmasqCaps *caps) { diff --git a/src/util/virdnsmasq.h b/src/util/virdnsmasq.h index 09e6164dc0..8b9474f774 100644 --- a/src/util/virdnsmasq.h +++ b/src/util/virdnsmasq.h @@ -102,7 +102,6 @@ int dnsmasqReload(pid_t pid); dnsmasqCaps *dnsmasqCapsNewFromBuffer(const char *buf, const char *binaryPath); dnsmasqCaps *dnsmasqCapsNewFromBinary(const char *binaryPath); -int dnsmasqCapsRefresh(dnsmasqCaps **caps, const char *binaryPath); bool dnsmasqCapsGet(dnsmasqCaps *caps, dnsmasqCapsFlags flag); const char *dnsmasqCapsGetBinaryPath(dnsmasqCaps *caps); unsigned long dnsmasqCapsGetVersion(dnsmasqCaps *caps); -- 2.30.2

We always pass DNSMASQ so there is no need for the argument at all. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/util/virdnsmasq.c | 4 ++-- src/util/virdnsmasq.h | 3 +-- tests/networkxml2conftest.c | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c index 89f33c22a8..82a26e83e9 100644 --- a/src/util/virdnsmasq.c +++ b/src/util/virdnsmasq.c @@ -744,9 +744,9 @@ dnsmasqCapsNewEmpty(const char *binaryPath) } dnsmasqCaps * -dnsmasqCapsNewFromBuffer(const char *buf, const char *binaryPath) +dnsmasqCapsNewFromBuffer(const char *buf) { - dnsmasqCaps *caps = dnsmasqCapsNewEmpty(binaryPath); + dnsmasqCaps *caps = dnsmasqCapsNewEmpty(DNSMASQ); if (!caps) return NULL; diff --git a/src/util/virdnsmasq.h b/src/util/virdnsmasq.h index 8b9474f774..cf6d50fe38 100644 --- a/src/util/virdnsmasq.h +++ b/src/util/virdnsmasq.h @@ -99,8 +99,7 @@ int dnsmasqSave(const dnsmasqContext *ctx); int dnsmasqDelete(const dnsmasqContext *ctx); int dnsmasqReload(pid_t pid); -dnsmasqCaps *dnsmasqCapsNewFromBuffer(const char *buf, - const char *binaryPath); +dnsmasqCaps *dnsmasqCapsNewFromBuffer(const char *buf); dnsmasqCaps *dnsmasqCapsNewFromBinary(const char *binaryPath); bool dnsmasqCapsGet(dnsmasqCaps *caps, dnsmasqCapsFlags flag); const char *dnsmasqCapsGetBinaryPath(dnsmasqCaps *caps); diff --git a/tests/networkxml2conftest.c b/tests/networkxml2conftest.c index 402244ea4a..7444390b77 100644 --- a/tests/networkxml2conftest.c +++ b/tests/networkxml2conftest.c @@ -123,11 +123,11 @@ mymain(void) { int ret = 0; dnsmasqCaps *restricted - = dnsmasqCapsNewFromBuffer("Dnsmasq version 2.48", DNSMASQ); + = dnsmasqCapsNewFromBuffer("Dnsmasq version 2.48"); dnsmasqCaps *full - = dnsmasqCapsNewFromBuffer("Dnsmasq version 2.63\n--bind-dynamic", DNSMASQ); + = dnsmasqCapsNewFromBuffer("Dnsmasq version 2.63\n--bind-dynamic"); dnsmasqCaps *dhcpv6 - = dnsmasqCapsNewFromBuffer("Dnsmasq version 2.64\n--bind-dynamic", DNSMASQ); + = dnsmasqCapsNewFromBuffer("Dnsmasq version 2.64\n--bind-dynamic"); #define DO_TEST(xname, xcaps) \ do { \ -- 2.30.2

We always pass DNSMASQ so there is no need for the argument at all. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/network/bridge_driver.c | 4 ++-- src/util/virdnsmasq.c | 4 ++-- src/util/virdnsmasq.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 706a557ee8..ee3f9dab0a 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -130,7 +130,7 @@ networkDnsmasqCapsRefresh(virNetworkDriverState *driver) { dnsmasqCaps *caps; - if (!(caps = dnsmasqCapsNewFromBinary(DNSMASQ))) + if (!(caps = dnsmasqCapsNewFromBinary())) return -1; networkDriverLock(driver); @@ -749,7 +749,7 @@ networkStateInitialize(bool privileged, goto error; /* if this fails now, it will be retried later with networkDnsmasqCapsRefresh() */ - network_driver->dnsmasqCaps = dnsmasqCapsNewFromBinary(DNSMASQ); + network_driver->dnsmasqCaps = dnsmasqCapsNewFromBinary(); if (!(network_driver->networks = virNetworkObjListNew())) goto error; diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c index 82a26e83e9..f2f606913f 100644 --- a/src/util/virdnsmasq.c +++ b/src/util/virdnsmasq.c @@ -759,9 +759,9 @@ dnsmasqCapsNewFromBuffer(const char *buf) } dnsmasqCaps * -dnsmasqCapsNewFromBinary(const char *binaryPath) +dnsmasqCapsNewFromBinary(void) { - dnsmasqCaps *caps = dnsmasqCapsNewEmpty(binaryPath); + dnsmasqCaps *caps = dnsmasqCapsNewEmpty(DNSMASQ); if (!caps) return NULL; diff --git a/src/util/virdnsmasq.h b/src/util/virdnsmasq.h index cf6d50fe38..ee9839cd25 100644 --- a/src/util/virdnsmasq.h +++ b/src/util/virdnsmasq.h @@ -100,7 +100,7 @@ int dnsmasqDelete(const dnsmasqContext *ctx); int dnsmasqReload(pid_t pid); dnsmasqCaps *dnsmasqCapsNewFromBuffer(const char *buf); -dnsmasqCaps *dnsmasqCapsNewFromBinary(const char *binaryPath); +dnsmasqCaps *dnsmasqCapsNewFromBinary(void); bool dnsmasqCapsGet(dnsmasqCaps *caps, dnsmasqCapsFlags flag); const char *dnsmasqCapsGetBinaryPath(dnsmasqCaps *caps); unsigned long dnsmasqCapsGetVersion(dnsmasqCaps *caps); -- 2.30.2

Following patches will make this change necessary as we will stop detecting the full path during compile time. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/util/virfirewall.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/virfirewall.c b/src/util/virfirewall.c index 78aa7e580e..e79fe52ac8 100644 --- a/src/util/virfirewall.c +++ b/src/util/virfirewall.c @@ -104,7 +104,9 @@ virFirewallValidateBackend(virFirewallBackend backend) size_t i; for (i = 0; i < G_N_ELEMENTS(commands); i++) { - if (!virFileIsExecutable(commands[i])) { + g_autofree char *path = virFindFileInPath(commands[i]); + + if (!path) { virReportSystemError(errno, _("%s not available, firewall backend will not function"), commands[i]); -- 2.30.2

This will allow us to run tests using firewall on hosts where the mocked binaries are not available/installed instead of skipping these tests. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/util/virfile.h | 3 ++- tests/meson.build | 1 + tests/virfirewallmock.c | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 tests/virfirewallmock.c diff --git a/src/util/virfile.h b/src/util/virfile.h index a02779f0ec..b9f7b1766f 100644 --- a/src/util/virfile.h +++ b/src/util/virfile.h @@ -184,7 +184,8 @@ int virFileResolveAllLinks(const char *linkpath, int virFileIsLink(const char *linkpath) ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT; -char *virFindFileInPath(const char *file); +char *virFindFileInPath(const char *file) + G_GNUC_NO_INLINE; char *virFileFindResource(const char *filename, const char *builddir, diff --git a/tests/meson.build b/tests/meson.build index 3f66861332..05c3e90195 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -60,6 +60,7 @@ mock_libs = [ { 'name': 'shunload', 'sources': [ 'shunloadhelper.c' ] }, { 'name': 'vircgroupmock' }, { 'name': 'virfilecachemock' }, + { 'name': 'virfirewallmock' }, { 'name': 'virgdbusmock' }, { 'name': 'virhostcpumock' }, { 'name': 'virhostdevmock' }, diff --git a/tests/virfirewallmock.c b/tests/virfirewallmock.c new file mode 100644 index 0000000000..6b096701c9 --- /dev/null +++ b/tests/virfirewallmock.c @@ -0,0 +1,34 @@ +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * <http://www.gnu.org/licenses/>. + */ + +#include <config.h> + +#include "internal.h" +#include "virfile.h" + +char * +virFindFileInPath(const char *file) +{ + if (file && + (g_strrstr(file, "ebtables") || + g_strrstr(file, "iptables") || + g_strrstr(file, "ip6tables"))) { + return g_strdup(file); + } + + /* We should not need any other binaries so return NULL. */ + return NULL; +} -- 2.30.2

Instead of checking for specific error that the binaries are not available mock the virFindFileInPath function. This way we don't have to skip these tests on host where the binaries are missing. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- tests/networkxml2firewalltest.c | 16 ++-------------- tests/nwfilterebiptablestest.c | 15 +-------------- tests/nwfilterxml2firewalltest.c | 14 +------------- tests/virfirewalltest.c | 15 ++------------- 4 files changed, 6 insertions(+), 54 deletions(-) diff --git a/tests/networkxml2firewalltest.c b/tests/networkxml2firewalltest.c index 80ba510d14..91336a0c55 100644 --- a/tests/networkxml2firewalltest.c +++ b/tests/networkxml2firewalltest.c @@ -152,14 +152,6 @@ testCompareXMLToIPTablesHelper(const void *data) return result; } -static bool -hasNetfilterTools(void) -{ - return virFileIsExecutable(IPTABLES_PATH) && - virFileIsExecutable(IP6TABLES_PATH) && - virFileIsExecutable(EBTABLES_PATH); -} - static int mymain(void) @@ -179,11 +171,6 @@ mymain(void) } while (0) if (virFirewallSetBackend(VIR_FIREWALL_BACKEND_DIRECT) < 0) { - if (!hasNetfilterTools()) { - fprintf(stderr, "iptables/ip6tables/ebtables tools not present"); - return EXIT_AM_SKIP; - } - return EXIT_FAILURE; } @@ -203,7 +190,8 @@ mymain(void) return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; } -VIR_TEST_MAIN_PRELOAD(mymain, VIR_TEST_MOCK("virgdbus")) +VIR_TEST_MAIN_PRELOAD(mymain, VIR_TEST_MOCK("virgdbus"), + VIR_TEST_MOCK("virfirewall")) #else /* ! defined (__linux__) */ diff --git a/tests/nwfilterebiptablestest.c b/tests/nwfilterebiptablestest.c index 5f504cbe64..65b63959fb 100644 --- a/tests/nwfilterebiptablestest.c +++ b/tests/nwfilterebiptablestest.c @@ -482,14 +482,6 @@ testNWFilterEBIPTablesApplyDropAllRules(const void *opaque G_GNUC_UNUSED) return ret; } -static bool -hasNetfilterTools(void) -{ - return virFileIsExecutable(IPTABLES_PATH) && - virFileIsExecutable(IP6TABLES_PATH) && - virFileIsExecutable(EBTABLES_PATH); -} - static int mymain(void) @@ -497,11 +489,6 @@ mymain(void) int ret = 0; if (virFirewallSetBackend(VIR_FIREWALL_BACKEND_DIRECT) < 0) { - if (!hasNetfilterTools()) { - fprintf(stderr, "iptables/ip6tables/ebtables tools not present"); - return EXIT_AM_SKIP; - } - return EXIT_FAILURE; } @@ -543,4 +530,4 @@ mymain(void) return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; } -VIR_TEST_MAIN(mymain) +VIR_TEST_MAIN_PRELOAD(mymain, VIR_TEST_MOCK("virfirewall")) diff --git a/tests/nwfilterxml2firewalltest.c b/tests/nwfilterxml2firewalltest.c index 560372b802..6709cc15fd 100644 --- a/tests/nwfilterxml2firewalltest.c +++ b/tests/nwfilterxml2firewalltest.c @@ -431,14 +431,6 @@ testCompareXMLToIPTablesHelper(const void *data) return result; } -static bool -hasNetfilterTools(void) -{ - return virFileIsExecutable(IPTABLES_PATH) && - virFileIsExecutable(IP6TABLES_PATH) && - virFileIsExecutable(EBTABLES_PATH); -} - static int mymain(void) @@ -456,10 +448,6 @@ mymain(void) } while (0) if (virFirewallSetBackend(VIR_FIREWALL_BACKEND_DIRECT) < 0) { - if (!hasNetfilterTools()) { - fprintf(stderr, "iptables/ip6tables/ebtables tools not present"); - return EXIT_AM_SKIP; - } return EXIT_FAILURE; } @@ -506,7 +494,7 @@ mymain(void) return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; } -VIR_TEST_MAIN(mymain) +VIR_TEST_MAIN_PRELOAD(mymain, VIR_TEST_MOCK("virfirewall")) #else /* ! defined (__linux__) */ diff --git a/tests/virfirewalltest.c b/tests/virfirewalltest.c index 8e65fa8524..ac039f3bbf 100644 --- a/tests/virfirewalltest.c +++ b/tests/virfirewalltest.c @@ -1034,24 +1034,12 @@ testFirewallQuery(const void *opaque G_GNUC_UNUSED) return ret; } -static bool -hasNetfilterTools(void) -{ - return virFileIsExecutable(IPTABLES_PATH) && - virFileIsExecutable(IP6TABLES_PATH) && - virFileIsExecutable(EBTABLES_PATH); -} static int mymain(void) { int ret = 0; - if (!hasNetfilterTools()) { - fprintf(stderr, "iptables/ip6tables/ebtables tools not present"); - return EXIT_AM_SKIP; - } - # define RUN_TEST_DIRECT(name, method) \ do { \ struct testFirewallData data; \ @@ -1100,7 +1088,8 @@ mymain(void) return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; } -VIR_TEST_MAIN_PRELOAD(mymain, VIR_TEST_MOCK("virgdbus")) +VIR_TEST_MAIN_PRELOAD(mymain, VIR_TEST_MOCK("virgdbus"), + VIR_TEST_MOCK("virfirewall")) #else /* ! defined (__linux__) */ -- 2.30.2

The function in question uses "tc" binary so virnetdevbandwidth feels like better place for it. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/libvirt_private.syms | 2 +- src/qemu/qemu_domain.c | 3 ++- src/util/virnetdev.c | 46 -------------------------------- src/util/virnetdev.h | 4 --- src/util/virnetdevbandwidth.c | 50 +++++++++++++++++++++++++++++++++++ src/util/virnetdevbandwidth.h | 4 +++ tests/qemuxml2argvmock.c | 5 ++-- 7 files changed, 60 insertions(+), 54 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 912c328821..d507a858ac 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2713,7 +2713,6 @@ virNetDevSetOnline; virNetDevSetPromiscuous; virNetDevSetRcvAllMulti; virNetDevSetRcvMulti; -virNetDevSetRootQDisc; virNetDevSetupControl; virNetDevSysfsFile; virNetDevValidateConfig; @@ -2727,6 +2726,7 @@ virNetDevBandwidthEqual; virNetDevBandwidthFree; virNetDevBandwidthPlug; virNetDevBandwidthSet; +virNetDevBandwidthSetRootQDisc; virNetDevBandwidthUnplug; virNetDevBandwidthUpdateFilter; virNetDevBandwidthUpdateRate; diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 2c8ea39840..6e3e3555c7 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -50,6 +50,7 @@ #include "domain_event.h" #include "domain_validate.h" #include "virtime.h" +#include "virnetdevbandwidth.h" #include "virnetdevopenvswitch.h" #include "virstoragefile.h" #include "storage_source.h" @@ -11571,7 +11572,7 @@ qemuDomainInterfaceSetDefaultQDisc(virQEMUDriver *driver, actualType == VIR_DOMAIN_NET_TYPE_NETWORK || actualType == VIR_DOMAIN_NET_TYPE_BRIDGE || actualType == VIR_DOMAIN_NET_TYPE_DIRECT) { - if (virNetDevSetRootQDisc(net->ifname, "noqueue") < 0) + if (virNetDevBandwidthSetRootQDisc(net->ifname, "noqueue") < 0) return -1; } diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index 86abdc2e5b..1870f3f875 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -3507,52 +3507,6 @@ virNetDevRunEthernetScript(const char *ifname, const char *script) } -/** - * virNetDevSetRootQDisc: - * @ifname: the interface name - * @qdisc: queueing discipline to set - * - * For given interface @ifname set its root queueing discipline - * to @qdisc. This can be used to replace the default qdisc - * (usually pfifo_fast or whatever is set in - * /proc/sys/net/core/default_qdisc) with different qdisc. - * - * Returns: 0 on success, - * -1 if failed to exec tc (with error reported) - * -2 if tc failed (with no error reported) - */ -int -virNetDevSetRootQDisc(const char *ifname, - const char *qdisc) -{ - g_autoptr(virCommand) cmd = NULL; - g_autofree char *outbuf = NULL; - g_autofree char *errbuf = NULL; - int status; - - /* Ideally, we would have a netlink implementation and just - * call it here. But honestly, I tried and failed miserably. - * Fallback to spawning tc. */ - cmd = virCommandNewArgList(TC, "qdisc", "add", "dev", ifname, - "root", "handle", "0:", qdisc, - NULL); - - virCommandAddEnvString(cmd, "LC_ALL=C"); - virCommandSetOutputBuffer(cmd, &outbuf); - virCommandSetErrorBuffer(cmd, &errbuf); - - if (virCommandRun(cmd, &status) < 0) - return -1; - - if (status != 0) { - VIR_DEBUG("Setting qdisc failed: output='%s' err='%s'", outbuf, errbuf); - return -2; - } - - return 0; -} - - /** * virNetDevReserveName: * @name: name of an existing network device diff --git a/src/util/virnetdev.h b/src/util/virnetdev.h index 1f03d88293..b694f4ac35 100644 --- a/src/util/virnetdev.h +++ b/src/util/virnetdev.h @@ -333,10 +333,6 @@ int virNetDevSysfsFile(char **pf_sysfs_device_link, int virNetDevRunEthernetScript(const char *ifname, const char *script) G_GNUC_NO_INLINE; -int virNetDevSetRootQDisc(const char *ifname, - const char *qdisc) - G_GNUC_NO_INLINE; - int virNetDevVFInterfaceStats(virPCIDeviceAddress *vfAddr, virDomainInterfaceStatsPtr stats) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); diff --git a/src/util/virnetdevbandwidth.c b/src/util/virnetdevbandwidth.c index 0fc802b174..75fc5607ad 100644 --- a/src/util/virnetdevbandwidth.c +++ b/src/util/virnetdevbandwidth.c @@ -23,11 +23,14 @@ #include "vircommand.h" #include "viralloc.h" #include "virerror.h" +#include "virlog.h" #include "virstring.h" #include "virutil.h" #define VIR_FROM_THIS VIR_FROM_NONE +VIR_LOG_INIT("util.netdevbandwidth"); + void virNetDevBandwidthFree(virNetDevBandwidth *def) { @@ -749,3 +752,50 @@ virNetDevBandwidthUpdateFilter(const char *ifname, VIR_FREE(class_id); return ret; } + + + +/** + * virNetDevBandwidthSetRootQDisc: + * @ifname: the interface name + * @qdisc: queueing discipline to set + * + * For given interface @ifname set its root queueing discipline + * to @qdisc. This can be used to replace the default qdisc + * (usually pfifo_fast or whatever is set in + * /proc/sys/net/core/default_qdisc) with different qdisc. + * + * Returns: 0 on success, + * -1 if failed to exec tc (with error reported) + * -2 if tc failed (with no error reported) + */ +int +virNetDevBandwidthSetRootQDisc(const char *ifname, + const char *qdisc) +{ + g_autoptr(virCommand) cmd = NULL; + g_autofree char *outbuf = NULL; + g_autofree char *errbuf = NULL; + int status; + + /* Ideally, we would have a netlink implementation and just + * call it here. But honestly, I tried and failed miserably. + * Fallback to spawning tc. */ + cmd = virCommandNewArgList(TC, "qdisc", "add", "dev", ifname, + "root", "handle", "0:", qdisc, + NULL); + + virCommandAddEnvString(cmd, "LC_ALL=C"); + virCommandSetOutputBuffer(cmd, &outbuf); + virCommandSetErrorBuffer(cmd, &errbuf); + + if (virCommandRun(cmd, &status) < 0) + return -1; + + if (status != 0) { + VIR_DEBUG("Setting qdisc failed: output='%s' err='%s'", outbuf, errbuf); + return -2; + } + + return 0; +} diff --git a/src/util/virnetdevbandwidth.h b/src/util/virnetdevbandwidth.h index 35e26b66f7..3d520721f6 100644 --- a/src/util/virnetdevbandwidth.h +++ b/src/util/virnetdevbandwidth.h @@ -74,3 +74,7 @@ int virNetDevBandwidthUpdateFilter(const char *ifname, unsigned int id) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT; + +int virNetDevBandwidthSetRootQDisc(const char *ifname, + const char *qdisc) + G_GNUC_NO_INLINE; diff --git a/tests/qemuxml2argvmock.c b/tests/qemuxml2argvmock.c index 9d812bfc2e..77a0814c08 100644 --- a/tests/qemuxml2argvmock.c +++ b/tests/qemuxml2argvmock.c @@ -25,6 +25,7 @@ #include "virmock.h" #include "virlog.h" #include "virnetdev.h" +#include "virnetdevbandwidth.h" #include "virnetdevip.h" #include "virnetdevtap.h" #include "virnetdevopenvswitch.h" @@ -277,8 +278,8 @@ qemuBuildTPMOpenBackendFDs(const char *tpmdev G_GNUC_UNUSED, int -virNetDevSetRootQDisc(const char *ifname G_GNUC_UNUSED, - const char *qdisc G_GNUC_UNUSED) +virNetDevBandwidthSetRootQDisc(const char *ifname G_GNUC_UNUSED, + const char *qdisc G_GNUC_UNUSED) { return 0; } -- 2.30.2

Having the function on mock library reflect more closely what we usually do in tests. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- tests/domaincapsmock.c | 16 ++++++++++++++++ tests/testutilsqemu.c | 15 --------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/tests/domaincapsmock.c b/tests/domaincapsmock.c index d81a898dc0..73690f0b9e 100644 --- a/tests/domaincapsmock.c +++ b/tests/domaincapsmock.c @@ -16,6 +16,7 @@ #include <config.h> +#include "virfile.h" #include "virhostcpu.h" #ifdef WITH_LIBXL # include "libxl/libxl_capabilities.h" @@ -40,3 +41,18 @@ virHostCPUGetMicrocodeVersion(virArch hostArch G_GNUC_UNUSED) { return 0; } + +char * +virFindFileInPath(const char *file) +{ + if (g_str_has_prefix(file, "qemu-system") || + g_str_equal(file, "qemu-kvm")) { + return g_strdup_printf("/usr/bin/%s", file); + } + + /* Nothing in tests should be relying on real files + * in host OS, so we return NULL to try to force + * an error in such a case + */ + return NULL; +} diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index 7451929807..0a2af5036e 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -117,21 +117,6 @@ static const char *qemu_default_ram_id[VIR_ARCH_LAST] = { [VIR_ARCH_SPARC] = "sun4m.ram", }; -char * -virFindFileInPath(const char *file) -{ - if (g_str_has_prefix(file, "qemu-system") || - g_str_equal(file, "qemu-kvm")) { - return g_strdup_printf("/usr/bin/%s", file); - } - - /* Nothing in tests should be relying on real files - * in host OS, so we return NULL to try to force - * an error in such a case - */ - return NULL; -} - virCapsHostNUMA * virCapabilitiesHostNUMANewHost(void) -- 2.30.2

Upstream sheepdog changed collie to dog back in 2013 in version 0.7.0. Looking into repology that version is no longer used by any distribution supported by libvirt. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index cd88e26f9a..837955de37 100644 --- a/meson.build +++ b/meson.build @@ -1927,7 +1927,7 @@ if conf.has('WITH_LIBVIRTD') endif if not get_option('storage_sheepdog').disabled() - sheepdogcli_prog = find_program(['collie', 'dog'], required: get_option('storage_sheepdog'), dirs: libvirt_sbin_path) + sheepdogcli_prog = find_program('dog', required: get_option('storage_sheepdog'), dirs: libvirt_sbin_path) if sheepdogcli_prog.found() use_storage = true -- 2.30.2

Currently the tests would fail if the bhyve commands are installed in different path then /usr/bin. Strip the command path to not depend on the host environment. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.ldargs | 2 +- .../bhyvexml2argv-addr-isa-controller-on-slot-1.args | 2 +- .../bhyvexml2argv-addr-isa-controller-on-slot-1.ldargs | 2 +- .../bhyvexml2argv-addr-isa-controller-on-slot-31.args | 2 +- .../bhyvexml2argv-addr-isa-controller-on-slot-31.ldargs | 2 +- .../bhyvexml2argv-addr-more-than-32-sata-disks.args | 2 +- .../bhyvexml2argv-addr-more-than-32-sata-disks.ldargs | 2 +- .../bhyvexml2argv-addr-multiple-sata-disks.args | 2 +- .../bhyvexml2argv-addr-multiple-sata-disks.ldargs | 2 +- .../bhyvexml2argv-addr-multiple-virtio-disks.args | 2 +- .../bhyvexml2argv-addr-multiple-virtio-disks.ldargs | 2 +- .../bhyvexml2argv-addr-no32devs-multiple-sata-disks.args | 2 +- .../bhyvexml2argv-addr-no32devs-multiple-sata-disks.ldargs | 2 +- .../bhyvexml2argv-addr-no32devs-single-sata-disk.args | 2 +- .../bhyvexml2argv-addr-no32devs-single-sata-disk.ldargs | 2 +- .../bhyvexml2argv-addr-non-isa-controller-on-slot-1.args | 2 +- .../bhyvexml2argv-addr-single-sata-disk.args | 2 +- .../bhyvexml2argv-addr-single-sata-disk.ldargs | 2 +- .../bhyvexml2argv-addr-single-virtio-disk.args | 2 +- .../bhyvexml2argv-addr-single-virtio-disk.ldargs | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-base.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-base.ldargs | 2 +- .../bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.args | 2 +- .../bhyvexml2argv-bhyveload-bootorder.ldargs | 2 +- .../bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.args | 2 +- .../bhyvexml2argv-bhyveload-bootorder1.ldargs | 2 +- .../bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.args | 2 +- .../bhyvexml2argv-bhyveload-bootorder3.ldargs | 2 +- .../bhyvexml2argv-bhyveload-explicitargs.args | 2 +- .../bhyvexml2argv-bhyveload-explicitargs.ldargs | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-commandline.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-commandline.ldargs | 2 +- .../bhyvexml2argv-console-master-slave-not-specified.args | 2 +- .../bhyvexml2argv-console-master-slave-not-specified.ldargs | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-console.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-console.ldargs | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.ldargs | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.ldargs | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.ldargs | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.ldargs | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.ldargs | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-firmware-efi.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.ldargs | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.ldargs | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.ldargs | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.ldargs | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.ldargs | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.args | 2 +- .../bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.ldargs | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.ldargs | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-localtime.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-localtime.ldargs | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.ldargs | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-msrs.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-msrs.ldargs | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.ldargs | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.args | 2 +- .../bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.ldargs | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.ldargs | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-serial.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-serial.ldargs | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-sound.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-sound.ldargs | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-uefi.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-vnc-autoport.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-vnc.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-wired.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-wired.ldargs | 2 +- tests/bhyvexml2argvtest.c | 4 ++-- 89 files changed, 90 insertions(+), 90 deletions(-) diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.args b/tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.args index 001e44147e..146e3c6eee 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -A \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.args index 498455275a..735a084ac7 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.args index 70c44932c8..0846afafd0 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.args index bd987c86aa..51434ed1df 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.ldargs index ec3f482ca8..4257ffccee 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd1.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.args index 0bd1957e96..976d800f47 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.ldargs index ec3f482ca8..4257ffccee 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-sata-disks.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd1.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.args index 73b1e2ad57..47b9ca094f 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.args index 821cc58287..2bb2689c79 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.ldargs index ec3f482ca8..4257ffccee 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-disks.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd1.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.args index 9923c4cd85..153a1d5035 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sata-disk.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-non-isa-controller-on-slot-1.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-non-isa-controller-on-slot-1.args index 12859f7d56..8517c0d06a 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-non-isa-controller-on-slot-1.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-non-isa-controller-on-slot-1.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.args index edcb45a0ae..507e0be668 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-sata-disk.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-virtio-disk.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-virtio-disk.args index 3ee9614733..9c00e02000 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-virtio-disk.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-virtio-disk.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-virtio-disk.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-virtio-disk.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-virtio-disk.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-single-virtio-disk.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-base.args b/tests/bhyvexml2argvdata/bhyvexml2argv-base.args index edcb45a0ae..507e0be668 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-base.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-base.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-base.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-base.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-base.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-base.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.args b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.args index f790f746a9..a6df2a673e 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.ldargs index b31d65cd06..25cfbc4cc3 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/cdrom.iso \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.args b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.args index e621edbf0e..f10304cc9f 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.args b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.args index eedc36d35e..96e05c6c9c 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.ldargs index b31d65cd06..25cfbc4cc3 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/cdrom.iso \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.args b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.args index 1c5aa009e8..514ec78c82 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.ldargs index 73871acad0..265475b7dc 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-explicitargs.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -X \ -Y \ -Z diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.args b/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.args index 153639c370..cfbc57bd8c 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-commandline.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.args b/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.args index 4d7cb11999..5d0c5c2987 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specified.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-console.args b/tests/bhyvexml2argvdata/bhyvexml2argv-console.args index 8c6cb78c9f..712dee9a2b 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-console.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-console.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-console.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-console.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-console.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-console.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.args b/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.args index 2c88b650b5..d7a232fcb1 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c cpus=2,sockets=1,cores=2,threads=1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.args b/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.args index aca701c3bf..a8570b3ca2 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.ldargs index 359ad90a2c..ca4bbaa987 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-custom-loader.ldargs @@ -1,4 +1,4 @@ -/fizz_buzz_bazz \ +fizz_buzz_bazz \ -X \ -Y \ -Z diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.args b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.args index 8f336d7ef2..f54ebbc8b3 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.ldargs index 85990fc60b..627a07bdfd 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom-grub.ldargs @@ -1,4 +1,4 @@ -/usr/local/sbin/grub-bhyve \ +grub-bhyve \ --root cd \ --device-map '<device.map>' \ --memory 214 \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.args b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.args index fd36515efc..ba6ddeffbe 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.ldargs index b31d65cd06..25cfbc4cc3 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-cdrom.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/cdrom.iso \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.args b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.args index 3ee9614733..9c00e02000 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-firmware-efi.args b/tests/bhyvexml2argvdata/bhyvexml2argv-firmware-efi.args index b343469d19..c87dc7d779 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-firmware-efi.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-firmware-efi.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.args b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.args index de986b4eb6..c321d4d76d 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.args b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.args index 8943ae211f..0f02d5be4e 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.args b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.args index 1c400e1a7c..9ed28162ac 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.ldargs index 9a50cf6537..56e2f27cfc 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder.ldargs @@ -1,4 +1,4 @@ -/usr/local/sbin/grub-bhyve \ +grub-bhyve \ --root hd0,msdos1 \ --device-map '<device.map>' \ --memory 214 \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.args b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.args index a09338d004..7ed87b2578 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.ldargs index 9a50cf6537..56e2f27cfc 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.ldargs @@ -1,4 +1,4 @@ -/usr/local/sbin/grub-bhyve \ +grub-bhyve \ --root hd0,msdos1 \ --device-map '<device.map>' \ --memory 214 \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.args b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.args index 91c06e3e3a..5a6ae06256 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.ldargs index 9a50cf6537..56e2f27cfc 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.ldargs @@ -1,4 +1,4 @@ -/usr/local/sbin/grub-bhyve \ +grub-bhyve \ --root hd0,msdos1 \ --device-map '<device.map>' \ --memory 214 \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.args b/tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.args index dfe1334edd..cb64d19aff 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-input-xhci-tablet.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.args b/tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.args index 498455275a..735a084ac7 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-localtime.args b/tests/bhyvexml2argvdata/bhyvexml2argv-localtime.args index e4f66080b9..c06ffceba1 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-localtime.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-localtime.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -H \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-localtime.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-localtime.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-localtime.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-localtime.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.args b/tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.args index c17f216cb6..1c737b66e7 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-macaddr.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.args b/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.args index 4b0e28ba41..60e5a60db2 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -w \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.args b/tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.args index f6f45bdf43..370929a232 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-net-e1000.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.args b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.args index 050452cfa2..f9ec58793d 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.ldargs index 9a50cf6537..56e2f27cfc 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub-nocons.ldargs @@ -1,4 +1,4 @@ -/usr/local/sbin/grub-bhyve \ +grub-bhyve \ --root hd0,msdos1 \ --device-map '<device.map>' \ --memory 214 \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.args b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.args index f51fa0834c..330f791b85 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.ldargs index 10f8d92e6c..c9d59cb0b8 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial-grub.ldargs @@ -1,4 +1,4 @@ -/usr/local/sbin/grub-bhyve \ +grub-bhyve \ --root hd0,msdos1 \ --device-map '<device.map>' \ --memory 214 \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial.args b/tests/bhyvexml2argvdata/bhyvexml2argv-serial.args index df12646a88..06ba1ae513 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-serial.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-serial.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-serial.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-serial.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-sound.args b/tests/bhyvexml2argvdata/bhyvexml2argv-sound.args index 8a99690ae5..cb61b89ee5 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-sound.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-sound.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-sound.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-sound.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-sound.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-sound.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-uefi.args b/tests/bhyvexml2argvdata/bhyvexml2argv-uefi.args index 22a21065db..479712967d 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-uefi.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-uefi.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-autoport.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-autoport.args index 8b692c1877..3991f9fc16 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-autoport.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-autoport.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password.args index 682b03b2e0..dfd3b0a285 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-password.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.args index 4b4d62a68c..52cae37f76 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-resolution.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.args index 960b2dfe5e..80e2bd7223 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-io.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.args index 0639161ad0..1975fdc4d7 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-off.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.args index caa9b0e9a6..e62dfff239 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf-on.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc.args index 0301aa666e..049e65227d 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-wired.args b/tests/bhyvexml2argvdata/bhyvexml2argv-wired.args index f2c415ece5..b6b0a18529 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-wired.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-wired.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -S \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-wired.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-wired.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-wired.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-wired.ldargs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c index c4fe4ef17a..cdaa32f65c 100644 --- a/tests/bhyvexml2argvtest.c +++ b/tests/bhyvexml2argvtest.c @@ -86,13 +86,13 @@ static int testCompareXMLToArgvFiles(const char *xml, goto out; } - if (!(actualargv = virCommandToString(cmd, true))) + if (!(actualargv = virCommandToStringFull(cmd, true, true))) goto out; if (actualdm != NULL) virTrimSpaces(actualdm, NULL); - if (!(actualld = virCommandToString(ldcmd, true))) + if (!(actualld = virCommandToStringFull(ldcmd, true, true))) goto out; if (virTestCompareToFileFull(actualargv, cmdline, false) < 0) -- 2.30.2

Future patch will remove MKFS define as we will no longer check it during compilation. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/storage/storage_backend_fs.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c index bb93d64bbe..b0f8070c6c 100644 --- a/src/storage/storage_backend_fs.c +++ b/src/storage/storage_backend_fs.c @@ -397,13 +397,20 @@ virStorageBackendFileSystemCheck(virStoragePoolObj *pool, return 0; } -/* some platforms don't support mkfs */ -#ifdef MKFS static int virStorageBackendExecuteMKFS(const char *device, const char *format) { g_autoptr(virCommand) cmd = NULL; + g_autofree char *mkfs = virFindFileInPath(MKFS); + + if (!mkfs) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("mkfs is not supported on this platform: " + "Failed to make filesystem of type '%s' on device '%s'"), + format, device); + return -1; + } cmd = virCommandNewArgList(MKFS, "-t", format, NULL); @@ -426,19 +433,6 @@ virStorageBackendExecuteMKFS(const char *device, return 0; } -#else /* #ifdef MKFS */ -static int -virStorageBackendExecuteMKFS(const char *device G_GNUC_UNUSED, - const char *format G_GNUC_UNUSED) -{ - virReportError(VIR_ERR_INTERNAL_ERROR, - _("mkfs is not supported on this platform: " - "Failed to make filesystem of " - "type '%s' on device '%s'"), - format, device); - return -1; -} -#endif /* #ifdef MKFS */ static int virStorageBackendMakeFileSystem(virStoragePoolObj *pool, -- 2.30.2

Extend virFindFileInPath to search in custom extra paths as well. Some binaries that libvirt needs are not usually in $PATH so we need to have a way to look for these as well. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/libvirt_private.syms | 2 +- src/util/virfile.c | 16 ++++++++++++++-- src/util/virfile.h | 5 ++++- tests/domaincapsmock.c | 3 ++- tests/virfirewallmock.c | 3 ++- 5 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index d507a858ac..c765289085 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2253,7 +2253,7 @@ virFileWrapperFdClose; virFileWrapperFdFree; virFileWrapperFdNew; virFileWriteStr; -virFindFileInPath; +virFindFileInPathFull; # util/virfilecache.h diff --git a/src/util/virfile.c b/src/util/virfile.c index 03a7725dd3..7922fda2e5 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -1654,13 +1654,15 @@ virFileIsLink(const char *linkpath) } /* - * Finds a requested executable file in the PATH env. e.g.: + * Finds a requested executable file in the paths provided by @extra_paths + * argument or in PATH env. e.g.: * "qemu-img" will return "/usr/bin/qemu-img" * * You must free the result */ char * -virFindFileInPath(const char *file) +virFindFileInPathFull(const char *file, + const GStrv extra_paths) { const char *origpath = NULL; g_auto(GStrv) paths = NULL; @@ -1692,6 +1694,16 @@ virFindFileInPath(const char *file) return abspath; } + /* First search in paths provided by caller. + */ + if (extra_paths) { + for (pathiter = extra_paths; *pathiter; pathiter++) { + g_autofree char *fullpath = g_strdup_printf("%s/%s", *pathiter, file); + if (virFileIsExecutable(fullpath)) + return g_steal_pointer(&fullpath); + } + } + /* copy PATH env so we can tweak it */ origpath = getenv("PATH"); if (!origpath) diff --git a/src/util/virfile.h b/src/util/virfile.h index b9f7b1766f..eee27c2efc 100644 --- a/src/util/virfile.h +++ b/src/util/virfile.h @@ -184,9 +184,12 @@ int virFileResolveAllLinks(const char *linkpath, int virFileIsLink(const char *linkpath) ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT; -char *virFindFileInPath(const char *file) +char *virFindFileInPathFull(const char *file, + const GStrv extra_paths) G_GNUC_NO_INLINE; +#define virFindFileInPath(file) virFindFileInPathFull(file, NULL) + char *virFileFindResource(const char *filename, const char *builddir, const char *installdir) diff --git a/tests/domaincapsmock.c b/tests/domaincapsmock.c index 73690f0b9e..4bef2b72d0 100644 --- a/tests/domaincapsmock.c +++ b/tests/domaincapsmock.c @@ -43,7 +43,8 @@ virHostCPUGetMicrocodeVersion(virArch hostArch G_GNUC_UNUSED) } char * -virFindFileInPath(const char *file) +virFindFileInPathFull(const char *file, + const GStrv extra_args G_GNUC_UNUSED) { if (g_str_has_prefix(file, "qemu-system") || g_str_equal(file, "qemu-kvm")) { diff --git a/tests/virfirewallmock.c b/tests/virfirewallmock.c index 6b096701c9..a047e56bd9 100644 --- a/tests/virfirewallmock.c +++ b/tests/virfirewallmock.c @@ -20,7 +20,8 @@ #include "virfile.h" char * -virFindFileInPath(const char *file) +virFindFileInPathFull(const char *file, + const GStrv extra_args G_GNUC_UNUSED) { if (file && (g_strrstr(file, "ebtables") || -- 2.30.2

Following patches will stop detecting the full path during compilation so we will need to do it here. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/qemu/qemu_conf.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 916a3d36ee..437b3ce2be 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -109,6 +109,12 @@ virQEMUDriverConfig *virQEMUDriverConfigNew(bool privileged, const char *root) { g_autoptr(virQEMUDriverConfig) cfg = NULL; + const char *qemu_extra_paths[] = { + "/usr/libexec", + "/usr/lib/qemu", + "/usr/lib", + NULL, + }; if (virQEMUConfigInitialize() < 0) return NULL; @@ -267,10 +273,14 @@ virQEMUDriverConfig *virQEMUDriverConfigNew(bool privileged, return NULL; } - cfg->bridgeHelperName = g_strdup(QEMU_BRIDGE_HELPER); - cfg->prHelperName = g_strdup(QEMU_PR_HELPER); - cfg->slirpHelperName = g_strdup(QEMU_SLIRP_HELPER); - cfg->dbusDaemonName = g_strdup(QEMU_DBUS_DAEMON); + cfg->bridgeHelperName = virFindFileInPathFull(QEMU_BRIDGE_HELPER, + (GStrv) qemu_extra_paths); + cfg->prHelperName = virFindFileInPathFull(QEMU_PR_HELPER, + (GStrv) qemu_extra_paths); + cfg->slirpHelperName = virFindFileInPathFull(QEMU_SLIRP_HELPER, + (GStrv) qemu_extra_paths); + cfg->dbusDaemonName = virFindFileInPathFull(QEMU_DBUS_DAEMON, + (GStrv) qemu_extra_paths); cfg->securityDefaultConfined = true; cfg->securityRequireConfined = false; -- 2.30.2

These binaries are used only during runtime so technically there is no need to check for them while compiling libvirt. Usually the location is the same while compiling and running but it may not be true. In addition they are not strictly required to compile the code so this way developers don't have to install it or create fake binaries in order to compile the code. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- meson.build | 170 ++----------------------- src/bhyve/bhyve_command.c | 4 + src/locking/lock_driver_lockd.c | 12 +- src/network/bridge_driver.c | 2 + src/node_device/node_device_driver.c | 2 + src/qemu/qemu_conf.c | 5 + src/storage/storage_backend_logical.c | 13 ++ src/storage/storage_backend_sheepdog.c | 2 + src/storage/storage_backend_zfs.c | 3 + src/storage/storage_util.c | 2 + src/storage/storage_util.h | 6 + src/util/virdnsmasq.c | 1 + src/util/virfirewall.h | 4 + src/util/viriscsi.h | 2 + src/util/virkmod.h | 3 + src/util/virnetdevbandwidth.h | 2 + src/util/virnetdevip.c | 2 + src/util/virnetdevmidonet.c | 2 + src/util/virnetdevopenvswitch.c | 2 + src/util/virnuma.c | 1 + src/util/virsysinfo.c | 1 + src/util/virutil.c | 2 + 22 files changed, 72 insertions(+), 171 deletions(-) diff --git a/meson.build b/meson.build index 837955de37..1c27dd030e 100644 --- a/meson.build +++ b/meson.build @@ -926,24 +926,8 @@ endforeach optional_programs = [ 'augparse', - 'dmidecode', - 'dnsmasq', - 'ebtables', 'flake8', - 'ip', - 'ip6tables', - 'iptables', - 'iscsiadm', - 'mdevctl', - 'mm-ctl', - 'modprobe', - 'ovs-vsctl', 'pdwtags', - 'radvd', - 'rmmod', - 'scrub', - 'tc', - 'udevadm', ] foreach name : optional_programs @@ -1088,14 +1072,6 @@ endif libparted_version = '1.8.0' libparted_dep = dependency('libparted', version: '>=' + libparted_version, required: false) -if libparted_dep.found() - parted_prog = find_program('parted', required: false, dirs: libvirt_sbin_path) - if parted_prog.found() - conf.set_quoted('PARTED', parted_prog.path()) - else - libparted_dep = dependency('', required: false) - endif -endif libpcap_version = '1.5.0' if not get_option('libpcap').disabled() @@ -1498,16 +1474,7 @@ if not get_option('driver_libvirtd').disabled() endif if not get_option('driver_bhyve').disabled() and host_machine.system() == 'freebsd' - bhyve_prog = find_program('bhyve', required: get_option('driver_bhyve')) - bhyvectl_prog = find_program('bhyvectl', required: get_option('driver_bhyve')) - bhyveload_prog = find_program('bhyveload', required: get_option('driver_bhyve')) - - if bhyve_prog.found() and bhyvectl_prog.found() and bhyveload_prog.found() - conf.set('WITH_BHYVE', 1) - conf.set_quoted('BHYVE', bhyve_prog.path()) - conf.set_quoted('BHYVECTL', bhyvectl_prog.path()) - conf.set_quoted('BHYVELOAD', bhyveload_prog.path()) - endif + conf.set('WITH_BHYVE', 1) elif get_option('driver_bhyve').enabled() error('The bhyve driver cannot be enabled') endif @@ -1706,54 +1673,6 @@ if not get_option('driver_qemu').disabled() endif conf.set_quoted('QEMU_USER', qemu_user) conf.set_quoted('QEMU_GROUP', qemu_group) - - qemu_bridge_prog = find_program( - 'qemu-bridge-helper', - dirs: [ '/usr/libexec', '/usr/lib/qemu', '/usr/lib' ], - required: false - ) - if qemu_bridge_prog.found() - qemu_bridge_path = qemu_bridge_prog.path() - else - qemu_bridge_path = '/usr/libexec/qemu-bridge-helper' - endif - conf.set_quoted('QEMU_BRIDGE_HELPER', qemu_bridge_path) - - qemu_pr_prog = find_program( - 'qemu-pr-helper', - dirs: [ '/usr/bin', '/usr/libexec' ], - required: false - ) - if qemu_pr_prog.found() - qemu_pr_path = qemu_pr_prog.path() - else - qemu_pr_path = '/usr/bin/qemu-pr-helper' - endif - conf.set_quoted('QEMU_PR_HELPER', qemu_pr_path) - - qemu_slirp_prog = find_program( - 'slirp-helper', - dirs: [ '/usr/bin', '/usr/libexec' ], - required: false - ) - if qemu_slirp_prog.found() - qemu_slirp_path = qemu_slirp_prog.path() - else - qemu_slirp_path = '/usr/bin/slirp-helper' - endif - conf.set_quoted('QEMU_SLIRP_HELPER', qemu_slirp_path) - - qemu_dbus_daemon_prog = find_program( - 'dbus-daemon', - dirs: [ '/usr/bin', '/usr/libexec' ], - required: false - ) - if qemu_dbus_daemon_prog.found() - qemu_dbus_daemon_path = qemu_dbus_daemon_prog.path() - else - qemu_dbus_daemon_path = '/usr/bin/dbus-daemon' - endif - conf.set_quoted('QEMU_DBUS_DAEMON', qemu_dbus_daemon_path) endif endif @@ -1831,30 +1750,9 @@ if conf.has('WITH_LIBVIRTD') endif endif - if fs_enable - mount_prog = find_program('mount', required: get_option('storage_fs'), dirs: libvirt_sbin_path) - umount_prog = find_program('umount', required: get_option('storage_fs'), dirs: libvirt_sbin_path) - mkfs_prog = find_program('mkfs', required: get_option('storage_fs'), dirs: libvirt_sbin_path) - - if not mount_prog.found() or not umount_prog.found() or not mkfs_prog.found() - fs_enable = false - endif - endif - if fs_enable use_storage = true - conf.set('WITH_STORAGE_FS', 1) - conf.set_quoted('MOUNT', mount_prog.path()) - conf.set_quoted('UMOUNT', umount_prog.path()) - conf.set_quoted('MKFS', mkfs_prog.path()) - - showmount_prog = find_program('showmount', required: false, dirs: libvirt_sbin_path) - showmount_path = '' - if showmount_prog.found() - showmount_path = showmount_prog.path() - endif - conf.set_quoted('SHOWMOUNT', showmount_path) endif endif @@ -1865,11 +1763,9 @@ if conf.has('WITH_LIBVIRTD') error('Need glusterfs (libgfapi) for gluster storage driver') endif - if not get_option('storage_iscsi').disabled() and iscsiadm_prog.found() + if not get_option('storage_iscsi').disabled() use_storage = true conf.set('WITH_STORAGE_ISCSI', 1) - elif get_option('storage_iscsi').enabled() - error('We need iscsiadm for iSCSI storage driver') endif if not get_option('storage_iscsi_direct').disabled() and libiscsi_dep.found() @@ -1880,31 +1776,8 @@ if conf.has('WITH_LIBVIRTD') endif if not get_option('storage_lvm').disabled() - lvm_enable = true - lvm_progs = [ - 'pvcreate', 'vgcreate', 'lvcreate', - 'pvremove', 'vgremove', 'lvremove', - 'lvchange', 'vgchange', 'vgscan', - 'pvs', 'vgs', 'lvs', - ] - foreach name : lvm_progs - set_variable( - '@0@_prog'.format(name), - find_program(name, required: get_option('storage_lvm'), dirs: libvirt_sbin_path) - ) - if not get_variable('@0@_prog'.format(name)).found() - lvm_enable = false - endif - endforeach - - if lvm_enable - use_storage = true - conf.set('WITH_STORAGE_LVM', 1) - - foreach name : lvm_progs - conf.set_quoted(name.to_upper(), get_variable('@0@_prog'.format(name)).path()) - endforeach - endif + use_storage = true + conf.set('WITH_STORAGE_LVM', 1) endif if not get_option('storage_mpath').disabled() and host_machine.system() == 'linux' and devmapper_dep.found() @@ -1927,13 +1800,8 @@ if conf.has('WITH_LIBVIRTD') endif if not get_option('storage_sheepdog').disabled() - sheepdogcli_prog = find_program('dog', required: get_option('storage_sheepdog'), dirs: libvirt_sbin_path) - - if sheepdogcli_prog.found() - use_storage = true - conf.set('WITH_STORAGE_SHEEPDOG', 1) - conf.set_quoted('SHEEPDOGCLI', sheepdogcli_prog.path()) - endif + use_storage = true + conf.set('WITH_STORAGE_SHEEPDOG', 1) endif if not get_option('storage_vstorage').disabled() @@ -1953,24 +1821,8 @@ if conf.has('WITH_LIBVIRTD') endif if not get_option('storage_zfs').disabled() - zfs_enable = true - foreach name : ['zfs', 'zpool'] - set_variable( - '@0@_prog'.format(name), - find_program(name, required: get_option('storage_zfs'), dirs: libvirt_sbin_path) - ) - if not get_variable('@0@_prog'.format(name)).found() - zfs_enable = false - endif - endforeach - - if zfs_enable - use_storage = true - conf.set('WITH_STORAGE_ZFS', 1) - foreach name : ['zfs', 'zpool'] - conf.set_quoted(name.to_upper(), get_variable('@0@_prog'.format(name)).path()) - endforeach - endif + use_storage = true + conf.set('WITH_STORAGE_ZFS', 1) endif endif @@ -2080,11 +1932,7 @@ if not get_option('nss').disabled() endif if not get_option('numad').disabled() and numactl_dep.found() - numad_prog = find_program('numad', required: get_option('numad'), dirs: libvirt_sbin_path) - if numad_prog.found() - conf.set('WITH_NUMAD', 1) - conf.set_quoted('NUMAD', numad_prog.path()) - endif + conf.set('WITH_NUMAD', 1) elif get_option('numad').enabled() error('You must have numactl enabled for numad support.') endif diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c index b1558132e1..798736a1ec 100644 --- a/src/bhyve/bhyve_command.c +++ b/src/bhyve/bhyve_command.c @@ -37,6 +37,10 @@ #define VIR_FROM_THIS VIR_FROM_BHYVE +#define BHYVE "bhyve" +#define BHYVECTL "bhyvectl" +#define BHYVELOAD "bhyveload" + VIR_LOG_INIT("bhyve.bhyve_command"); static int diff --git a/src/locking/lock_driver_lockd.c b/src/locking/lock_driver_lockd.c index 823b918db3..ea787bf87d 100644 --- a/src/locking/lock_driver_lockd.c +++ b/src/locking/lock_driver_lockd.c @@ -454,7 +454,8 @@ static int virLockManagerLockDaemonNew(virLockManager *lock, } -#ifdef LVS +#define LVS "lvs" + static int virLockManagerGetLVMKey(const char *path, char **key) @@ -508,15 +509,6 @@ virLockManagerGetLVMKey(const char *path, return ret; } -#else -static int -virLockManagerGetLVMKey(const char *path, - char **key G_GNUC_UNUSED) -{ - virReportSystemError(ENOSYS, _("Unable to get LVM key for %s"), path); - return -1; -} -#endif static int virLockManagerLockDaemonAddResource(virLockManager *lock, diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index ee3f9dab0a..8e1a42b119 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -74,6 +74,8 @@ #define VIR_FROM_THIS VIR_FROM_NETWORK #define MAX_BRIDGE_ID 256 +#define RADVD "radvd" + static virMutex bridgeNameValidateMutex = VIR_MUTEX_INITIALIZER; /** diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c index 8227cd8342..52fcb85ee8 100644 --- a/src/node_device/node_device_driver.c +++ b/src/node_device/node_device_driver.c @@ -48,6 +48,8 @@ VIR_LOG_INIT("node_device.node_device_driver"); +#define MDEVCTL "mdevctl" + virNodeDeviceDriverState *driver; virDrvOpenStatus diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 437b3ce2be..d228504d8c 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -55,6 +55,11 @@ VIR_LOG_INIT("qemu.qemu_conf"); +#define QEMU_BRIDGE_HELPER "qemu-bridge-helper" +#define QEMU_PR_HELPER "qemu-pr-helper" +#define QEMU_SLIRP_HELPER "slirp-helper" +#define QEMU_DBUS_DAEMON "dbus-daemon" + /* These are only defaults, they can be changed now in qemu.conf and * explicitly specified port is checked against these two (makes * sense to limit the values). diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c index ed8e47d880..4bbb585d07 100644 --- a/src/storage/storage_backend_logical.c +++ b/src/storage/storage_backend_logical.c @@ -40,6 +40,19 @@ VIR_LOG_INIT("storage.storage_backend_logical"); +#define PVCREATE "pvcreate" +#define PVREMOVE "pvremove" +#define PVS "pvs" +#define VGCREATE "vgcreate" +#define VGREMOVE "vgremove" +#define VGCHANGE "vgchange" +#define VGSCAN "vgscan" +#define VGS "vgs" +#define LVCREATE "lvcreate" +#define LVREMOVE "lvremove" +#define LVCHANGE "lvchange" +#define LVS "lvs" + static int virStorageBackendLogicalSetActive(virStoragePoolObj *pool, diff --git a/src/storage/storage_backend_sheepdog.c b/src/storage/storage_backend_sheepdog.c index 6490dfae52..beb6445e1e 100644 --- a/src/storage/storage_backend_sheepdog.c +++ b/src/storage/storage_backend_sheepdog.c @@ -35,6 +35,8 @@ #define VIR_FROM_THIS VIR_FROM_STORAGE +#define SHEEPDOGCLI "dog" + static int virStorageBackendSheepdogRefreshVol(virStoragePoolObj *pool, virStorageVolDef *vol); diff --git a/src/storage/storage_backend_zfs.c b/src/storage/storage_backend_zfs.c index 6fabeade11..2a5d74357d 100644 --- a/src/storage/storage_backend_zfs.c +++ b/src/storage/storage_backend_zfs.c @@ -33,6 +33,9 @@ VIR_LOG_INIT("storage.storage_backend_zfs"); +#define ZFS "zfs" +#define ZPOOL "zpool" + /* * Some common flags of zfs and zpool commands we use: * -H -- don't print headers and separate fields by tab diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index 7efadc2197..c225f2ab6b 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -84,6 +84,8 @@ VIR_LOG_INIT("storage.storage_util"); # define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO) #endif +#define SCRUB "scrub" + /* virStorageBackendNamespaceInit: * @poolType: virStoragePoolType * @xmlns: Storage Pool specific namespace callback methods diff --git a/src/storage/storage_util.h b/src/storage/storage_util.h index aa3c25e9fc..487345ff22 100644 --- a/src/storage/storage_util.h +++ b/src/storage/storage_util.h @@ -25,6 +25,12 @@ #include "storage_driver.h" #include "storage_backend.h" +#define PARTED "parted" +#define MOUNT "mount" +#define UMOUNT "umount" +#define MKFS "mkfs" +#define SHOWMOUNT "showmount" + /* Storage Pool Namespace options to share w/ storage_backend_fs.c and * the virStorageBackendFileSystemMountCmd method */ typedef struct _virStoragePoolFSMountOptionsDef virStoragePoolFSMountOptionsDef; diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c index f2f606913f..b666c2f9d3 100644 --- a/src/util/virdnsmasq.c +++ b/src/util/virdnsmasq.c @@ -48,6 +48,7 @@ VIR_LOG_INIT("util.dnsmasq"); #define DNSMASQ_HOSTSFILE_SUFFIX "hostsfile" #define DNSMASQ_ADDNHOSTSFILE_SUFFIX "addnhosts" +#define DNSMASQ "dnsmasq" static void dhcphostFreeContent(dnsmasqDhcpHost *host) diff --git a/src/util/virfirewall.h b/src/util/virfirewall.h index 169d99fe2b..a3954c5ed0 100644 --- a/src/util/virfirewall.h +++ b/src/util/virfirewall.h @@ -22,6 +22,10 @@ #include "internal.h" +#define EBTABLES_PATH "ebtables" +#define IPTABLES_PATH "iptables" +#define IP6TABLES_PATH "ip6tables" + typedef struct _virFirewall virFirewall; typedef struct _virFirewallRule virFirewallRule; diff --git a/src/util/viriscsi.h b/src/util/viriscsi.h index 6d17d139eb..fa7ff280c2 100644 --- a/src/util/viriscsi.h +++ b/src/util/viriscsi.h @@ -23,6 +23,8 @@ #include "internal.h" +#define ISCSIADM "iscsiadm" + char * virISCSIGetSession(const char *devpath, bool probe) diff --git a/src/util/virkmod.h b/src/util/virkmod.h index bb043d4876..58311909eb 100644 --- a/src/util/virkmod.h +++ b/src/util/virkmod.h @@ -23,6 +23,9 @@ #include "internal.h" +#define MODPROBE "modprobe" +#define RMMOD "rmmod" + char *virKModLoad(const char *) ATTRIBUTE_NONNULL(1); char *virKModUnload(const char *) diff --git a/src/util/virnetdevbandwidth.h b/src/util/virnetdevbandwidth.h index 3d520721f6..6c91bd0f33 100644 --- a/src/util/virnetdevbandwidth.h +++ b/src/util/virnetdevbandwidth.h @@ -21,6 +21,8 @@ #include "internal.h" #include "virmacaddr.h" +#define TC "tc" + typedef struct _virNetDevBandwidthRate virNetDevBandwidthRate; struct _virNetDevBandwidthRate { unsigned long long average; /* kbytes/s */ diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c index 0ce8f5b536..f4cf6ac39f 100644 --- a/src/util/virnetdevip.c +++ b/src/util/virnetdevip.c @@ -50,6 +50,8 @@ #define VIR_FROM_THIS VIR_FROM_NONE +#define IP_PATH "ip" + VIR_LOG_INIT("util.netdevip"); #if defined(WITH_LIBNL) diff --git a/src/util/virnetdevmidonet.c b/src/util/virnetdevmidonet.c index 9061f1516f..735607e5df 100644 --- a/src/util/virnetdevmidonet.c +++ b/src/util/virnetdevmidonet.c @@ -26,6 +26,8 @@ #define VIR_FROM_THIS VIR_FROM_NONE +#define MM_CTL "mm-ctl" + /** * virNetDevMidonetBindPort: * @ifname: the network interface name diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c index 21ee4bdd42..a05128dbca 100644 --- a/src/util/virnetdevopenvswitch.c +++ b/src/util/virnetdevopenvswitch.c @@ -35,6 +35,8 @@ VIR_LOG_INIT("util.netdevopenvswitch"); +#define OVS_VSCTL "ovs-vsctl" + /* * Set openvswitch default timeout */ diff --git a/src/util/virnuma.c b/src/util/virnuma.c index 0c9599003a..2a540d7a11 100644 --- a/src/util/virnuma.c +++ b/src/util/virnuma.c @@ -52,6 +52,7 @@ VIR_LOG_INIT("util.numa"); +#define NUMAD "numad" #if WITH_NUMAD char * diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c index af9e03c5ac..8bbda9ea69 100644 --- a/src/util/virsysinfo.c +++ b/src/util/virsysinfo.c @@ -53,6 +53,7 @@ static const char *sysinfoCpuinfo = "/proc/cpuinfo"; #define SYSINFO sysinfoSysinfo #define CPUINFO sysinfoCpuinfo #define CPUINFO_FILE_LEN (1024*1024) /* 1MB limit for /proc/cpuinfo file */ +#define DMIDECODE "dmidecode" void diff --git a/src/util/virutil.c b/src/util/virutil.c index 3f49a469e5..b7a9808f6a 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -57,6 +57,8 @@ #include "virutil.h" #include "virsocket.h" +#define UDEVADM "udevadm" + G_STATIC_ASSERT(sizeof(gid_t) <= sizeof(unsigned int) && sizeof(uid_t) <= sizeof(unsigned int)); -- 2.30.2

On Fri, Apr 16, 2021 at 09:12:45PM +0200, Pavel Hrdina wrote:
These binaries are used only during runtime so technically there is no need to check for them while compiling libvirt.
Usually the location is the same while compiling and running but it may not be true. In addition they are not strictly required to compile the code so this way developers don't have to install it or create fake binaries in order to compile the code.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- meson.build | 170 ++----------------------- src/bhyve/bhyve_command.c | 4 + src/locking/lock_driver_lockd.c | 12 +- src/network/bridge_driver.c | 2 + src/node_device/node_device_driver.c | 2 + src/qemu/qemu_conf.c | 5 + src/storage/storage_backend_logical.c | 13 ++ src/storage/storage_backend_sheepdog.c | 2 + src/storage/storage_backend_zfs.c | 3 + src/storage/storage_util.c | 2 + src/storage/storage_util.h | 6 + src/util/virdnsmasq.c | 1 + src/util/virfirewall.h | 4 + src/util/viriscsi.h | 2 + src/util/virkmod.h | 3 + src/util/virnetdevbandwidth.h | 2 + src/util/virnetdevip.c | 2 + src/util/virnetdevmidonet.c | 2 + src/util/virnetdevopenvswitch.c | 2 + src/util/virnuma.c | 1 + src/util/virsysinfo.c | 1 + src/util/virutil.c | 2 + 22 files changed, 72 insertions(+), 171 deletions(-)
@@ -1865,11 +1763,9 @@ if conf.has('WITH_LIBVIRTD') error('Need glusterfs (libgfapi) for gluster storage driver') endif
- if not get_option('storage_iscsi').disabled() and iscsiadm_prog.found() + if not get_option('storage_iscsi').disabled() use_storage = true conf.set('WITH_STORAGE_ISCSI', 1)
So this now enables iSCSI even on platforms which don't support iscsiadm tools.
- elif get_option('storage_iscsi').enabled() - error('We need iscsiadm for iSCSI storage driver') endif
if not get_option('storage_iscsi_direct').disabled() and libiscsi_dep.found() @@ -1880,31 +1776,8 @@ if conf.has('WITH_LIBVIRTD') endif
if not get_option('storage_lvm').disabled()
snip
+ use_storage = true + conf.set('WITH_STORAGE_LVM', 1)
And enables LVM on all platforms, even though this is Linux only.. Overall this patch makes it so that our meson rules don't "do the right thing" as a default behaviour, and just enable everything whether you have it installed or not. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Mon, 2021-04-19 at 13:35 +0100, Daniel P. Berrangé wrote:
On Fri, Apr 16, 2021 at 09:12:45PM +0200, Pavel Hrdina wrote:
- if not get_option('storage_iscsi').disabled() and iscsiadm_prog.found() + if not get_option('storage_iscsi').disabled() use_storage = true conf.set('WITH_STORAGE_ISCSI', 1)
So this now enables iSCSI even on platforms which don't support iscsiadm tools.
+ use_storage = true + conf.set('WITH_STORAGE_LVM', 1)
And enables LVM on all platforms, even though this is Linux only..
Overall this patch makes it so that our meson rules don't "do the right thing" as a default behaviour, and just enable everything whether you have it installed or not.
Can't we address that by implementing explicit OS checks? Right now we're using "the iscsiadm command happens to be installed on the build host" as a proxy for "the iscsiadm command will be available on the deployment host", which is not a bad approximation but is not quite right either. -- Andrea Bolognani / Red Hat / Virtualization

On Mon, Apr 19, 2021 at 06:01:42PM +0200, Andrea Bolognani wrote:
On Mon, 2021-04-19 at 13:35 +0100, Daniel P. Berrangé wrote:
On Fri, Apr 16, 2021 at 09:12:45PM +0200, Pavel Hrdina wrote:
- if not get_option('storage_iscsi').disabled() and iscsiadm_prog.found() + if not get_option('storage_iscsi').disabled() use_storage = true conf.set('WITH_STORAGE_ISCSI', 1)
So this now enables iSCSI even on platforms which don't support iscsiadm tools.
+ use_storage = true + conf.set('WITH_STORAGE_LVM', 1)
And enables LVM on all platforms, even though this is Linux only..
Overall this patch makes it so that our meson rules don't "do the right thing" as a default behaviour, and just enable everything whether you have it installed or not.
Can't we address that by implementing explicit OS checks?
For some of the that's easy, if they're obviously Linux or FreeBSD specific. Others though the platform supportability is not so clear, at least not unless someone wants to check the tools and what platforms they genuinely claim to support.
Right now we're using "the iscsiadm command happens to be installed on the build host" as a proxy for "the iscsiadm command will be available on the deployment host", which is not a bad approximation but is not quite right either.
Both approaches are approximations - checking the binary may miss out platforms where the feature is possible but not installed by the user. Checking the OS platform may miss out platforms where libvirt devs didn't realize there was support for the 3rd party tool. The former was more the favoured approach as it removes libvirt devs from being the problem, and makes the users' be the problem :-) Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Mon, Apr 19, 2021 at 05:05:56PM +0100, Daniel P. Berrangé wrote:
On Mon, Apr 19, 2021 at 06:01:42PM +0200, Andrea Bolognani wrote:
On Mon, 2021-04-19 at 13:35 +0100, Daniel P. Berrangé wrote:
On Fri, Apr 16, 2021 at 09:12:45PM +0200, Pavel Hrdina wrote:
- if not get_option('storage_iscsi').disabled() and iscsiadm_prog.found() + if not get_option('storage_iscsi').disabled() use_storage = true conf.set('WITH_STORAGE_ISCSI', 1)
So this now enables iSCSI even on platforms which don't support iscsiadm tools.
+ use_storage = true + conf.set('WITH_STORAGE_LVM', 1)
And enables LVM on all platforms, even though this is Linux only..
Overall this patch makes it so that our meson rules don't "do the right thing" as a default behaviour, and just enable everything whether you have it installed or not.
Can't we address that by implementing explicit OS checks?
For some of the that's easy, if they're obviously Linux or FreeBSD specific. Others though the platform supportability is not so clear, at least not unless someone wants to check the tools and what platforms they genuinely claim to support.
Right now we're using "the iscsiadm command happens to be installed on the build host" as a proxy for "the iscsiadm command will be available on the deployment host", which is not a bad approximation but is not quite right either.
Both approaches are approximations - checking the binary may miss out platforms where the feature is possible but not installed by the user. Checking the OS platform may miss out platforms where libvirt devs didn't realize there was support for the 3rd party tool. The former was more the favoured approach as it removes libvirt devs from being the problem, and makes the users' be the problem :-)
In addition it allows devs to compile that part of code without installing the binaries or in some cases without using hacks like this: ln -s /required/bin /usr/bin/true So I would prefer checking binaries instead of OS checks. Pavel

On Mon, Apr 19, 2021 at 06:22:18PM +0200, Pavel Hrdina wrote:
On Mon, Apr 19, 2021 at 05:05:56PM +0100, Daniel P. Berrangé wrote:
On Mon, Apr 19, 2021 at 06:01:42PM +0200, Andrea Bolognani wrote:
On Mon, 2021-04-19 at 13:35 +0100, Daniel P. Berrangé wrote:
On Fri, Apr 16, 2021 at 09:12:45PM +0200, Pavel Hrdina wrote:
- if not get_option('storage_iscsi').disabled() and iscsiadm_prog.found() + if not get_option('storage_iscsi').disabled() use_storage = true conf.set('WITH_STORAGE_ISCSI', 1)
So this now enables iSCSI even on platforms which don't support iscsiadm tools.
+ use_storage = true + conf.set('WITH_STORAGE_LVM', 1)
And enables LVM on all platforms, even though this is Linux only..
Overall this patch makes it so that our meson rules don't "do the right thing" as a default behaviour, and just enable everything whether you have it installed or not.
Can't we address that by implementing explicit OS checks?
For some of the that's easy, if they're obviously Linux or FreeBSD specific. Others though the platform supportability is not so clear, at least not unless someone wants to check the tools and what platforms they genuinely claim to support.
Right now we're using "the iscsiadm command happens to be installed on the build host" as a proxy for "the iscsiadm command will be available on the deployment host", which is not a bad approximation but is not quite right either.
Both approaches are approximations - checking the binary may miss out platforms where the feature is possible but not installed by the user. Checking the OS platform may miss out platforms where libvirt devs didn't realize there was support for the 3rd party tool. The former was more the favoured approach as it removes libvirt devs from being the problem, and makes the users' be the problem :-)
In addition it allows devs to compile that part of code without installing the binaries or in some cases without using hacks like this:
ln -s /required/bin /usr/bin/true
So I would prefer checking binaries instead of OS checks.
If we only check when the meson feature config is "auto", then we dont need the link hacks - just set "-Dfeature=on" when running meson. Once we only use the checks for the "auto" case, then it is less critical if our check is wrong, as it can be overridden. Given this, I think we could have a mixture of binary or OS checks depending on what is best suited. eg LVM could easily be a linux OS check, whle sheepdog still best as a binary check. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Mon, Apr 19, 2021 at 05:26:55PM +0100, Daniel P. Berrangé wrote:
On Mon, Apr 19, 2021 at 06:22:18PM +0200, Pavel Hrdina wrote:
On Mon, Apr 19, 2021 at 05:05:56PM +0100, Daniel P. Berrangé wrote:
On Mon, Apr 19, 2021 at 06:01:42PM +0200, Andrea Bolognani wrote:
On Mon, 2021-04-19 at 13:35 +0100, Daniel P. Berrangé wrote:
On Fri, Apr 16, 2021 at 09:12:45PM +0200, Pavel Hrdina wrote:
- if not get_option('storage_iscsi').disabled() and iscsiadm_prog.found() + if not get_option('storage_iscsi').disabled() use_storage = true conf.set('WITH_STORAGE_ISCSI', 1)
So this now enables iSCSI even on platforms which don't support iscsiadm tools.
+ use_storage = true + conf.set('WITH_STORAGE_LVM', 1)
And enables LVM on all platforms, even though this is Linux only..
Overall this patch makes it so that our meson rules don't "do the right thing" as a default behaviour, and just enable everything whether you have it installed or not.
Can't we address that by implementing explicit OS checks?
For some of the that's easy, if they're obviously Linux or FreeBSD specific. Others though the platform supportability is not so clear, at least not unless someone wants to check the tools and what platforms they genuinely claim to support.
Right now we're using "the iscsiadm command happens to be installed on the build host" as a proxy for "the iscsiadm command will be available on the deployment host", which is not a bad approximation but is not quite right either.
Both approaches are approximations - checking the binary may miss out platforms where the feature is possible but not installed by the user. Checking the OS platform may miss out platforms where libvirt devs didn't realize there was support for the 3rd party tool. The former was more the favoured approach as it removes libvirt devs from being the problem, and makes the users' be the problem :-)
In addition it allows devs to compile that part of code without installing the binaries or in some cases without using hacks like this:
ln -s /required/bin /usr/bin/true
So I would prefer checking binaries instead of OS checks.
If we only check when the meson feature config is "auto", then we dont need the link hacks - just set "-Dfeature=on" when running meson.
Once we only use the checks for the "auto" case, then it is less critical if our check is wrong, as it can be overridden. Given this, I think we could have a mixture of binary or OS checks depending on what is best suited.
That's what I'm aiming for in v2. Currently this is not possible and that hack is the only way in some cases. Pavel
eg LVM could easily be a linux OS check, whle sheepdog still best as a binary check.
Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

Drop code that creates defines with program paths and update the comment to reflect current usage of optional_programs. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- meson.build | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/meson.build b/meson.build index 1c27dd030e..7e377fab9c 100644 --- a/meson.build +++ b/meson.build @@ -922,7 +922,7 @@ foreach item : required_programs_groups endforeach -# optional programs +# optional programs used while building libvirt optional_programs = [ 'augparse', @@ -933,14 +933,6 @@ optional_programs = [ foreach name : optional_programs prog = find_program(name, required: false, dirs: libvirt_sbin_path) varname = name.underscorify() - if prog.found() - prog_path = prog.path() - else - prog_path = name - endif - - conf.set_quoted(varname.to_upper(), prog_path) - conf.set_quoted('@0@_PATH'.format(varname.to_upper()), prog_path) set_variable('@0@_prog'.format(varname), prog) endforeach -- 2.30.2

On Fri, Apr 16, 2021 at 3:13 PM Pavel Hrdina <phrdina@redhat.com> wrote:
Recent attempt to add a lot of meson options to specify different runtime paths motivated me enough to cleanup this from meson.
Pavel Hrdina (17): bridge_driver: fix comment about dnsmasqCaps virdnsmasq: drop unused dnsmasqCapsNewFromFile function virdnsmasq: drop unused dnsmasqCapsRefresh function virdnsmasq: remove binaryPath argument from dnsmasqCapsNewFromBuffer virdnsmasq: remove binaryPath argument from dnsmasqCapsNewFromBinary virfirewall: use virFindFileInPath instead of virFileIsExecutable tests: introduce virfirewallmock tests: use virfirewallmock instead of hasNetfilterTools virnetdev: move virNetDevSetRootQDisc to virnetdevbandwidth tests: testutilsqemu: move virFindFileInPath into domaincapsmock meson: don't check collie as program for sheepdog bhyvexml2argvtest: use virCommandToStringFull to strip command path storage: use virFindFileInPath to validate presence of mkfs virfile: introduce virFindFileInPathFull() qemu_conf: use virFindFileInPathFull for runtime binaries meson: drop check for runtime binary dependencies meson: optional_programs should be used only for building libvirt
meson.build | 180 +----------------- src/bhyve/bhyve_command.c | 4 + src/libvirt_private.syms | 6 +- src/locking/lock_driver_lockd.c | 12 +- src/network/bridge_driver.c | 8 +- src/node_device/node_device_driver.c | 2 + src/qemu/qemu_conf.c | 23 ++- src/qemu/qemu_domain.c | 3 +- src/storage/storage_backend_fs.c | 24 +-- src/storage/storage_backend_logical.c | 13 ++ src/storage/storage_backend_sheepdog.c | 2 + src/storage/storage_backend_zfs.c | 3 + src/storage/storage_util.c | 2 + src/storage/storage_util.h | 6 + src/util/virdnsmasq.c | 56 +----- src/util/virdnsmasq.h | 8 +- src/util/virfile.c | 16 +- src/util/virfile.h | 6 +- src/util/virfirewall.c | 4 +- src/util/virfirewall.h | 4 + src/util/viriscsi.h | 2 + src/util/virkmod.h | 3 + src/util/virnetdev.c | 46 ----- src/util/virnetdev.h | 4 - src/util/virnetdevbandwidth.c | 50 +++++ src/util/virnetdevbandwidth.h | 6 + src/util/virnetdevip.c | 2 + src/util/virnetdevmidonet.c | 2 + src/util/virnetdevopenvswitch.c | 2 + src/util/virnuma.c | 1 + src/util/virsysinfo.c | 1 + src/util/virutil.c | 2 + .../bhyvexml2argv-acpiapic.args | 2 +- .../bhyvexml2argv-acpiapic.ldargs | 2 +- ...ml2argv-addr-isa-controller-on-slot-1.args | 2 +- ...2argv-addr-isa-controller-on-slot-1.ldargs | 2 +- ...l2argv-addr-isa-controller-on-slot-31.args | 2 +- ...argv-addr-isa-controller-on-slot-31.ldargs | 2 +- ...xml2argv-addr-more-than-32-sata-disks.args | 2 +- ...l2argv-addr-more-than-32-sata-disks.ldargs | 2 +- ...hyvexml2argv-addr-multiple-sata-disks.args | 2 +- ...vexml2argv-addr-multiple-sata-disks.ldargs | 2 +- ...vexml2argv-addr-multiple-virtio-disks.args | 2 +- ...xml2argv-addr-multiple-virtio-disks.ldargs | 2 +- ...rgv-addr-no32devs-multiple-sata-disks.args | 2 +- ...v-addr-no32devs-multiple-sata-disks.ldargs | 2 +- ...l2argv-addr-no32devs-single-sata-disk.args | 2 +- ...argv-addr-no32devs-single-sata-disk.ldargs | 2 +- ...rgv-addr-non-isa-controller-on-slot-1.args | 2 +- .../bhyvexml2argv-addr-single-sata-disk.args | 2 +- ...bhyvexml2argv-addr-single-sata-disk.ldargs | 2 +- ...bhyvexml2argv-addr-single-virtio-disk.args | 2 +- ...yvexml2argv-addr-single-virtio-disk.ldargs | 2 +- .../bhyvexml2argvdata/bhyvexml2argv-base.args | 2 +- .../bhyvexml2argv-base.ldargs | 2 +- .../bhyvexml2argv-bhyveload-bootorder.args | 2 +- .../bhyvexml2argv-bhyveload-bootorder.ldargs | 2 +- .../bhyvexml2argv-bhyveload-bootorder1.args | 2 +- .../bhyvexml2argv-bhyveload-bootorder1.ldargs | 2 +- .../bhyvexml2argv-bhyveload-bootorder3.args | 2 +- .../bhyvexml2argv-bhyveload-bootorder3.ldargs | 2 +- .../bhyvexml2argv-bhyveload-explicitargs.args | 2 +- ...hyvexml2argv-bhyveload-explicitargs.ldargs | 2 +- .../bhyvexml2argv-commandline.args | 2 +- .../bhyvexml2argv-commandline.ldargs | 2 +- ...gv-console-master-slave-not-specified.args | 2 +- ...-console-master-slave-not-specified.ldargs | 2 +- .../bhyvexml2argv-console.args | 2 +- .../bhyvexml2argv-console.ldargs | 2 +- .../bhyvexml2argv-cputopology.args | 2 +- .../bhyvexml2argv-cputopology.ldargs | 2 +- .../bhyvexml2argv-custom-loader.args | 2 +- .../bhyvexml2argv-custom-loader.ldargs | 2 +- .../bhyvexml2argv-disk-cdrom-grub.args | 2 +- .../bhyvexml2argv-disk-cdrom-grub.ldargs | 2 +- .../bhyvexml2argv-disk-cdrom.args | 2 +- .../bhyvexml2argv-disk-cdrom.ldargs | 2 +- .../bhyvexml2argv-disk-virtio.args | 2 +- .../bhyvexml2argv-disk-virtio.ldargs | 2 +- .../bhyvexml2argv-firmware-efi.args | 2 +- .../bhyvexml2argv-fs-9p-readonly.args | 2 +- .../bhyvexml2argv-fs-9p-readonly.ldargs | 2 +- .../bhyvexml2argv-fs-9p.args | 2 +- .../bhyvexml2argv-fs-9p.ldargs | 2 +- .../bhyvexml2argv-grub-bootorder.args | 2 +- .../bhyvexml2argv-grub-bootorder.ldargs | 2 +- .../bhyvexml2argv-grub-bootorder2.args | 2 +- .../bhyvexml2argv-grub-bootorder2.ldargs | 2 +- .../bhyvexml2argv-grub-defaults.args | 2 +- .../bhyvexml2argv-grub-defaults.ldargs | 2 +- .../bhyvexml2argv-input-xhci-tablet.args | 2 +- .../bhyvexml2argv-input-xhci-tablet.ldargs | 2 +- .../bhyvexml2argv-isa-controller.args | 2 +- .../bhyvexml2argv-isa-controller.ldargs | 2 +- .../bhyvexml2argv-localtime.args | 2 +- .../bhyvexml2argv-localtime.ldargs | 2 +- .../bhyvexml2argv-macaddr.args | 2 +- .../bhyvexml2argv-macaddr.ldargs | 2 +- .../bhyvexml2argvdata/bhyvexml2argv-msrs.args | 2 +- .../bhyvexml2argv-msrs.ldargs | 2 +- .../bhyvexml2argv-net-e1000.args | 2 +- .../bhyvexml2argv-net-e1000.ldargs | 2 +- .../bhyvexml2argv-serial-grub-nocons.args | 2 +- .../bhyvexml2argv-serial-grub-nocons.ldargs | 2 +- .../bhyvexml2argv-serial-grub.args | 2 +- .../bhyvexml2argv-serial-grub.ldargs | 2 +- .../bhyvexml2argv-serial.args | 2 +- .../bhyvexml2argv-serial.ldargs | 2 +- .../bhyvexml2argv-sound.args | 2 +- .../bhyvexml2argv-sound.ldargs | 2 +- .../bhyvexml2argvdata/bhyvexml2argv-uefi.args | 2 +- .../bhyvexml2argv-vnc-autoport.args | 2 +- .../bhyvexml2argv-vnc-password.args | 2 +- .../bhyvexml2argv-vnc-resolution.args | 2 +- .../bhyvexml2argv-vnc-vgaconf-io.args | 2 +- .../bhyvexml2argv-vnc-vgaconf-off.args | 2 +- .../bhyvexml2argv-vnc-vgaconf-on.args | 2 +- .../bhyvexml2argvdata/bhyvexml2argv-vnc.args | 2 +- .../bhyvexml2argv-wired.args | 2 +- .../bhyvexml2argv-wired.ldargs | 2 +- tests/bhyvexml2argvtest.c | 4 +- tests/domaincapsmock.c | 17 ++ tests/meson.build | 1 + tests/networkxml2conftest.c | 6 +- tests/networkxml2firewalltest.c | 16 +- tests/nwfilterebiptablestest.c | 15 +- tests/nwfilterxml2firewalltest.c | 14 +- tests/qemuxml2argvmock.c | 5 +- tests/testutilsqemu.c | 15 -- tests/virfirewallmock.c | 35 ++++ tests/virfirewalltest.c | 15 +- 131 files changed, 340 insertions(+), 482 deletions(-) create mode 100644 tests/virfirewallmock.c
I don't think this is a good "cleanup" to do. Having these checks is useful since without them, we'd blindly build modules that possibly wouldn't work because we haven't verified that those dependencies exist. People do install from source into runtime (I don't, but people do), and it's useful for making sure all the necessary dependencies are captured for runtime use at build-time for package builds (I've caught mistakes because of these). So I NACK the whole series. -- 真実はいつも一つ!/ Always, there's only one truth!

On 4/19/21 2:24 PM, Neal Gompa wrote:
On Fri, Apr 16, 2021 at 3:13 PM Pavel Hrdina <phrdina@redhat.com> wrote:
I don't think this is a good "cleanup" to do. Having these checks is useful since without them, we'd blindly build modules that possibly wouldn't work because we haven't verified that those dependencies exist. People do install from source into runtime (I don't, but people do), and it's useful for making sure all the necessary dependencies are captured for runtime use at build-time for package builds (I've caught mistakes because of these).
To be fair though, some cleanups Pavel did are worth merging (e.g. couple of first patches that fix comments or remove unused functions) regardless of ...
So I NACK the whole series.
this NACK. What I am worried about is that usually, when a distro builds libvirt package a path to a runtime binary will be recorded (e.g. DNSMASQ will be expanded to /usr/sbin/dnsmasq and compiled in). This way, we will try to find "dnsmasq" in PATH, which may work for qemu:///system, but may lead to unexpected results for qemu:///session because for instance I override PATH for my regular user so that a directory with my helper scripts comes first. Let's hope that I won't pick wrong name for my scripts. Michal

On Mon, Apr 19, 2021 at 02:50:13PM +0200, Michal Privoznik wrote:
On 4/19/21 2:24 PM, Neal Gompa wrote:
On Fri, Apr 16, 2021 at 3:13 PM Pavel Hrdina <phrdina@redhat.com> wrote:
I don't think this is a good "cleanup" to do. Having these checks is useful since without them, we'd blindly build modules that possibly wouldn't work because we haven't verified that those dependencies exist. People do install from source into runtime (I don't, but people do), and it's useful for making sure all the necessary dependencies are captured for runtime use at build-time for package builds (I've caught mistakes because of these).
To be fair though, some cleanups Pavel did are worth merging (e.g. couple of first patches that fix comments or remove unused functions) regardless of ...
So I NACK the whole series.
this NACK. What I am worried about is that usually, when a distro builds libvirt package a path to a runtime binary will be recorded (e.g. DNSMASQ will be expanded to /usr/sbin/dnsmasq and compiled in). This way, we will try to find "dnsmasq" in PATH, which may work for qemu:///system, but may lead to unexpected results for qemu:///session because for instance I override PATH for my regular user so that a directory with my helper scripts comes first. Let's hope that I won't pick wrong name for my scripts.
I think that's actually the desirable situation for libvirtd running as non-root. If the user overrides a system binary with an alternate impl, it is right that we honour that. I think we ought to consider two parts to this series - honouring $PATH, and probing at meson time. We can have the former, without changing the latter, so we still get feature auto-detection at build time to avoid uncessarily building stuff that's not appropriate for the OS in question. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Mon, Apr 19, 2021 at 01:59:52PM +0100, Daniel P. Berrangé wrote:
On Mon, Apr 19, 2021 at 02:50:13PM +0200, Michal Privoznik wrote:
On 4/19/21 2:24 PM, Neal Gompa wrote:
On Fri, Apr 16, 2021 at 3:13 PM Pavel Hrdina <phrdina@redhat.com> wrote:
I don't think this is a good "cleanup" to do. Having these checks is useful since without them, we'd blindly build modules that possibly wouldn't work because we haven't verified that those dependencies exist. People do install from source into runtime (I don't, but people do), and it's useful for making sure all the necessary dependencies are captured for runtime use at build-time for package builds (I've caught mistakes because of these).
To be fair though, some cleanups Pavel did are worth merging (e.g. couple of first patches that fix comments or remove unused functions) regardless of ...
So I NACK the whole series.
this NACK. What I am worried about is that usually, when a distro builds libvirt package a path to a runtime binary will be recorded (e.g. DNSMASQ will be expanded to /usr/sbin/dnsmasq and compiled in). This way, we will try to find "dnsmasq" in PATH, which may work for qemu:///system, but may lead to unexpected results for qemu:///session because for instance I override PATH for my regular user so that a directory with my helper scripts comes first. Let's hope that I won't pick wrong name for my scripts.
I think that's actually the desirable situation for libvirtd running as non-root. If the user overrides a system binary with an alternate impl, it is right that we honour that.
Agreed.
I think we ought to consider two parts to this series - honouring $PATH, and probing at meson time. We can have the former, without changing the latter, so we still get feature auto-detection at build time to avoid uncessarily building stuff that's not appropriate for the OS in question.
I was about to propose that as well. We can have check for some binaries in meson to figure out if something should be enabled or not for features that have value set to "auto" so by default meson would do the "right" thing. But if a user/developer explicitly enables some feature, for example iscsi storage we should not error out if the binary is missing because the code can be compiled without the binary. This would also allow package maintainers to reduce a list of build dependencies that are required. I'll post a v2 with this approach. Thanks Pavel

On Mon, Apr 19, 2021 at 11:10 AM Pavel Hrdina <phrdina@redhat.com> wrote:
On Mon, Apr 19, 2021 at 01:59:52PM +0100, Daniel P. Berrangé wrote:
On Mon, Apr 19, 2021 at 02:50:13PM +0200, Michal Privoznik wrote:
On 4/19/21 2:24 PM, Neal Gompa wrote:
On Fri, Apr 16, 2021 at 3:13 PM Pavel Hrdina <phrdina@redhat.com> wrote:
I don't think this is a good "cleanup" to do. Having these checks is useful since without them, we'd blindly build modules that possibly wouldn't work because we haven't verified that those dependencies exist. People do install from source into runtime (I don't, but people do), and it's useful for making sure all the necessary dependencies are captured for runtime use at build-time for package builds (I've caught mistakes because of these).
To be fair though, some cleanups Pavel did are worth merging (e.g. couple of first patches that fix comments or remove unused functions) regardless of ...
So I NACK the whole series.
this NACK. What I am worried about is that usually, when a distro builds libvirt package a path to a runtime binary will be recorded (e.g. DNSMASQ will be expanded to /usr/sbin/dnsmasq and compiled in). This way, we will try to find "dnsmasq" in PATH, which may work for qemu:///system, but may lead to unexpected results for qemu:///session because for instance I override PATH for my regular user so that a directory with my helper scripts comes first. Let's hope that I won't pick wrong name for my scripts.
I think that's actually the desirable situation for libvirtd running as non-root. If the user overrides a system binary with an alternate impl, it is right that we honour that.
Agreed.
I think we ought to consider two parts to this series - honouring $PATH, and probing at meson time. We can have the former, without changing the latter, so we still get feature auto-detection at build time to avoid uncessarily building stuff that's not appropriate for the OS in question.
I was about to propose that as well. We can have check for some binaries in meson to figure out if something should be enabled or not for features that have value set to "auto" so by default meson would do the "right" thing.
But if a user/developer explicitly enables some feature, for example iscsi storage we should not error out if the binary is missing because the code can be compiled without the binary. This would also allow package maintainers to reduce a list of build dependencies that are required.
I'll post a v2 with this approach.
So, I think you *shouldn't* do it that way. The problem with doing this is that we can wind up with mismatched capabilities and non-functional libvirt build based on the assumption that things will just "be there" with no check that they will actually be there. In other words, runtime executable dependencies should be treated *exactly* as they are now, because we have no other avenue to guarantee that things work for a given installation. -- 真実はいつも一つ!/ Always, there's only one truth!
participants (5)
-
Andrea Bolognani
-
Daniel P. Berrangé
-
Michal Privoznik
-
Neal Gompa
-
Pavel Hrdina