From nobody Thu May 2 02:10: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=1626960695; cv=none; d=zohomail.com; s=zohoarc; b=A7bppRKNFR4nyIzaj8Udnn9D0fZLMXqTkWaSsf1UuOM+ojIGu98WzRURM2wlJRgwLTi4fHmhI1zwxMbc5kSS9FbM66+CGy0ERBZZbdM2hqihGwHFwdROHzK9rrWAHpZuT3BwOfaEYTo5BBHZmhnQpmsvl/w42d9OzKeR78MSUvM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626960695; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=FQLsxoPIRy8WfBRpKlUu6cjFi91SyrDBS94Q5aPRsgE=; b=OQvQsLKmsdHb+IMpQHAVEhiN4pWHXsSOt3GKgPSjrxvWD0QEnSl6m4nhTh1zq4zGA8eAjqoOpjSYkQbRablCbGaonHCeQVsiUDaEitIRBbCJrwX2JQ1GMMuM9RBFoyZIe7jojkG+Zu5pNhdvGoveKruDjDKwEqHsIPTvA2J1vf0= 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) 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 1626960695845923.0373018517743; Thu, 22 Jul 2021 06:31:35 -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-592-TmB3At7DOLCmCY0QxffOmw-1; Thu, 22 Jul 2021 09:31:33 -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 3FC6E10150A0; Thu, 22 Jul 2021 13:31:27 +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 AEC285C1C2; Thu, 22 Jul 2021 13:31:26 +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 84261180BAB1; Thu, 22 Jul 2021 13:31:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16MDVNoS007483 for ; Thu, 22 Jul 2021 09:31:23 -0400 Received: by smtp.corp.redhat.com (Postfix) id BAE8B19D9B; Thu, 22 Jul 2021 13:31:23 +0000 (UTC) Received: from bart.redhat.com (unknown [10.43.2.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id 45DEF17F72 for ; Thu, 22 Jul 2021 13:31:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626960694; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=FQLsxoPIRy8WfBRpKlUu6cjFi91SyrDBS94Q5aPRsgE=; b=PgAJcxvlaP5SOXR6Ga01WAp0Mram2EMaNGF3d6ZJivr02pk4a7tmoHWX6BPq7PJqpXRgl3 kecKcolmzs/4Ant7lH09lJqZ/RZOZrQzj/Ltfj9wf0Q1n/Oq0w7/b/ul4/7DpyEUkMXIsu Jp8jaIwQ4HiE7Z8U1qN8V+fuq3Juz6s= X-MC-Unique: TmB3At7DOLCmCY0QxffOmw-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH] qemuxml2argvmock: Deduplicate some code Date: Thu, 22 Jul 2021 15:31:10 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.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) X-ZM-MESSAGEID: 1626960697433100001 Content-Type: text/plain; charset="utf-8" A stub implementation for virQEMUCapsGetKVMSupportsSecureGuest() was added recently. However, the very same implementation was added to domaincapsmock.c which is also loaded by qemuxml2argvtest and thus one occurrence of the stub can be dropped. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- tests/qemuxml2argvmock.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/tests/qemuxml2argvmock.c b/tests/qemuxml2argvmock.c index d7f77eabf7..9235c785b2 100644 --- a/tests/qemuxml2argvmock.c +++ b/tests/qemuxml2argvmock.c @@ -302,18 +302,3 @@ virIdentityEnsureSystemToken(void) { return g_strdup("3de80bcbf22d4833897f1638e01be9b2"); } - -static bool (*real_virQEMUCapsGetKVMSupportsSecureGuest)(virQEMUCaps *qemu= Caps); - -bool -virQEMUCapsGetKVMSupportsSecureGuest(virQEMUCaps *qemuCaps) -{ - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_CONFIDENTAL_GUEST_SUPPO= RT) && - virQEMUCapsGet(qemuCaps, QEMU_CAPS_S390_PV_GUEST)) - return true; - - if (!real_virQEMUCapsGetKVMSupportsSecureGuest) - VIR_MOCK_REAL_INIT(virQEMUCapsGetKVMSupportsSecureGuest); - - return real_virQEMUCapsGetKVMSupportsSecureGuest(qemuCaps); -} --=20 2.31.1