From nobody Mon May 6 15:55:02 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=1630784292; cv=none; d=zohomail.com; s=zohoarc; b=iRO0ZxNz6eXQQ3NJCkJVkN0TkhQWKbTi0QahrpUUgmxqCytIaJc+MGhrK5xxhCDi0ahq/peAJhDVg/zZrg0FucUCg4h3Yzbl76GgClU0YhJybrN/hrm9N9qyOpGYligayFrMItAl7WofF8LEpr3AKl3XS3bmFBq7fomDbPxmf+o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1630784292; 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=GmYymAoKmwkhzrrcQLPID/52tdZHO8seVO+pFn9Q474=; b=iY3XpQpigVy5i65pK/FOAWxQTRYoxRjtgrR4L3k5jTZzMZuCeVhueqqGtvEAXKold9bf2aCv03XKf9v6qpP0N1KlS0M+DMrYQm8yH8cHlDl79B8Ak5mCm0ZVkqaYfZv25XFqFZkMI3WtuTd3t1l4JPci79j2DJ5GmQ7D1Dc+0+Y= 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) 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 163078429228684.28984408331212; Sat, 4 Sep 2021 12:38:12 -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-325-2TwLW_qAO-yGwEnRwMLRAQ-1; Sat, 04 Sep 2021 15:38:09 -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 12B8F5194; Sat, 4 Sep 2021 19:38:04 +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 EC8386A91E; Sat, 4 Sep 2021 19:38:03 +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 BC2CD1800B9C; Sat, 4 Sep 2021 19:38:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 184JRoJT002050 for ; Sat, 4 Sep 2021 15:27:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id 22E641B5C1; Sat, 4 Sep 2021 19:27:50 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id A18D960861 for ; Sat, 4 Sep 2021 19:27:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630784291; 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=GmYymAoKmwkhzrrcQLPID/52tdZHO8seVO+pFn9Q474=; b=SruaRgAaSn0Fl9bJQTvVfG82k0tUtWS3aXBkjTzVvDWLLzbQT+asVYlhbovIdJyDmJyJQk cupCCZ3vUuPnuv/GBOfuSgvL2jKCZpFlX665fS3gZdGZbvxZeEspdgJSUyaHZSVNjrse6V KNec9Uosgo/k7uVCuwS8LJK3ZKrKGpQ= X-MC-Unique: 2TwLW_qAO-yGwEnRwMLRAQ-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 1/2] tests: bhyve: remove magic constants Date: Sat, 4 Sep 2021 21:27:42 +0200 Message-Id: <3f4b77cfb956329093e3c50d0c60645044b07051.1630783592.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1630784293213100001 Refer to flags by their identifier, not value. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Pavel Hrdina --- tests/bhyveargv2xmltest.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/bhyveargv2xmltest.c b/tests/bhyveargv2xmltest.c index 2c1ffc75f3..e86c9e3b10 100644 --- a/tests/bhyveargv2xmltest.c +++ b/tests/bhyveargv2xmltest.c @@ -131,16 +131,16 @@ mymain(void) DO_TEST_FULL(name, 0) =20 # define DO_TEST_FAIL(name) \ - DO_TEST_FULL(name, 5) + DO_TEST_FULL(name, FLAG_EXPECT_FAILURE | FLAG_EXPECT_WARNING) =20 # define DO_TEST_WARN(name) \ - DO_TEST_FULL(name, 4) + DO_TEST_FULL(name, FLAG_EXPECT_WARNING) =20 # define DO_TEST_FAIL_SILENT(name) \ - DO_TEST_FULL(name, 1) + DO_TEST_FULL(name, FLAG_EXPECT_FAILURE) =20 # define DO_TEST_PARSE_ERROR(name) \ - DO_TEST_FULL(name, 2) + DO_TEST_FULL(name, FLAG_EXPECT_PARSE_ERROR) =20 driver.grubcaps =3D BHYVE_GRUB_CAP_CONSDEV; driver.bhyvecaps =3D BHYVE_CAP_RTC_UTC; --=20 2.31.1 From nobody Mon May 6 15:55:02 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=1630783881; cv=none; d=zohomail.com; s=zohoarc; b=EIt17lG5sSU8rrYYGTSis8fsTmioprfvpYDbI96FUISvWariasoVUQX491W4lTrPFXwvSFPMjkzQscgRhsYpEhVS7rqUiAql3sFuFpL3mF5oFy4tAOcFBO4OfJoFp1L8A84/T0dBBWBTgXTffohJBnkoa9jFzi0eHmaTjJYxCJo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1630783881; 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=E1ZLgaWesXMLX63lj7zvveFchLJy4TIV4F0Spjkztgg=; b=GlVZ+zR7Gi512WVmMeVeqNswu7sI6awLv5FReRS66fsC3rRA4HwCOwg/1gmoSKCUfnkuUuTY3qjFZ70V4p7+TjYHC/cpqe2N8WR1qflQvRKp6QKodLmiHakTRWh9roqPf+Bam4MEU9M0C9Pr+tWpztxLQ6+xR0kje1OTVsVjlKA= 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 1630783881481767.5672363042595; Sat, 4 Sep 2021 12:31:21 -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-10-Bf7l6EwnM9eeKTgGFUgQAQ-1; Sat, 04 Sep 2021 15:31:18 -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 14B4F107ACCA; Sat, 4 Sep 2021 19:31: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 ED6E96A257; Sat, 4 Sep 2021 19:31: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 98BD61809C98; Sat, 4 Sep 2021 19:31:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 184JRotV002058 for ; Sat, 4 Sep 2021 15:27:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id E45DB1B5C1; Sat, 4 Sep 2021 19:27:50 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6F6D560861 for ; Sat, 4 Sep 2021 19:27:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630783880; 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=E1ZLgaWesXMLX63lj7zvveFchLJy4TIV4F0Spjkztgg=; b=T95lRxx62Ql8TC52989h59Pnhvt1q5L3TdZWa+3yGSOBd5MJ0l6w2qnFCmXvot32jQhvX/ HmsIPwJJBSC2wNzZFauqfrYON8SkQ1cSoG8NWzBC3SoYIW+p1TBQaXn+fxBExYBA9fuaKj 81KBW4f+DgSWk7GAnWXJgyywAIxBIFE= X-MC-Unique: Bf7l6EwnM9eeKTgGFUgQAQ-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 2/2] tests: bhyve: use bitwise shift when defining flags Date: Sat, 4 Sep 2021 21:27:43 +0200 Message-Id: <4340cf135894b7435d39cb460025ac033687939c.1630783592.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1630783883571100001 Although I'm sure we all know the powers of two by heart now, this is the prevalent style for flag defition. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Pavel Hrdina --- tests/bhyveargv2xmltest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/bhyveargv2xmltest.c b/tests/bhyveargv2xmltest.c index e86c9e3b10..2ccc1379b9 100644 --- a/tests/bhyveargv2xmltest.c +++ b/tests/bhyveargv2xmltest.c @@ -17,9 +17,9 @@ static bhyveConn driver; =20 typedef enum { - FLAG_EXPECT_FAILURE =3D 1, - FLAG_EXPECT_PARSE_ERROR =3D 2, - FLAG_EXPECT_WARNING =3D 4, + FLAG_EXPECT_FAILURE =3D 1 << 0, + FLAG_EXPECT_PARSE_ERROR =3D 1 << 1, + FLAG_EXPECT_WARNING =3D 1 << 2, } virBhyveArgv2XMLTestFlags; =20 static int --=20 2.31.1