Message ID | 20240912073921.453203-13-pierrick.bouvier@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Received: from mail-ot1-f51.google.com (mail-ot1-f51.google.com [209.85.210.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9D9C18FDDE for <kvm@vger.kernel.org>; Thu, 12 Sep 2024 07:39:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726126801; cv=none; b=TNX5i4rusQzmgRggPAJJWgMwI/RfdP3nU4sgcbrclKTsPS7wuYkngdbVZ4CAMJdhNW+tiKZk56Nkqu+4u2NgiabvokjOcLUm/u9w4YQRzm5AhKkuwrGsemWLutiOXPf1OMLOHFwq/2TMFOayNANBS9nGPpl2e2jupCqeIvz7zMY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726126801; c=relaxed/simple; bh=PhZK5jB8AGwL3Dlv0BhUdpfkS+HADWChfqJRb4K3skE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=tVm24yXcL5WwCmAfEAPQdFgpp4RwfNpP+jTh8VXm032feB8o9lsxikTfPYLkKetswadA4p201cpP09V9AzAFIO9zm6yujhb8YlUkNw0Nktr+I+x8QCgZE4BsJHR3K1lwJnTHLAG/ke+jzHK8EiCaGJZFE1zXOuTLuQopetM7D6E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=j7sV1Fqh; arc=none smtp.client-ip=209.85.210.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="j7sV1Fqh" Received: by mail-ot1-f51.google.com with SMTP id 46e09a7af769-710da656c0bso235536a34.0 for <kvm@vger.kernel.org>; Thu, 12 Sep 2024 00:39:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726126798; x=1726731598; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/E70KJJTPx2V75BYTTVlugDcxiGJ3PzFoLEiBX1aDhc=; b=j7sV1FqhTE4Nqy8h0xrxGU9XgX36n42LWilGltEUisefnL/LzDL7uCpr/imzv4O2fU fG4bgwND/HV/yYW0GpmkCGMB2vGxURVVrlik53cgatEPqOq6Ho5+SSUTLHb8jng7M3uw DClzoevD6eyhk4ybCd1mHPGQHmkV1te3MKVdDKx5AvP9MeH/sMazGCnCvehQVec4curt r+BYKcC0/CIYETm/mpmd8+bcUODDSSemrIz/TTnv3utHkeq+ZT0I0pIU6s0OBcbIUgW5 Ko+7vAd+0hAvqKSupb6RNq6nPVhmmKGfHGhDsOARxvSv8r+9kRqQ7wRs0ZywpxyQhJn9 4WLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726126798; x=1726731598; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/E70KJJTPx2V75BYTTVlugDcxiGJ3PzFoLEiBX1aDhc=; b=V7fGEsZRiKIs8PSaReMrw6ln8Hv93MnMs8jVyeEseFgPah8OwsqcX+qPVqMM7J/Z9R ghc7eu/B/ecr5hrlO1RIeMLxDjTIoZVw3JVs2eTW3nyv1H8rvnXE71OyDZMwkgAj38IZ mtb9xW6JEwN4un0Y8EHrazLxpptUqbt9LeYOwA13qYCIeVfxhq8hmLaaOe393ux1QWjr HA41CBTWQBCteSFUCLaA/VM8MnFKGjb1tEp6xJANxq5xG4OOIUZ9VMexdxENjyr7uwBB Jv4DdQR1/dC7AY9X6kZCCg1RixV/TbXnhYAcZuc/zs3OZtqGqU+uZoRlnk5eIVPufALU 9akw== X-Forwarded-Encrypted: i=1; AJvYcCXc0MswY6LoMP5phdFV6gGkouAks1GiEPi2EupTxUt5ij3/JIQ8f9bI6+Sye5ssYR/35Z8=@vger.kernel.org X-Gm-Message-State: AOJu0YwH0SminX3quqDyljvdZostGRAwFGjhWQlJbWDbLG9EVTF/YvM/ ptu9f0lJI/tvMJTKewuutsTXnbzNPG9u5xGj4MmQK3GWLJ3Q0HVL6P97xtiA1hA= X-Google-Smtp-Source: AGHT+IG5ne8GTfzcAIBppwGJ8l4Yooy0KY6YC3wG/455mCNEr6eNEp84R9bb0cy5D5sMvEwevLyaeg== X-Received: by 2002:a05:6830:d02:b0:710:bffc:a28e with SMTP id 46e09a7af769-7110949a084mr1707232a34.19.1726126797795; Thu, 12 Sep 2024 00:39:57 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00::9633]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7db1fb9ad87sm983458a12.6.2024.09.12.00.39.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2024 00:39:57 -0700 (PDT) From: Pierrick Bouvier <pierrick.bouvier@linaro.org> To: qemu-devel@nongnu.org Cc: Jason Wang <jasowang@redhat.com>, =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, Laurent Vivier <lvivier@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>, Nicholas Piggin <npiggin@gmail.com>, Klaus Jensen <its@irrelevant.dk>, WANG Xuerui <git@xen0n.name>, Halil Pasic <pasic@linux.ibm.com>, Rob Herring <robh@kernel.org>, Michael Rolnik <mrolnik@gmail.com>, Zhao Liu <zhao1.liu@intel.com>, Peter Maydell <peter.maydell@linaro.org>, Richard Henderson <richard.henderson@linaro.org>, Fabiano Rosas <farosas@suse.de>, Corey Minyard <minyard@acm.org>, Keith Busch <kbusch@kernel.org>, Thomas Huth <thuth@redhat.com>, "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>, Harsh Prateek Bora <harshpb@linux.ibm.com>, Kevin Wolf <kwolf@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Jesper Devantier <foss@defmacro.it>, Hyman Huang <yong.huang@smartx.com>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Palmer Dabbelt <palmer@dabbelt.com>, qemu-s390x@nongnu.org, Laurent Vivier <laurent@vivier.eu>, qemu-riscv@nongnu.org, "Richard W.M. Jones" <rjones@redhat.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, Aurelien Jarno <aurelien@aurel32.net>, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= <berrange@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, kvm@vger.kernel.org, Christian Borntraeger <borntraeger@linux.ibm.com>, Akihiko Odaki <akihiko.odaki@daynix.com>, Daniel Henrique Barboza <dbarboza@ventanamicro.com>, Hanna Reitz <hreitz@redhat.com>, Ani Sinha <anisinha@redhat.com>, qemu-ppc@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>, Alistair Francis <alistair.francis@wdc.com>, Bin Meng <bmeng.cn@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>, Helge Deller <deller@gmx.de>, Peter Xu <peterx@redhat.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, Dmitry Fleytman <dmitry.fleytman@gmail.com>, Nina Schoetterl-Glausch <nsg@linux.ibm.com>, Yanan Wang <wangyanan55@huawei.com>, qemu-arm@nongnu.org, Igor Mammedov <imammedo@redhat.com>, Jean-Christophe Dubois <jcd@tribudubois.net>, Eric Farman <farman@linux.ibm.com>, Sriram Yagnaraman <sriram.yagnaraman@ericsson.com>, qemu-block@nongnu.org, Stefan Berger <stefanb@linux.vnet.ibm.com>, Joel Stanley <joel@jms.id.au>, Eduardo Habkost <eduardo@habkost.net>, David Gibson <david@gibson.dropbear.id.au>, Fam Zheng <fam@euphon.net>, Weiwei Li <liwei1518@gmail.com>, Markus Armbruster <armbru@redhat.com>, Pierrick Bouvier <pierrick.bouvier@linaro.org> Subject: [PATCH v2 12/48] tests/qtest: replace assert(0) with g_assert_not_reached() Date: Thu, 12 Sep 2024 00:38:45 -0700 Message-Id: <20240912073921.453203-13-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240912073921.453203-1-pierrick.bouvier@linaro.org> References: <20240912073921.453203-1-pierrick.bouvier@linaro.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: <kvm.vger.kernel.org> List-Subscribe: <mailto:kvm+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:kvm+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit |
Series |
Use g_assert_not_reached instead of (g_)assert(0,false)
|
expand
|
diff --git a/tests/qtest/ipmi-bt-test.c b/tests/qtest/ipmi-bt-test.c index 383239bcd48..13f7c841f59 100644 --- a/tests/qtest/ipmi-bt-test.c +++ b/tests/qtest/ipmi-bt-test.c @@ -251,7 +251,7 @@ static void emu_msg_handler(void) msg[msg_len++] = 0xa0; write_emu_msg(msg, msg_len); } else { - g_assert(0); + g_assert_not_reached(); } } diff --git a/tests/qtest/ipmi-kcs-test.c b/tests/qtest/ipmi-kcs-test.c index afc24dd3e46..3186c6ad64b 100644 --- a/tests/qtest/ipmi-kcs-test.c +++ b/tests/qtest/ipmi-kcs-test.c @@ -145,7 +145,7 @@ static void kcs_cmd(uint8_t *cmd, unsigned int cmd_len, break; default: - g_assert(0); + g_assert_not_reached(); } *rsp_len = j; } @@ -184,7 +184,7 @@ static void kcs_abort(uint8_t *cmd, unsigned int cmd_len, break; default: - g_assert(0); + g_assert_not_reached(); } /* Start the abort here */ diff --git a/tests/qtest/rtl8139-test.c b/tests/qtest/rtl8139-test.c index eedf90f65af..55f671f2f59 100644 --- a/tests/qtest/rtl8139-test.c +++ b/tests/qtest/rtl8139-test.c @@ -65,7 +65,7 @@ PORT(IntrMask, w, 0x3c) PORT(IntrStatus, w, 0x3E) PORT(TimerInt, l, 0x54) -#define fatal(...) do { g_test_message(__VA_ARGS__); g_assert(0); } while (0) +#define fatal(...) do { g_test_message(__VA_ARGS__); g_assert_not_reached(); } while (0) static void test_timer(void) {