From nobody Fri May 17 11:58:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1618600390; cv=none; d=zohomail.com; s=zohoarc; b=f/LhAtyTMCT3Af8nIwcTs7TCKUZVYwLHTyFupTbWiuxJRrzUKLGynbQjO0/nGRWe8q7dMO2IQUYDgUuU97SX4OWZWmUmivxzJHiZfBgTNQMdtA6yOlLfi/rpH5enAx/4cnjDk8FxhBJPZVLuqiwgeTvlcquieUjPpFrsrNcZSS4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618600390; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=r0S4jNo0m9RyHA6CgdVr+owipUpZWhAOAxHJ7hPgigY=; b=W7Y1y7LflNVVGPmAWrZ33iW+tBV6u6aDAwzJ8GLXVXoBOQ4CqgqjcAre0Jdy71/Ob0DQcGwwZzhl/fuHpsFu7ax8Qt36fLRhI2ne85tOlGeJuVU+TAbNd7tLAI5cgrNGkd4RhW+kzrd6KWnz3wKppzSdxQjek3Eg0Ht5DMo2x3E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1618600390956564.9343706524303; Fri, 16 Apr 2021 12:13:10 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-179-WJ0wY3VBMh6i75kSdlj_Dg-1; Fri, 16 Apr 2021 15:13:07 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 637458030A1; Fri, 16 Apr 2021 19:13:00 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D7D625C260; Fri, 16 Apr 2021 19:12:59 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B01F644A5F; Fri, 16 Apr 2021 19:12:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13GJCrYx028190 for ; Fri, 16 Apr 2021 15:12:53 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5783F5D749; Fri, 16 Apr 2021 19:12:53 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.195.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id CC0DE5D6D3 for ; Fri, 16 Apr 2021 19:12:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618600389; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=r0S4jNo0m9RyHA6CgdVr+owipUpZWhAOAxHJ7hPgigY=; b=WVrTxv1yVQxoYrO/Rtocw1K1axiht8DYDeAOLOeRnE+yBfjPXWnSDgWEvfXD3UjHJ8ES2O MvN9TL8xvR44Uel7/dxDCJ2+yTQrQdKO/PwMjCP6WegabFTHntoqNEBF1mFshGz7MFKMOd DHmDXh1up6A0kg6enJSeEdidUEYZLlk= X-MC-Unique: WJ0wY3VBMh6i75kSdlj_Dg-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 01/17] bridge_driver: fix comment about dnsmasqCaps Date: Fri, 16 Apr 2021 21:12:30 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" We will never call dnsmasqCapsRefresh() so reflect what actually happens. Signed-off-by: Pavel Hrdina --- 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; =20 - /* if this fails now, it will be retried later with dnsmasqCapsRefresh= () */ + /* if this fails now, it will be retried later with networkDnsmasqCaps= Refresh() */ network_driver->dnsmasqCaps =3D dnsmasqCapsNewFromBinary(DNSMASQ); =20 if (!(network_driver->networks =3D virNetworkObjListNew())) --=20 2.30.2 From nobody Fri May 17 11:58:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1618600443; cv=none; d=zohomail.com; s=zohoarc; b=Q/WyhApT3fKMlFKxg1cmfLCxPXLoMBIaEWCAJAHEIZvnO93b/Z+3TNE85OESxrK12HGnzyE0HUdgiOfVUKTAQmailUqgaYC41kh1ky8BUgF6GBy12LPS5zH9F18LO3P28CNqfY9yd5X18Ng5tai5T8Egy3Hjfmbj06MmsOTHE4M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618600443; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3CMSMd4gydE/dtlVKm4Hr/OoyBc/7y0b11FU6GAkp7c=; b=Dru9j4S0MMTldMJ2Pt+2JOYGPkwP5vsIV+FA9uyTWAmBdnQmOH33p/GR/q9DErcgrV8NBsvllBBiz3pgs2Y0asawCjmR1iHRMf2ioH8aZVqGzYHaYNlQaBFgp6Du0Yu4Ak7mkoqo6KIEONJbsFSNmRrxtG55pkEuU4pTiWkOksg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1618600443495269.1475626455116; Fri, 16 Apr 2021 12:14:03 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-182-NaPkzUNhMTeqxgtDNPyeWA-1; Fri, 16 Apr 2021 15:13:18 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4111E18397A4; Fri, 16 Apr 2021 19:13:14 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1211C2B3BA; Fri, 16 Apr 2021 19:13:14 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id CD44A1806D17; Fri, 16 Apr 2021 19:13:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13GJCsG5028201 for ; Fri, 16 Apr 2021 15:12:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id 377DC5D749; Fri, 16 Apr 2021 19:12:54 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.195.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id AB5D55D6D3 for ; Fri, 16 Apr 2021 19:12:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618600442; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=3CMSMd4gydE/dtlVKm4Hr/OoyBc/7y0b11FU6GAkp7c=; b=Zd3s2o3BdeStbLowGCVBSMtg2AVHhn1hfkMDuqYKM0ssSlRp8wbL+81ufJaFrVvoybW0Xw PLIU60JzcgFQO5Wj3ZZxDkQbokaJiCuXaTLKhXznrh0AE17h36tI6Zlv60J1nFITbvCb7b jWVgtsUlP6RPT+VYXQM0GNVhCwnyjVY= X-MC-Unique: NaPkzUNhMTeqxgtDNPyeWA-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 02/17] virdnsmasq: drop unused dnsmasqCapsNewFromFile function Date: Fri, 16 Apr 2021 21:12:31 +0200 Message-Id: <46afab0b264e6892dc180313231154b713137966.1618600267.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Instead of removing binaryPath let's drop the function completely as it is not used anywhere. Signed-off-by: Pavel Hrdina --- 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) =20 } =20 -static int -dnsmasqCapsSetFromFile(dnsmasqCaps *caps, const char *path) -{ - int ret =3D -1; - g_autofree char *buf =3D NULL; - - if (virFileReadAll(path, 1024 * 1024, &buf) < 0) - goto cleanup; - - ret =3D 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; } =20 -dnsmasqCaps * -dnsmasqCapsNewFromFile(const char *dataPath, const char *binaryPath) -{ - dnsmasqCaps *caps =3D 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); =20 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); --=20 2.30.2 From nobody Fri May 17 11:58:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1618600403; cv=none; d=zohomail.com; s=zohoarc; b=eUI97ZOz9dV228cJLhdF4wFs6P3Xuxz+TqD06YSP79RarfaNNECB0DyzwnmH98pExRt/8wp4Pw2bvnLQD9ktw2nqcJufnpBE/pIMfAnezb7Nv7kv+ZeNHzlTnQThQrqxvGe+yhjYZVzlwAcnjZVkXkapJ0Lcnqfscl2lrVCnliA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618600403; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lfOjQPW7EJ7OpJqeueW/w23qwyKS94Z1QbgE7GKAPc4=; b=K5Np2vMt+iPjeGp2hPd8Et7K3UdKafQQ6BHOiqC1VSVWZBRqIT0E67VXdk0WrChfoQ0+a3ONmk1PWRl9G7KwIBj21JFwzYqHWQFGTMGS64jpCCje758BAWiHP7NtFrFkRziKTy4QyZsBIc2wZd0NOxlAOKueW2ZBT5BSr4TSY5I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 161860040373413.961992442845371; Fri, 16 Apr 2021 12:13:23 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-74-JyiULBBGOR2L7kNueBPANA-1; Fri, 16 Apr 2021 15:13:19 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3FA18107ACC7; Fri, 16 Apr 2021 19:13:14 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 19ABC5D9E3; Fri, 16 Apr 2021 19:13:14 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id CE04A44A66; Fri, 16 Apr 2021 19:13:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13GJCtCg028207 for ; Fri, 16 Apr 2021 15:12:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id 14EDA5D749; Fri, 16 Apr 2021 19:12:55 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.195.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id 89CE15D6D3 for ; Fri, 16 Apr 2021 19:12:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618600402; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=lfOjQPW7EJ7OpJqeueW/w23qwyKS94Z1QbgE7GKAPc4=; b=WbsixExVuBoA3wzLgFGxjvCSVDMldk2Ux8AnlGQfPF/hb6CCmJuFtws8wbWL9zsVOfbGKY zqDjeXlqjz/FKAHFbvE6CQWGGmGolMLnsgqsS4lJxRHNN2wpnouSp9GAxbkI/UwWMLtV3+ 6G1+AiPsEBohXBSyEAkRe+ALvlSL9I0= X-MC-Unique: JyiULBBGOR2L7kNueBPANA-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 03/17] virdnsmasq: drop unused dnsmasqCapsRefresh function Date: Fri, 16 Apr 2021 21:12:32 +0200 Message-Id: <56c3dc56a11d5fcbd29a3fa824eb0d875dc18832.1618600267.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Instead of removing binaryPath let's drop the function completely as it is not used anywhere. Signed-off-by: Pavel Hrdina --- 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; } =20 -/** 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 =3D 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); --=20 2.30.2 From nobody Fri May 17 11:58:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1618600390; cv=none; d=zohomail.com; s=zohoarc; b=THqIOBRSAt21LJRsjFTjVjeZTIHWPWICshBGk+GWZfBgRNRf4jS9cO7yK0rX5GNsp30XaAr3F1+cvhqLhSkTe99UFn36lmGVvZhaAbsfv33RwFLh8UV5P+W02BDKPXnJAx8a2hGqaQe6YL7pnJH95YtC27Qvkf49jK2jK+Tmdg8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618600390; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=vf4Sqd0GN6rY8Exu3uYEeo5SPd0zlPpYYMvgglnQwAw=; b=QEznejopX0LyzFmD52TJjff4jhygRK8CubfDnLud78xSH+5nljqEKmJudVXUocb2C7pLb3uz1UgBKaFPh0z/BSEQ2bRUM5eARnx7Whv7KkUmf3UTC2fz01EfDryZOHR0W8fmJVProZN43jfDLCcdKtNKf+8+GUplyyNDKf5PwfI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1618600390614975.1050787778323; Fri, 16 Apr 2021 12:13:10 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-229-xvng5X5vMoGQaDpq-Hu0Cw-1; Fri, 16 Apr 2021 15:13:06 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AED8E107ACCD; Fri, 16 Apr 2021 19:13:00 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 92BF85D74B; Fri, 16 Apr 2021 19:13:00 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 8BA801809C82; Fri, 16 Apr 2021 19:12:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13GJCtMS028213 for ; Fri, 16 Apr 2021 15:12:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id E6F075D749; Fri, 16 Apr 2021 19:12:55 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.195.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id 679E65D6D3 for ; Fri, 16 Apr 2021 19:12:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618600389; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=vf4Sqd0GN6rY8Exu3uYEeo5SPd0zlPpYYMvgglnQwAw=; b=iJJz1HDdo6QGoBv6KZewrDMksVMFZYUf3EsxUWy/ovbUPcGCFeIfdD0IM9gEtKEJzoatgP r3ipTiM3phBAdpaGAVJVTqd5goVlgHJcVV1vBRjNW0dtKnsg/yA4jonhIxS4uRmiF+HP0L xybfefRbuqPnVlYlB6P8U5VE31AZc8A= X-MC-Unique: xvng5X5vMoGQaDpq-Hu0Cw-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 04/17] virdnsmasq: remove binaryPath argument from dnsmasqCapsNewFromBuffer Date: Fri, 16 Apr 2021 21:12:33 +0200 Message-Id: <4e534adae0f12bb6d9728e1a54a2bf31a936ee9f.1618600267.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" We always pass DNSMASQ so there is no need for the argument at all. Signed-off-by: Pavel Hrdina --- 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) } =20 dnsmasqCaps * -dnsmasqCapsNewFromBuffer(const char *buf, const char *binaryPath) +dnsmasqCapsNewFromBuffer(const char *buf) { - dnsmasqCaps *caps =3D dnsmasqCapsNewEmpty(binaryPath); + dnsmasqCaps *caps =3D dnsmasqCapsNewEmpty(DNSMASQ); =20 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); =20 -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 =3D 0; dnsmasqCaps *restricted - =3D dnsmasqCapsNewFromBuffer("Dnsmasq version 2.48", DNSMASQ); + =3D dnsmasqCapsNewFromBuffer("Dnsmasq version 2.48"); dnsmasqCaps *full - =3D dnsmasqCapsNewFromBuffer("Dnsmasq version 2.63\n--bind-dynamic= ", DNSMASQ); + =3D dnsmasqCapsNewFromBuffer("Dnsmasq version 2.63\n--bind-dynamic= "); dnsmasqCaps *dhcpv6 - =3D dnsmasqCapsNewFromBuffer("Dnsmasq version 2.64\n--bind-dynamic= ", DNSMASQ); + =3D dnsmasqCapsNewFromBuffer("Dnsmasq version 2.64\n--bind-dynamic= "); =20 #define DO_TEST(xname, xcaps) \ do { \ --=20 2.30.2 From nobody Fri May 17 11:58:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1618600464; cv=none; d=zohomail.com; s=zohoarc; b=MzWI8mOjXOJmL7hoBLYnRSM9VYkkYBm5na1v3Z/6Z0tq1kFA+YstXRroaOQq5juEKPzEBD0L4bxgyNzOm1FeY4SSkabYQjnQd9Vus3E8ADDfDKH09cOYQGzLsxDXCKS8wY7q4ncGKiLNOpIAlzwbl715W+EHOzf4IpYhAlvYid8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618600464; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=FlFbMWBcLapYZo2im8O+ASlZX+bxXCEIJwk1DPSJZnY=; b=a1J3w4Y+XAUFXKRRz1OaPv0v/DAI0iNLT0zJfsVDbBqaXjh+Z7Vgzb5LxIiZpa9/zmmRaBnLXNQNKXqZaIiOs3vFhhjlqUVs9Dv7xcjQwDkizby5xVtWVczJdhTpOqxYWxXmBCeorbZCjudUMA97jmpzxPvnMaSWFiai6WtnXJM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1618600464776924.7974278292697; Fri, 16 Apr 2021 12:14:24 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-155-sDO8EEAsOIOtsJD5yGsDjw-1; Fri, 16 Apr 2021 15:13:31 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B23BE106BAE3; Fri, 16 Apr 2021 19:13:20 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7E9452B3BC; Fri, 16 Apr 2021 19:13:20 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4854E5534C; Fri, 16 Apr 2021 19:13:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13GJCuts028224 for ; Fri, 16 Apr 2021 15:12:56 -0400 Received: by smtp.corp.redhat.com (Postfix) id C58045D749; Fri, 16 Apr 2021 19:12:56 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.195.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id 462925D6D3 for ; Fri, 16 Apr 2021 19:12:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618600463; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=FlFbMWBcLapYZo2im8O+ASlZX+bxXCEIJwk1DPSJZnY=; b=hrqCZ+d+dcBBBHLIEA3AvX35VWfk9OW65VvIR1wCn19XNDWhr5ZiwyWJIzVrZKSZvQ5j8O KIxb+TyFZGT0CGuY1NUfCbuUwbObGsLmm0ut64yLEUvwFPZX0JetaKTfIArTfCrqG1XBVV uu2HEIWa+ZwBJPxzdXni/q57pcjZPlA= X-MC-Unique: sDO8EEAsOIOtsJD5yGsDjw-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 05/17] virdnsmasq: remove binaryPath argument from dnsmasqCapsNewFromBinary Date: Fri, 16 Apr 2021 21:12:34 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" We always pass DNSMASQ so there is no need for the argument at all. Signed-off-by: Pavel Hrdina --- 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; =20 - if (!(caps =3D dnsmasqCapsNewFromBinary(DNSMASQ))) + if (!(caps =3D dnsmasqCapsNewFromBinary())) return -1; =20 networkDriverLock(driver); @@ -749,7 +749,7 @@ networkStateInitialize(bool privileged, goto error; =20 /* if this fails now, it will be retried later with networkDnsmasqCaps= Refresh() */ - network_driver->dnsmasqCaps =3D dnsmasqCapsNewFromBinary(DNSMASQ); + network_driver->dnsmasqCaps =3D dnsmasqCapsNewFromBinary(); =20 if (!(network_driver->networks =3D 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) } =20 dnsmasqCaps * -dnsmasqCapsNewFromBinary(const char *binaryPath) +dnsmasqCapsNewFromBinary(void) { - dnsmasqCaps *caps =3D dnsmasqCapsNewEmpty(binaryPath); + dnsmasqCaps *caps =3D dnsmasqCapsNewEmpty(DNSMASQ); =20 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 *ct= x); int dnsmasqReload(pid_t pid); =20 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); --=20 2.30.2 From nobody Fri May 17 11:58:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1618600446; cv=none; d=zohomail.com; s=zohoarc; b=Vm/yzh4Ad865/NGsW110JpZx7cwgIBWjCXPZA3ouMuufcKNMQXw2KqNc88wLqn7Cvug3S0JCuzI3/9j+3wT2UFthnzCtLLV5PHyynqYsGV3K9ZHy/4RhpvRpZNQfaKARoFBL6tq/8zHV5PJv69A/0J7tUTPdg1AWReVPi/GjheM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618600446; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=TL2VLIOawBDLyAIBDvw8qA5h6AHwFPubOVd7hSe43eQ=; b=TompAZOaMQI67nqsduIBhJIGdb3ncPoQ9WTMgUf3HnjSmXj2gBnyEvsvCyfYQ35ImIo1cXwlhTNulpWmb7TzCHpOiXzMMNSYvtOztcrujjtkrHeCjtr9SVtLggJQ0NenjOn7Y4seF+0DY/Md6rnOr++8X3Bbo0GNpMJ7lewum+g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1618600446879604.1179737396399; Fri, 16 Apr 2021 12:14:06 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-401-4v-aJPXeNi-EB4SnX3AIwA-1; Fri, 16 Apr 2021 15:13:19 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0AB8018397A7; Fri, 16 Apr 2021 19:13:14 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E0C5819CBE; Fri, 16 Apr 2021 19:13:13 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A7B7344A65; Fri, 16 Apr 2021 19:13:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13GJCvpD028236 for ; Fri, 16 Apr 2021 15:12:57 -0400 Received: by smtp.corp.redhat.com (Postfix) id A3CC75D749; Fri, 16 Apr 2021 19:12:57 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.195.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id 244CF5D6D3 for ; Fri, 16 Apr 2021 19:12:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618600445; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=TL2VLIOawBDLyAIBDvw8qA5h6AHwFPubOVd7hSe43eQ=; b=WoFoWa/jH4SVEGRxm+GcUesgDTbScMeifkKHe0M7ZJE+DTrK9ZeG0L1OJ9PmyrWwfwxsh6 FGGZ0cuUh6q8Zu2QjxPnJob6ylnnxut7MBboiwOSxojnltFKUKeWOIfZtJ5YyyxSXaKoJw ciQFkdiQBBId9g/PvYU96POY5hNviME= X-MC-Unique: 4v-aJPXeNi-EB4SnX3AIwA-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 06/17] virfirewall: use virFindFileInPath instead of virFileIsExecutable Date: Fri, 16 Apr 2021 21:12:35 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Following patches will make this change necessary as we will stop detecting the full path during compile time. Signed-off-by: Pavel Hrdina --- 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; =20 for (i =3D 0; i < G_N_ELEMENTS(commands); i++) { - if (!virFileIsExecutable(commands[i])) { + g_autofree char *path =3D virFindFileInPath(commands[i]); + + if (!path) { virReportSystemError(errno, _("%s not available, firewall backend wil= l not function"), commands[i]); --=20 2.30.2 From nobody Fri May 17 11:58:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1618600513; cv=none; d=zohomail.com; s=zohoarc; b=eUif/ZAURNapYF1Y9Ily3CmQXBzPeGNuhadb5mZQVpYwH3ETKHKDes731dA0cHW8qXnJ36lBnxn7rmRbw+Oh1vr2MhN8XA8IQKbADZkLSnBRvonxUEbuFtQg+O4lEIcyyLIKkkWnLvcUgNktWJ/dwCqhUnsbg02MqZqhTx4x4HE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618600513; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fBpwqYsKGF9Ojt8HsQiK1Tv269dPokUT1WXpImitSb4=; b=EviPtgk+fzWB3NIxVXmUpNwjk0n2CncSHOvfIT+j/FHpVzF7z5TCP5X0OxMg3UWX5g/YgMkA5NcjOuEU9Dd5GOOmhn6o06nJRkK4R4ff2vl1Iq8aZQoj84EBShr3rYCQOQfFrWBvtyple7DICsVmqY3ML18Pq1xruH8+ezPaxWE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1618600513438946.0940602867659; Fri, 16 Apr 2021 12:15:13 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-140-3HBhaquXOlq0PAIIQ_XfuQ-1; Fri, 16 Apr 2021 15:13:30 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5A234A40D5; Fri, 16 Apr 2021 19:13:23 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 353CF5D9E3; Fri, 16 Apr 2021 19:13:23 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id ECA511806D1F; Fri, 16 Apr 2021 19:13:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13GJCwVp028244 for ; Fri, 16 Apr 2021 15:12:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id 80D8D5D749; Fri, 16 Apr 2021 19:12:58 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.195.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id 01E005D6D3 for ; Fri, 16 Apr 2021 19:12:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618600512; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=fBpwqYsKGF9Ojt8HsQiK1Tv269dPokUT1WXpImitSb4=; b=fMMDrw9MbJzauUO8dWLrEw/8CJvDISoxX0IR32cHG5vlPZ/yFOf17/P19uJQfB+QRPonVb nVTAM5CHe8eoBB0FbZ7M+lva302tcuOenDXsdNwAbW6sqeBG9TpGA2RU+1nU9A67sWXMWV hL426NauxUhRIDGKuu6+14neUUMXy2w= X-MC-Unique: 3HBhaquXOlq0PAIIQ_XfuQ-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 07/17] tests: introduce virfirewallmock Date: Fri, 16 Apr 2021 21:12:36 +0200 Message-Id: <49714603cefae90cc31397583ee186b0ee3ffab7.1618600267.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" 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 --- 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; =20 -char *virFindFileInPath(const char *file); +char *virFindFileInPath(const char *file) + G_GNUC_NO_INLINE; =20 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 =3D [ { '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 + * . + */ + +#include + +#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; +} --=20 2.30.2 From nobody Fri May 17 11:58:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1618600412; cv=none; d=zohomail.com; s=zohoarc; b=ljW+Ba37l0SlgNCZU5c18aDeu1WP0G5szDlGOuxYjWk8wCqoP+qPn2zdwfPd16uhMj+0uVeLaW0UFUJ8aj0UgSTMMMAXntlhRmvogxS3bF0UPF48gp548Ay43ivzGjYjGd24MLRNA+xYAVWKmEwDgfztYusw0DcKy8Y6hZHysXQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618600412; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=IPoNNhEP/15r6R+H7A8loHF6wtj/hNd1taoFlSQtMDo=; b=fEmSwL5TdAqSa5u2eZGS+P4GubRDNxtndUDoWfoPHByR634CTSs/Rb4ESqf1YhEZQxOv10k6Id3NzZJUgJOamI2N16qJkaB8znJt2MCNO387Oijjuav7awR1V072w3oIslXFFU5r2X9F1jkjOpLsndloYwhJ0UmWZP2Ge0Ig/WI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1618600412424520.6050029779066; Fri, 16 Apr 2021 12:13:32 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-507-vlpUECW7MuijunroDvLaCw-1; Fri, 16 Apr 2021 15:13:28 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3DCAAA40C0; Fri, 16 Apr 2021 19:13:17 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 19A2960C0F; Fri, 16 Apr 2021 19:13:17 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D73F61806D1C; Fri, 16 Apr 2021 19:13:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13GJCxE1028252 for ; Fri, 16 Apr 2021 15:12:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5EB095D749; Fri, 16 Apr 2021 19:12:59 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.195.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id D3A495D6D3 for ; Fri, 16 Apr 2021 19:12:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618600411; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=IPoNNhEP/15r6R+H7A8loHF6wtj/hNd1taoFlSQtMDo=; b=Yw8y8jWeWzVggz0cMVEJHqUm/A148uM2lTpS5ON6RBDiFyCWJJGpYH749CVI3NCYuygK24 rvdxNLgIOZqNUw4y4gzx4SKZ96iakbkGm6klQLp6KKR/JDSt5buBWzvV7jothJHuUKJckr /nk+x+a7IeS/c+4uXyYLiaghI4gu7NQ= X-MC-Unique: vlpUECW7MuijunroDvLaCw-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 08/17] tests: use virfirewallmock instead of hasNetfilterTools Date: Fri, 16 Apr 2021 21:12:37 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" 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 --- 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/networkxml2firewalltes= t.c index 80ba510d14..91336a0c55 100644 --- a/tests/networkxml2firewalltest.c +++ b/tests/networkxml2firewalltest.c @@ -152,14 +152,6 @@ testCompareXMLToIPTablesHelper(const void *data) return result; } =20 -static bool -hasNetfilterTools(void) -{ - return virFileIsExecutable(IPTABLES_PATH) && - virFileIsExecutable(IP6TABLES_PATH) && - virFileIsExecutable(EBTABLES_PATH); -} - =20 static int mymain(void) @@ -179,11 +171,6 @@ mymain(void) } while (0) =20 if (virFirewallSetBackend(VIR_FIREWALL_BACKEND_DIRECT) < 0) { - if (!hasNetfilterTools()) { - fprintf(stderr, "iptables/ip6tables/ebtables tools not present= "); - return EXIT_AM_SKIP; - } - return EXIT_FAILURE; } =20 @@ -203,7 +190,8 @@ mymain(void) return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } =20 -VIR_TEST_MAIN_PRELOAD(mymain, VIR_TEST_MOCK("virgdbus")) +VIR_TEST_MAIN_PRELOAD(mymain, VIR_TEST_MOCK("virgdbus"), + VIR_TEST_MOCK("virfirewall")) =20 #else /* ! defined (__linux__) */ =20 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 *op= aque G_GNUC_UNUSED) return ret; } =20 -static bool -hasNetfilterTools(void) -{ - return virFileIsExecutable(IPTABLES_PATH) && - virFileIsExecutable(IP6TABLES_PATH) && - virFileIsExecutable(EBTABLES_PATH); -} - =20 static int mymain(void) @@ -497,11 +489,6 @@ mymain(void) int ret =3D 0; =20 if (virFirewallSetBackend(VIR_FIREWALL_BACKEND_DIRECT) < 0) { - if (!hasNetfilterTools()) { - fprintf(stderr, "iptables/ip6tables/ebtables tools not present= "); - return EXIT_AM_SKIP; - } - return EXIT_FAILURE; } =20 @@ -543,4 +530,4 @@ mymain(void) return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } =20 -VIR_TEST_MAIN(mymain) +VIR_TEST_MAIN_PRELOAD(mymain, VIR_TEST_MOCK("virfirewall")) diff --git a/tests/nwfilterxml2firewalltest.c b/tests/nwfilterxml2firewallt= est.c index 560372b802..6709cc15fd 100644 --- a/tests/nwfilterxml2firewalltest.c +++ b/tests/nwfilterxml2firewalltest.c @@ -431,14 +431,6 @@ testCompareXMLToIPTablesHelper(const void *data) return result; } =20 -static bool -hasNetfilterTools(void) -{ - return virFileIsExecutable(IPTABLES_PATH) && - virFileIsExecutable(IP6TABLES_PATH) && - virFileIsExecutable(EBTABLES_PATH); -} - =20 static int mymain(void) @@ -456,10 +448,6 @@ mymain(void) } while (0) =20 if (virFirewallSetBackend(VIR_FIREWALL_BACKEND_DIRECT) < 0) { - if (!hasNetfilterTools()) { - fprintf(stderr, "iptables/ip6tables/ebtables tools not present= "); - return EXIT_AM_SKIP; - } return EXIT_FAILURE; } =20 @@ -506,7 +494,7 @@ mymain(void) return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } =20 -VIR_TEST_MAIN(mymain) +VIR_TEST_MAIN_PRELOAD(mymain, VIR_TEST_MOCK("virfirewall")) =20 #else /* ! defined (__linux__) */ =20 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; } =20 -static bool -hasNetfilterTools(void) -{ - return virFileIsExecutable(IPTABLES_PATH) && - virFileIsExecutable(IP6TABLES_PATH) && - virFileIsExecutable(EBTABLES_PATH); -} =20 static int mymain(void) { int ret =3D 0; =20 - 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 =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } =20 -VIR_TEST_MAIN_PRELOAD(mymain, VIR_TEST_MOCK("virgdbus")) +VIR_TEST_MAIN_PRELOAD(mymain, VIR_TEST_MOCK("virgdbus"), + VIR_TEST_MOCK("virfirewall")) =20 #else /* ! defined (__linux__) */ =20 --=20 2.30.2 From nobody Fri May 17 11:58:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1618600417; cv=none; d=zohomail.com; s=zohoarc; b=EHVIqLQT+53nrKk2XavMKiAFwXKDPUyvRYoHzCMpuKH4x66FklHF+pd9Zq1938RLLcxPex5XfY5hlkOvmr8vTmviA0vq+g73o+IuQ2h/f2TjH+teQ4u9SfTCBmxywid0sUInzzatZT2E+8a3TpZ0e80Xi7sEbIldaV3cldTigKk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618600417; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3im90qgF2ydFfZ3UoHCrVnrs8487dK/XQtEatGcLZV8=; b=E2Br6Kn6yF+rV466rjNG79K+0UDnkE0uYmZUiLLiohcO27EJ7J0KqaMbm05L2ZFwCSesHlqH7FpZGWnuDU+LZlRBzvVQD9yfYU9ygABI5CbVLddoKO1+xzRIwZgDN0ip2Ck211eq7gv3IBmyYliVh9CPOI4TV5mH3juEf+OgNI4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1618600417903812.6815839947546; Fri, 16 Apr 2021 12:13:37 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-574-qX5p8S9ZOK-fAW16hxhyHg-1; Fri, 16 Apr 2021 15:13:34 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5F7D718397E7; Fri, 16 Apr 2021 19:13:27 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3F5A6614F5; Fri, 16 Apr 2021 19:13:27 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 0471455353; Fri, 16 Apr 2021 19:13:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13GJD0Oa028266 for ; Fri, 16 Apr 2021 15:13:00 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3CBB05D6D3; Fri, 16 Apr 2021 19:13:00 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.195.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id B17435D749 for ; Fri, 16 Apr 2021 19:12:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618600416; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=3im90qgF2ydFfZ3UoHCrVnrs8487dK/XQtEatGcLZV8=; b=eWDwTbqpYbZ/JDf14UVra2mZzMmtao/33T5DEjp+bkXxQWAop7t/fK0DsSIwlbYlDtVx7b Mz0sHLI4tG+z4nHtc2NBS3BHrFuE0vuHmeK9+9ydfmV91WGxBMbdgkzIRPyvAtBcfFyrJB hBUxGzVVsQ1+6mrQw/NDcwG62eCh+pU= X-MC-Unique: qX5p8S9ZOK-fAW16hxhyHg-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 09/17] virnetdev: move virNetDevSetRootQDisc to virnetdevbandwidth Date: Fri, 16 Apr 2021 21:12:38 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The function in question uses "tc" binary so virnetdevbandwidth feels like better place for it. Signed-off-by: Pavel Hrdina --- 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 *d= river, actualType =3D=3D VIR_DOMAIN_NET_TYPE_NETWORK || actualType =3D=3D VIR_DOMAIN_NET_TYPE_BRIDGE || actualType =3D=3D VIR_DOMAIN_NET_TYPE_DIRECT) { - if (virNetDevSetRootQDisc(net->ifname, "noqueue") < 0) + if (virNetDevBandwidthSetRootQDisc(net->ifname, "noqueue") < 0) return -1; } =20 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) } =20 =20 -/** - * 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 =3D NULL; - g_autofree char *outbuf =3D NULL; - g_autofree char *errbuf =3D 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 =3D virCommandNewArgList(TC, "qdisc", "add", "dev", ifname, - "root", "handle", "0:", qdisc, - NULL); - - virCommandAddEnvString(cmd, "LC_ALL=3DC"); - virCommandSetOutputBuffer(cmd, &outbuf); - virCommandSetErrorBuffer(cmd, &errbuf); - - if (virCommandRun(cmd, &status) < 0) - return -1; - - if (status !=3D 0) { - VIR_DEBUG("Setting qdisc failed: output=3D'%s' err=3D'%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; =20 -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" =20 #define VIR_FROM_THIS VIR_FROM_NONE =20 +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 =3D NULL; + g_autofree char *outbuf =3D NULL; + g_autofree char *errbuf =3D 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 =3D virCommandNewArgList(TC, "qdisc", "add", "dev", ifname, + "root", "handle", "0:", qdisc, + NULL); + + virCommandAddEnvString(cmd, "LC_ALL=3DC"); + virCommandSetOutputBuffer(cmd, &outbuf); + virCommandSetErrorBuffer(cmd, &errbuf); + + if (virCommandRun(cmd, &status) < 0) + return -1; + + if (status !=3D 0) { + VIR_DEBUG("Setting qdisc failed: output=3D'%s' err=3D'%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_UN= USED, =20 =20 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; } --=20 2.30.2 From nobody Fri May 17 11:58:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1618600409; cv=none; d=zohomail.com; s=zohoarc; b=gKRj2tdSyOH+IJRJ3IqcWUDKcjUfjNP72ptnDohJCoOHekHMeukZv3H0q6lXR60nvr7uT1SrNSV9IpqqtlA0tDZ5ivSBhW8bU0qbHY1h9URShh1cJDYmHcQPP2mY2jIe6gOyJ2feZ8MgUZnEn1HR2/0vw8Z/nuWXSy+6ZDW+HxI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618600409; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=CvY1NnKZD8VFSOZmyZhz/IWnWSALndoatX63JpQLE4M=; b=XYjWHGLwFO2QyjV0E6VyUZwD/2EJUfE7fIf7Uwbq4GshdSfBg7dOfkFhXsVTa9MrIprcs+xa88QvAqSEJO21ArjYhOWH+0xUNK3GlxWGWPadB9vTHsqpG3OMl+Mbd6cF+l7kGMxgDkEXP5wMXvcdhW2bGn0HwDnxbimrzFnWHhM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1618600409268274.84456213245915; Fri, 16 Apr 2021 12:13:29 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-551-UbGnAcQBPsKdo3NmsFO2zQ-1; Fri, 16 Apr 2021 15:13:22 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F377010054F6; Fri, 16 Apr 2021 19:13:16 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D44A269108; Fri, 16 Apr 2021 19:13:16 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A17DF1806D19; Fri, 16 Apr 2021 19:13:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13GJD1g7028279 for ; Fri, 16 Apr 2021 15:13:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1BA145D749; Fri, 16 Apr 2021 19:13:01 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.195.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id 90BDE5D6D3 for ; Fri, 16 Apr 2021 19:13:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618600408; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=CvY1NnKZD8VFSOZmyZhz/IWnWSALndoatX63JpQLE4M=; b=PrLr843f7Fq2FSAJkIVcvYr5ZjjZPslEvvJyruwNp6RX/4BTlEhfxKyhb0Vt4AbWC8Yomx R5SSBZH0ml3qQFCAV7i2b7In7YhB26kPVHU1YAA+7Z+k2A7aBzCOODthEyRw6y1sv9MsZH AntGUoniklNLu15LkPCsMRck0QLD2+8= X-MC-Unique: UbGnAcQBPsKdo3NmsFO2zQ-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 10/17] tests: testutilsqemu: move virFindFileInPath into domaincapsmock Date: Fri, 16 Apr 2021 21:12:39 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Having the function on mock library reflect more closely what we usually do in tests. Signed-off-by: Pavel Hrdina --- 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 @@ =20 #include =20 +#include "virfile.h" #include "virhostcpu.h" #ifdef WITH_LIBXL # include "libxl/libxl_capabilities.h" @@ -40,3 +41,18 @@ virHostCPUGetMicrocodeVersion(virArch hostArch G_GNUC_UN= USED) { 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] = =3D { [VIR_ARCH_SPARC] =3D "sun4m.ram", }; =20 -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; -} - =20 virCapsHostNUMA * virCapabilitiesHostNUMANewHost(void) --=20 2.30.2 From nobody Fri May 17 11:58:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1618600418; cv=none; d=zohomail.com; s=zohoarc; b=LEydzVWIbQPrwY593O0rwsHLQpUCs1NEntm6rVetLcdDMXQ5VACvTplsLFOOz2t2Ir96OQTxlPNa3rt0lD13JMbdyhZAUsDqQTMLl9RFGSGJsmYahE6DxrrRMPhIvDH/b+2n1wkbDxePgfpEZseGW5+TmREjq7imYUkJtSJ0Dys= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618600418; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6yCWVP/Bl06wJ2KUE0PowaJR0UKED4OFZDcfE8oLalo=; b=i01tZgr0dSw2msQnh2S6wQuafY2QVGo0zAQVHhdPfehx9HGzDK7D8/xkiYEmE9QzbMq/DnecHYk/DpNrgJ81myJFm4/qgjk1znPuFmElHwG/9Xh9JHzXzOKRiULPPQUWxlov7exDL23DyTrQie5nos0o0cZWIyDV4l3Q9HnBNBQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1618600418214265.27773028948434; Fri, 16 Apr 2021 12:13:38 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-398-wH6mNtWePoOeSBHgUHuZDQ-1; Fri, 16 Apr 2021 15:13:34 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 45E26A40C0; Fri, 16 Apr 2021 19:13:30 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1D6DD2619D; Fri, 16 Apr 2021 19:13:30 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D9AD31806D25; Fri, 16 Apr 2021 19:13:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13GJD1Pe028286 for ; Fri, 16 Apr 2021 15:13:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id EE7095D74B; Fri, 16 Apr 2021 19:13:01 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.195.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6E8CF5D6D3 for ; Fri, 16 Apr 2021 19:13:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618600417; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=6yCWVP/Bl06wJ2KUE0PowaJR0UKED4OFZDcfE8oLalo=; b=eW5HOPpGjyzboHJMFIshh+RIstmB3rRjZC9ijeMp3DrXo0mTqsOhn6LHI9CUjipWVDdK8a UZ9hnvCKWPGIiKxXM4rIQIu2y+bU0wfchc/vrZP+xYDhWiUkVTHgWkn5lrq9XkaqOepW9/ zdS598uzHXXqB6HN+8yUDKryprycNrs= X-MC-Unique: wH6mNtWePoOeSBHgUHuZDQ-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 11/17] meson: don't check collie as program for sheepdog Date: Fri, 16 Apr 2021 21:12:40 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" 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 --- 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 =20 if not get_option('storage_sheepdog').disabled() - sheepdogcli_prog =3D find_program(['collie', 'dog'], required: get_opt= ion('storage_sheepdog'), dirs: libvirt_sbin_path) + sheepdogcli_prog =3D find_program('dog', required: get_option('storage= _sheepdog'), dirs: libvirt_sbin_path) =20 if sheepdogcli_prog.found() use_storage =3D true --=20 2.30.2 From nobody Fri May 17 11:58:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1618600413; cv=none; d=zohomail.com; s=zohoarc; b=ZJm8H3jidNeIDRwWiK0CboZhx/u2KtT62wt9dgOVai9R3Gy+lXN6TuVPTRA8oWNZxrUO1u5xxc06jGf/ocJWG7TxIlDVsG2H/2IoH9waWKWs8hDfm0KEheGYnaul8q8z6cWQbt7AHfHlkpCIgF4TLbelugaCjrnyP3l6ZhV1BHs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618600413; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5bE842mutvOgWEy8bR5bJ5mQtqDVndR2Yczw1us7oSk=; b=HuiJc5jTg2fK4GBgyARndjZaPSQcZRLXIMDIPgm5STIhHdUY0cs8MwyHfv2LT6yXAMsY6UsplcrwklRiAdrWoCnQJxwvD+snN53aSzRkoSpgwhllMzn831L9VvymLOhQ2mKr7UYedvpEgEomKHvaytLn8h4TPCaiMJv7qipe9GI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1618600413198637.1352919954383; Fri, 16 Apr 2021 12:13:33 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-282-jKX-AbW2NFutbsqMEBIAow-1; Fri, 16 Apr 2021 15:13:29 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D9FD318397A4; Fri, 16 Apr 2021 19:13:19 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ABA985C260; Fri, 16 Apr 2021 19:13:19 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4381A44A69; Fri, 16 Apr 2021 19:13:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13GJD3l3028310 for ; Fri, 16 Apr 2021 15:13:03 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2CDEE5D6D3; Fri, 16 Apr 2021 19:13:03 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.195.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4DD125D749 for ; Fri, 16 Apr 2021 19:13:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618600411; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=5bE842mutvOgWEy8bR5bJ5mQtqDVndR2Yczw1us7oSk=; b=Hof5qT98CR2tCYfSJgtVrM/1+KDAfh2IUSM7S8+WJ353LDWvKRRaOVNvlWw9/0qu9NsVXM U8+kzA8hpdHrHGwur4RihPIUUuqt9l0qJE1hTKUGTuuZih4Xdu1zfxgNQSM62Y8aq/xUdR 1D6b5oSodMAxUJwJZvL9OFNLFEHtE80= X-MC-Unique: jKX-AbW2NFutbsqMEBIAow-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 12/17] bhyvexml2argvtest: use virCommandToStringFull to strip command path Date: Fri, 16 Apr 2021 21:12:41 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" 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 --- 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/bh= yvexml2argvdata/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-s= lot-1.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-s= lot-1.args index 498455275a..735a084ac7 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.a= rgs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.a= rgs @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-s= lot-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.l= dargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.l= dargs @@ -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-s= lot-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-s= lot-31.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-o= n-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-d= isks.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-di= sks.args index bd987c86aa..51434ed1df 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.ar= gs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.ar= gs @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-d= isks.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.ld= args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-more-than-32-sata-disks.ld= args @@ -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.ld= args 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-dis= ks.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-dis= ks.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disk= s.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.ldar= gs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-multiple-virtio-disks.ldar= gs @@ -1,4 +1,4 @@ -/usr/sbin/bhyveload \ +bhyveload \ -m 214 \ -d /tmp/freebsd.img \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-s= ata-disks.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multip= le-sata-disks.args index 821cc58287..2bb2689c79 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-dis= ks.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-dis= ks.args @@ -1,4 +1,4 @@ -/usr/sbin/bhyve \ +bhyve \ -c 1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-s= ata-disks.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-mult= iple-sata-disks.ldargs index ec3f482ca8..4257ffccee 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-dis= ks.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-multiple-sata-dis= ks.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-sat= a-disk.args b/tests/bhyvexml2argvdata/bhyvexml2argv-addr-no32devs-single-sa= ta-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-sat= a-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-control= ler-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.ar= gs 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.ld= args 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.ldar= gs 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/bhyvex= ml2argvdata/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/bhyv= exml2argvdata/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.ldar= gs 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.arg= s 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.lda= rgs 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.arg= s 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.lda= rgs 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.a= rgs 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.l= dargs 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/tes= ts/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-slav= e-not-specified.args index 4d7cb11999..5d0c5c2987 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specif= ied.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specif= ied.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-sl= ave-not-specified.ldargs index 91f9658137..5905f4b3e6 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specif= ied.ldargs +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-console-master-slave-not-specif= ied.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/bhy= vexml2argvdata/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/b= hyvexml2argvdata/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=3D2,sockets=3D1,cores=3D2,threads=3D1 \ -m 214 \ -u \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-cputopology.ldargs b/tes= ts/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/tes= ts/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/t= ests/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/t= ests/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 '' \ --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/test= s/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/tes= ts/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/test= s/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/te= sts/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/bhyve= xml2argvdata/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/bhy= vexml2argvdata/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/te= sts/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 '' \ --memory 214 \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-bootorder2.args b/t= ests/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 '' \ --memory 214 \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-grub-defaults.args b/tes= ts/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/t= ests/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 '' \ --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/te= sts/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/b= hyvexml2argvdata/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/bhy= vexml2argvdata/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/b= hyvexml2argvdata/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/bhyvex= ml2argvdata/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/bhyv= exml2argvdata/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/b= hyvexml2argvdata/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.ldarg= s 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 '' \ --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/tes= ts/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 '' \ --memory 214 \ diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-serial.args b/tests/bhyv= exml2argvdata/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/bh= yvexml2argvdata/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/bhyve= xml2argvdata/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/bhy= vexml2argvdata/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/bhyvex= ml2argvdata/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/test= s/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/test= s/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/te= sts/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/te= sts/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/t= ests/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/te= sts/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/bhyvexm= l2argvdata/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/bhyve= xml2argvdata/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/bhy= vexml2argvdata/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; } =20 - if (!(actualargv =3D virCommandToString(cmd, true))) + if (!(actualargv =3D virCommandToStringFull(cmd, true, true))) goto out; =20 if (actualdm !=3D NULL) virTrimSpaces(actualdm, NULL); =20 - if (!(actualld =3D virCommandToString(ldcmd, true))) + if (!(actualld =3D virCommandToStringFull(ldcmd, true, true))) goto out; =20 if (virTestCompareToFileFull(actualargv, cmdline, false) < 0) --=20 2.30.2 From nobody Fri May 17 11:58:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1618600450; cv=none; d=zohomail.com; s=zohoarc; b=PIE9A/OXjs47FSbRHThWL3tP7cSoVcuJw3dR3P/deifU1BZkkgJSz2OChruEQaTlQQpPYrvsJOROZNEvUM0+OOY2tasKOI5RmfuPBAaDzqWqXZPEBpbwX7XJmrbYF5zS4rJtAtiAozN1BLGUydFngzCa5IDnzBGh2GQr8Xs6+nY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618600450; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=JuDct75JWq8ySL5huIgWoxRQdKmy6fSOiJRCRmjiSc0=; b=V2pC6MYhFhHxbJFGF4yRdycAq/T8VcVkGRootKHtbdZ3bdpAkfuromvGWIG4AayrDQZUM/a5PEP8Z9tsF+kzFVQsHORNpOcLxwpVodmrhy7yDR/Ux6SNsYzdijW9JBilEnxfKUFbhJxDebIjYoTRcHyTayHwrzrZ7NjcVvrke5o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1618600450279938.1825238159435; Fri, 16 Apr 2021 12:14:10 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-143-9tkfgmqBNJ2gqJCPn7n_kA-1; Fri, 16 Apr 2021 15:13:31 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 71B03802B7E; Fri, 16 Apr 2021 19:13:22 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 53D5F6A967; Fri, 16 Apr 2021 19:13:22 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1DCFF1806D1A; Fri, 16 Apr 2021 19:13:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13GJD4R9028324 for ; Fri, 16 Apr 2021 15:13:04 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0B6125D749; Fri, 16 Apr 2021 19:13:04 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.195.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id 809515D6D3 for ; Fri, 16 Apr 2021 19:13:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618600449; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=JuDct75JWq8ySL5huIgWoxRQdKmy6fSOiJRCRmjiSc0=; b=GNtyrR2uMeMwgiJwjUEvNxv/rgcm7/rM/LifFZHHMgQ++LFFDQeg4oIy4Ai+qVBMq6LD3/ 7xvxPhNHF+c78GyjHCr1WtKzKmHmpHX6bxQZ3RZ7v5BFS7CAokhpyx2OYquXpJaEchhfFJ iq1X6pFbjpwPOzpTGWy9IE/qMXSKjvM= X-MC-Unique: 9tkfgmqBNJ2gqJCPn7n_kA-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 13/17] storage: use virFindFileInPath to validate presence of mkfs Date: Fri, 16 Apr 2021 21:12:42 +0200 Message-Id: <7407262f2377fab5ec36776c6d1fd8003b3329d6.1618600267.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Future patch will remove MKFS define as we will no longer check it during compilation. Signed-off-by: Pavel Hrdina --- 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 *p= ool, return 0; } =20 -/* some platforms don't support mkfs */ -#ifdef MKFS static int virStorageBackendExecuteMKFS(const char *device, const char *format) { g_autoptr(virCommand) cmd =3D NULL; + g_autofree char *mkfs =3D 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; + } =20 cmd =3D virCommandNewArgList(MKFS, "-t", format, NULL); =20 @@ -426,19 +433,6 @@ virStorageBackendExecuteMKFS(const char *device, =20 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 */ =20 static int virStorageBackendMakeFileSystem(virStoragePoolObj *pool, --=20 2.30.2 From nobody Fri May 17 11:58:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1618600424; cv=none; d=zohomail.com; s=zohoarc; b=nNOpTiB6D0YOpC6NzZ0uIltZ+vJdttsdJ1eSI0WP4C9TLuYOZBJWM3tFJtINV9Ox4fuzXREyGSlgA3yVOh1bwUHAGntA20MA4N/8YUVyDiUQMMIsM9qoyRpBxHRwViO/MDqGskqYlLSDEvhk3OeHmjo3Ab9qiIDG8aYP+9eX0J4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618600424; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=vkpZXaNRdnCvB3tKj5FwMAUwTYKQ9Dmowdn0GlZF0Lo=; b=PulBYp7LLDmcdp56GcMlWBqv6weWn9dmb9XtRGE5seCjAN2yT9HWA7ZPFZMwSd98V3QagUGNWpbYQbyVj9uYMWUmp33tJklTMKvPOQ6XQVwGALodb05F//bdw8jq5yEyBwxvkUUGvSlZC4TWpakm51/ls2OJV7OWqd93ThRnJcM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1618600423979506.616606224807; Fri, 16 Apr 2021 12:13:43 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-65-1U05YFAXPeuYBI5EtNsi2w-1; Fri, 16 Apr 2021 15:13:40 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 13838106BB2A; Fri, 16 Apr 2021 19:13:33 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E7F2F5F7D0; Fri, 16 Apr 2021 19:13:32 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A7E0D55355; Fri, 16 Apr 2021 19:13:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13GJD4jC028335 for ; Fri, 16 Apr 2021 15:13:04 -0400 Received: by smtp.corp.redhat.com (Postfix) id DFD755D749; Fri, 16 Apr 2021 19:13:04 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.195.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5EF545D6D3 for ; Fri, 16 Apr 2021 19:13:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618600422; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=vkpZXaNRdnCvB3tKj5FwMAUwTYKQ9Dmowdn0GlZF0Lo=; b=PAXsVuXTxC3HweIz+AUxaJvF/0ovbx/8QuNYmdbM6lM+PwZsdJZzL/il1LrBSix5vakZlq cUcBe+8Ifrf/kg7UKuUMP9yO2AuG75HifBE2N0uRN+xFqaCILy7LEZIfz92ap3TVCgqqN4 cJDWqYAMVEAxgq1KrMESrmRHkczy5Ao= X-MC-Unique: 1U05YFAXPeuYBI5EtNsi2w-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 14/17] virfile: introduce virFindFileInPathFull() Date: Fri, 16 Apr 2021 21:12:43 +0200 Message-Id: <08b515912afd75a1ee28bb77e834a8f4fa457c52.1618600267.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" 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 --- 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; =20 =20 # 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) } =20 /* - * 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 =3D NULL; g_auto(GStrv) paths =3D NULL; @@ -1692,6 +1694,16 @@ virFindFileInPath(const char *file) return abspath; } =20 + /* First search in paths provided by caller. + */ + if (extra_paths) { + for (pathiter =3D extra_paths; *pathiter; pathiter++) { + g_autofree char *fullpath =3D g_strdup_printf("%s/%s", *pathit= er, file); + if (virFileIsExecutable(fullpath)) + return g_steal_pointer(&fullpath); + } + } + /* copy PATH env so we can tweak it */ origpath =3D 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; =20 -char *virFindFileInPath(const char *file) +char *virFindFileInPathFull(const char *file, + const GStrv extra_paths) G_GNUC_NO_INLINE; =20 +#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_UNU= SED) } =20 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" =20 char * -virFindFileInPath(const char *file) +virFindFileInPathFull(const char *file, + const GStrv extra_args G_GNUC_UNUSED) { if (file && (g_strrstr(file, "ebtables") || --=20 2.30.2 From nobody Fri May 17 11:58:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1618600443; cv=none; d=zohomail.com; s=zohoarc; b=j7cem6oYvdRz2xYnyDS6ybwx/yLrZLdqs9GTPfl+VkJaf5CL66ugSOLfopigXhtjYZZAIX1s8VZCWFd+MU3ZgfgWFq7mnIfA0NcLtjWFJgNAr1i8m0cmocD9D7vLHGtRc5cCrtXx6TBvcuMOm12P0DdhL/O4Z+MPHW0eAB+QCGQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618600443; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=CYcwflTvjDhLci/ii+KVsnfoDf8FkiSF1zEB1E1t+x8=; b=YwzFlUOBqjyCHZbXHm9ijtdOdEkigAhZQJirTELIZWyL19gfWA12eF50XHKzywr+K2rzzHz+nCrQK9Q6zIxhOr4G+LjUFKNEUiI+Ung5iL4FsX1B3KPNCfAkNmaMPGsIvTeWsjZySNakHFYUJJFm4+S61g+bF/JDSzYGjvjVdXw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1618600443743118.66496162363887; Fri, 16 Apr 2021 12:14:03 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-208-mMau9gcwPwWAvTLPG3fl3A-1; Fri, 16 Apr 2021 15:13:26 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2C294802B5B; Fri, 16 Apr 2021 19:13:20 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 08B965D9E3; Fri, 16 Apr 2021 19:13:20 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C759144A6C; Fri, 16 Apr 2021 19:13:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13GJD5tT028345 for ; Fri, 16 Apr 2021 15:13:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id BF89C5D74B; Fri, 16 Apr 2021 19:13:05 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.195.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3F22C5D6D3 for ; Fri, 16 Apr 2021 19:13:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618600442; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=CYcwflTvjDhLci/ii+KVsnfoDf8FkiSF1zEB1E1t+x8=; b=Ie9ndQk7/UUGFxcDHdhNVNQ83VYiKVdQOViIMZ8CCNSzk2LAMAYZow+/DTgh0bASHTcksi 0zpc6r+13CcSgSAZ/l8ZFsVAEkKL0Pn+fdwK1DESUHAA/YGa5IAY/klsFYivbQ/RAQju29 vX/HpkDti7awShG9iYpqVDk2jKhf7CY= X-MC-Unique: mMau9gcwPwWAvTLPG3fl3A-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 15/17] qemu_conf: use virFindFileInPathFull for runtime binaries Date: Fri, 16 Apr 2021 21:12:44 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Following patches will stop detecting the full path during compilation so we will need to do it here. Signed-off-by: Pavel Hrdina --- 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 privi= leged, const char *root) { g_autoptr(virQEMUDriverConfig) cfg =3D NULL; + const char *qemu_extra_paths[] =3D { + "/usr/libexec", + "/usr/lib/qemu", + "/usr/lib", + NULL, + }; =20 if (virQEMUConfigInitialize() < 0) return NULL; @@ -267,10 +273,14 @@ virQEMUDriverConfig *virQEMUDriverConfigNew(bool priv= ileged, return NULL; } =20 - cfg->bridgeHelperName =3D g_strdup(QEMU_BRIDGE_HELPER); - cfg->prHelperName =3D g_strdup(QEMU_PR_HELPER); - cfg->slirpHelperName =3D g_strdup(QEMU_SLIRP_HELPER); - cfg->dbusDaemonName =3D g_strdup(QEMU_DBUS_DAEMON); + cfg->bridgeHelperName =3D virFindFileInPathFull(QEMU_BRIDGE_HELPER, + (GStrv) qemu_extra_paths= ); + cfg->prHelperName =3D virFindFileInPathFull(QEMU_PR_HELPER, + (GStrv) qemu_extra_paths); + cfg->slirpHelperName =3D virFindFileInPathFull(QEMU_SLIRP_HELPER, + (GStrv) qemu_extra_paths); + cfg->dbusDaemonName =3D virFindFileInPathFull(QEMU_DBUS_DAEMON, + (GStrv) qemu_extra_paths); =20 cfg->securityDefaultConfined =3D true; cfg->securityRequireConfined =3D false; --=20 2.30.2 From nobody Fri May 17 11:58:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1618600453; cv=none; d=zohomail.com; s=zohoarc; b=dTyD/LsoXk8hMDVNniFVtCa45DrcphSmbzIJRTGaf1A7NptJ3Gabq5Ue0WDw2+o6kPxg3VfYdPZb1o7FIztQYjhTlLcMiLqOIJApOdHbybqF1tvZ6vWm37mRDAa5Oug6YpGdWDskYM54wavwzo0ZBSrhQTV0fgQLVmyPwbyxoQI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618600453; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pNaeL25tF01FwLz9Y5BjXAutMSGS/OfBhDv/wQU6Hq4=; b=DA8OI5Wken9DQOWnHMP+T0cFuwEkfgPxoSfWk7IkHUNgzEUrIepxTz6sG+St9+8wAs5SC+5FvDZe6iM4wDCyBu7LLvx9XzPKGUb7MNKdU1tBWe6W+Z6ZuE4oz4B0Rm9Kf46nmCIerLLxrW8FVEdTp4aV8K3aNqJgZgLqxSX9zbY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 161860045353667.53309802346439; Fri, 16 Apr 2021 12:14:13 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-151-5BR6UT8JOdmoSrcvmFUdeQ-1; Fri, 16 Apr 2021 15:13:34 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 589D318397B6; Fri, 16 Apr 2021 19:13:26 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F37DB60C17; Fri, 16 Apr 2021 19:13:25 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id BB87855350; Fri, 16 Apr 2021 19:13:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13GJDIYH028405 for ; Fri, 16 Apr 2021 15:13:18 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8E95C5D751; Fri, 16 Apr 2021 19:13:18 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.195.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id 080BA5BAFF for ; Fri, 16 Apr 2021 19:13:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618600452; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=pNaeL25tF01FwLz9Y5BjXAutMSGS/OfBhDv/wQU6Hq4=; b=HpQxw1WSGEjak0bkUwNg9KAjoBfpBPolXFQze58cVecn1HIaJHUSM1lRO4dpUuylHA0TS1 /8hSvJuDzFXsLvv8uryegJfU/abjRR6O2jj0rpPPZ2SFeZQp5LMLM5Mg48isRU4iDJ1MoV yb9T2lXxToRTHH58JIjkaYYk9U97DjU= X-MC-Unique: 5BR6UT8JOdmoSrcvmFUdeQ-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 16/17] meson: drop check for runtime binary dependencies Date: Fri, 16 Apr 2021 21:12:45 +0200 Message-Id: <83cbae5d9c23372549db97da82135a4f8e7f6614.1618600267.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" 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 --- 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 =20 optional_programs =3D [ 'augparse', - 'dmidecode', - 'dnsmasq', - 'ebtables', 'flake8', - 'ip', - 'ip6tables', - 'iptables', - 'iscsiadm', - 'mdevctl', - 'mm-ctl', - 'modprobe', - 'ovs-vsctl', 'pdwtags', - 'radvd', - 'rmmod', - 'scrub', - 'tc', - 'udevadm', ] =20 foreach name : optional_programs @@ -1088,14 +1072,6 @@ endif =20 libparted_version =3D '1.8.0' libparted_dep =3D dependency('libparted', version: '>=3D' + libparted_vers= ion, required: false) -if libparted_dep.found() - parted_prog =3D find_program('parted', required: false, dirs: libvirt_sb= in_path) - if parted_prog.found() - conf.set_quoted('PARTED', parted_prog.path()) - else - libparted_dep =3D dependency('', required: false) - endif -endif =20 libpcap_version =3D '1.5.0' if not get_option('libpcap').disabled() @@ -1498,16 +1474,7 @@ if not get_option('driver_libvirtd').disabled() endif =20 if not get_option('driver_bhyve').disabled() and host_machine.system() =3D= =3D 'freebsd' - bhyve_prog =3D find_program('bhyve', required: get_option('driver_bhyve'= )) - bhyvectl_prog =3D find_program('bhyvectl', required: get_option('driver_= bhyve')) - bhyveload_prog =3D find_program('bhyveload', required: get_option('drive= r_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 =3D find_program( - 'qemu-bridge-helper', - dirs: [ '/usr/libexec', '/usr/lib/qemu', '/usr/lib' ], - required: false - ) - if qemu_bridge_prog.found() - qemu_bridge_path =3D qemu_bridge_prog.path() - else - qemu_bridge_path =3D '/usr/libexec/qemu-bridge-helper' - endif - conf.set_quoted('QEMU_BRIDGE_HELPER', qemu_bridge_path) - - qemu_pr_prog =3D find_program( - 'qemu-pr-helper', - dirs: [ '/usr/bin', '/usr/libexec' ], - required: false - ) - if qemu_pr_prog.found() - qemu_pr_path =3D qemu_pr_prog.path() - else - qemu_pr_path =3D '/usr/bin/qemu-pr-helper' - endif - conf.set_quoted('QEMU_PR_HELPER', qemu_pr_path) - - qemu_slirp_prog =3D find_program( - 'slirp-helper', - dirs: [ '/usr/bin', '/usr/libexec' ], - required: false - ) - if qemu_slirp_prog.found() - qemu_slirp_path =3D qemu_slirp_prog.path() - else - qemu_slirp_path =3D '/usr/bin/slirp-helper' - endif - conf.set_quoted('QEMU_SLIRP_HELPER', qemu_slirp_path) - - qemu_dbus_daemon_prog =3D find_program( - 'dbus-daemon', - dirs: [ '/usr/bin', '/usr/libexec' ], - required: false - ) - if qemu_dbus_daemon_prog.found() - qemu_dbus_daemon_path =3D qemu_dbus_daemon_prog.path() - else - qemu_dbus_daemon_path =3D '/usr/bin/dbus-daemon' - endif - conf.set_quoted('QEMU_DBUS_DAEMON', qemu_dbus_daemon_path) endif endif =20 @@ -1831,30 +1750,9 @@ if conf.has('WITH_LIBVIRTD') endif endif =20 - if fs_enable - mount_prog =3D find_program('mount', required: get_option('storage_f= s'), dirs: libvirt_sbin_path) - umount_prog =3D find_program('umount', required: get_option('storage= _fs'), dirs: libvirt_sbin_path) - mkfs_prog =3D 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_pro= g.found() - fs_enable =3D false - endif - endif - if fs_enable use_storage =3D 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 =3D find_program('showmount', required: false, dirs: = libvirt_sbin_path) - showmount_path =3D '' - if showmount_prog.found() - showmount_path =3D showmount_prog.path() - endif - conf.set_quoted('SHOWMOUNT', showmount_path) endif endif =20 @@ -1865,11 +1763,9 @@ if conf.has('WITH_LIBVIRTD') error('Need glusterfs (libgfapi) for gluster storage driver') endif =20 - if not get_option('storage_iscsi').disabled() and iscsiadm_prog.found() + if not get_option('storage_iscsi').disabled() use_storage =3D true conf.set('WITH_STORAGE_ISCSI', 1) - elif get_option('storage_iscsi').enabled() - error('We need iscsiadm for iSCSI storage driver') endif =20 if not get_option('storage_iscsi_direct').disabled() and libiscsi_dep.fo= und() @@ -1880,31 +1776,8 @@ if conf.has('WITH_LIBVIRTD') endif =20 if not get_option('storage_lvm').disabled() - lvm_enable =3D true - lvm_progs =3D [ - '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: libv= irt_sbin_path) - ) - if not get_variable('@0@_prog'.format(name)).found() - lvm_enable =3D false - endif - endforeach - - if lvm_enable - use_storage =3D true - conf.set('WITH_STORAGE_LVM', 1) - - foreach name : lvm_progs - conf.set_quoted(name.to_upper(), get_variable('@0@_prog'.format(na= me)).path()) - endforeach - endif + use_storage =3D true + conf.set('WITH_STORAGE_LVM', 1) endif =20 if not get_option('storage_mpath').disabled() and host_machine.system() = =3D=3D 'linux' and devmapper_dep.found() @@ -1927,13 +1800,8 @@ if conf.has('WITH_LIBVIRTD') endif =20 if not get_option('storage_sheepdog').disabled() - sheepdogcli_prog =3D find_program('dog', required: get_option('storage= _sheepdog'), dirs: libvirt_sbin_path) - - if sheepdogcli_prog.found() - use_storage =3D true - conf.set('WITH_STORAGE_SHEEPDOG', 1) - conf.set_quoted('SHEEPDOGCLI', sheepdogcli_prog.path()) - endif + use_storage =3D true + conf.set('WITH_STORAGE_SHEEPDOG', 1) endif =20 if not get_option('storage_vstorage').disabled() @@ -1953,24 +1821,8 @@ if conf.has('WITH_LIBVIRTD') endif =20 if not get_option('storage_zfs').disabled() - zfs_enable =3D true - foreach name : ['zfs', 'zpool'] - set_variable( - '@0@_prog'.format(name), - find_program(name, required: get_option('storage_zfs'), dirs: libv= irt_sbin_path) - ) - if not get_variable('@0@_prog'.format(name)).found() - zfs_enable =3D false - endif - endforeach - - if zfs_enable - use_storage =3D true - conf.set('WITH_STORAGE_ZFS', 1) - foreach name : ['zfs', 'zpool'] - conf.set_quoted(name.to_upper(), get_variable('@0@_prog'.format(na= me)).path()) - endforeach - endif + use_storage =3D true + conf.set('WITH_STORAGE_ZFS', 1) endif endif =20 @@ -2080,11 +1932,7 @@ if not get_option('nss').disabled() endif =20 if not get_option('numad').disabled() and numactl_dep.found() - numad_prog =3D 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 @@ =20 #define VIR_FROM_THIS VIR_FROM_BHYVE =20 +#define BHYVE "bhyve" +#define BHYVECTL "bhyvectl" +#define BHYVELOAD "bhyveload" + VIR_LOG_INIT("bhyve.bhyve_command"); =20 static int diff --git a/src/locking/lock_driver_lockd.c b/src/locking/lock_driver_lock= d.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, } =20 =20 -#ifdef LVS +#define LVS "lvs" + static int virLockManagerGetLVMKey(const char *path, char **key) @@ -508,15 +509,6 @@ virLockManagerGetLVMKey(const char *path, =20 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 =20 =20 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 =20 +#define RADVD "radvd" + static virMutex bridgeNameValidateMutex =3D VIR_MUTEX_INITIALIZER; =20 /** diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_de= vice_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 @@ =20 VIR_LOG_INIT("node_device.node_device_driver"); =20 +#define MDEVCTL "mdevctl" + virNodeDeviceDriverState *driver; =20 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 @@ =20 VIR_LOG_INIT("qemu.qemu_conf"); =20 +#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_ba= ckend_logical.c index ed8e47d880..4bbb585d07 100644 --- a/src/storage/storage_backend_logical.c +++ b/src/storage/storage_backend_logical.c @@ -40,6 +40,19 @@ =20 VIR_LOG_INIT("storage.storage_backend_logical"); =20 +#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" + =20 static int virStorageBackendLogicalSetActive(virStoragePoolObj *pool, diff --git a/src/storage/storage_backend_sheepdog.c b/src/storage/storage_b= ackend_sheepdog.c index 6490dfae52..beb6445e1e 100644 --- a/src/storage/storage_backend_sheepdog.c +++ b/src/storage/storage_backend_sheepdog.c @@ -35,6 +35,8 @@ =20 #define VIR_FROM_THIS VIR_FROM_STORAGE =20 +#define SHEEPDOGCLI "dog" + static int virStorageBackendSheepdogRefreshVol(virStoragePoolObj *pool, virStorageVolDef *vol); =20 diff --git a/src/storage/storage_backend_zfs.c b/src/storage/storage_backen= d_zfs.c index 6fabeade11..2a5d74357d 100644 --- a/src/storage/storage_backend_zfs.c +++ b/src/storage/storage_backend_zfs.c @@ -33,6 +33,9 @@ =20 VIR_LOG_INIT("storage.storage_backend_zfs"); =20 +#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 =20 +#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" =20 +#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 virStoragePoolFSMountOptio= nsDef; 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"); =20 #define DNSMASQ_HOSTSFILE_SUFFIX "hostsfile" #define DNSMASQ_ADDNHOSTSFILE_SUFFIX "addnhosts" +#define DNSMASQ "dnsmasq" =20 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 @@ =20 #include "internal.h" =20 +#define EBTABLES_PATH "ebtables" +#define IPTABLES_PATH "iptables" +#define IP6TABLES_PATH "ip6tables" + typedef struct _virFirewall virFirewall; =20 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 @@ =20 #include "internal.h" =20 +#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 @@ =20 #include "internal.h" =20 +#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" =20 +#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 @@ =20 #define VIR_FROM_THIS VIR_FROM_NONE =20 +#define IP_PATH "ip" + VIR_LOG_INIT("util.netdevip"); =20 #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 @@ =20 #define VIR_FROM_THIS VIR_FROM_NONE =20 +#define MM_CTL "mm-ctl" + /** * virNetDevMidonetBindPort: * @ifname: the network interface name diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitc= h.c index 21ee4bdd42..a05128dbca 100644 --- a/src/util/virnetdevopenvswitch.c +++ b/src/util/virnetdevopenvswitch.c @@ -35,6 +35,8 @@ =20 VIR_LOG_INIT("util.netdevopenvswitch"); =20 +#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 @@ =20 VIR_LOG_INIT("util.numa"); =20 +#define NUMAD "numad" =20 #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 =3D "/proc/cpuinfo"; #define SYSINFO sysinfoSysinfo #define CPUINFO sysinfoCpuinfo #define CPUINFO_FILE_LEN (1024*1024) /* 1MB limit for /proc/cpuinfo fil= e */ +#define DMIDECODE "dmidecode" =20 =20 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" =20 +#define UDEVADM "udevadm" + G_STATIC_ASSERT(sizeof(gid_t) <=3D sizeof(unsigned int) && sizeof(uid_t) <=3D sizeof(unsigned int)); =20 --=20 2.30.2 From nobody Fri May 17 11:58:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1618600419; cv=none; d=zohomail.com; s=zohoarc; b=cGogDCKLlGT+JLeQ2VND2WmrJ1Uf3kDd7sXgzOcoPjzTQbvlDfII7iCzZ65HJdVjwamcFUqibXmogF/td4KgyiL3ITc0NNi282YQDVksHLadp0Ql5a3ThUySOHfqz8ooTHebzN/7TqxjRnWC92NZaLpYothB3hVI3ApkIvyD2nA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618600419; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rhBOPu/0VUf9QW/0VMBrt7+dKXIi8T/QZUWujQ8EeAY=; b=gTjfN+inR+ExG4hbKaVmb5Zw7wdRNpbCitoHwTFG5i/nc0nY1EE3EA+21kl3+0pMx0r+KryAMvm/Xlp6yZdeNaQ/K7zasko3wjP8/HX0aaeIymzqNfIOH1Pu6ees/bolGfOXX02lkIPcU0J7szRxT9/G6HobDuYCwqpI0Ww3jS0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1618600419385835.9450670227948; Fri, 16 Apr 2021 12:13:39 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-572-4EP_P4JyMGKnfyIJCJrz-Q-1; Fri, 16 Apr 2021 15:13:35 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1A2B98189D7; Fri, 16 Apr 2021 19:13:29 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EC1D12953C; Fri, 16 Apr 2021 19:13:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B72E21806D22; Fri, 16 Apr 2021 19:13:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13GJDN2Z028472 for ; Fri, 16 Apr 2021 15:13:23 -0400 Received: by smtp.corp.redhat.com (Postfix) id E877C5BAFF; Fri, 16 Apr 2021 19:13:23 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.195.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id 676A75D751 for ; Fri, 16 Apr 2021 19:13:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618600418; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=rhBOPu/0VUf9QW/0VMBrt7+dKXIi8T/QZUWujQ8EeAY=; b=UC5KPuX9A15IEr8LMrohULO8JPQb/lFW08dJRZy8NFDgLEzoUmUiXjFyF0bkmGi32dZVYT 5eeaBWkZYref1TQMeaf+7TCnvEHeypTTDcQXX1sJ4VYyIW0RJdGbqZe8245KgxH78AfeOG WqDebjXGiA/kbQqQFKCG6JpH0+AYctU= X-MC-Unique: 4EP_P4JyMGKnfyIJCJrz-Q-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 17/17] meson: optional_programs should be used only for building libvirt Date: Fri, 16 Apr 2021 21:12:46 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Drop code that creates defines with program paths and update the comment to reflect current usage of optional_programs. Signed-off-by: Pavel Hrdina --- 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 =20 =20 -# optional programs +# optional programs used while building libvirt =20 optional_programs =3D [ 'augparse', @@ -933,14 +933,6 @@ optional_programs =3D [ foreach name : optional_programs prog =3D find_program(name, required: false, dirs: libvirt_sbin_path) varname =3D name.underscorify() - if prog.found() - prog_path =3D prog.path() - else - prog_path =3D 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 =20 --=20 2.30.2