From patchwork Tue Sep 10 22:15:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 13799382 Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (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 639041AE862 for ; Tue, 10 Sep 2024 22:16:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726006600; cv=none; b=dy0l0tv3YW+THIYQPAwL/Wi5r3q5DuYVRH0QkQj2/HwMKkWt+1CCyVLY9FysEUHDNLRop1TTqRt7Qqmwenoj4TNtUW6CpOe7UIDbxs/z+xRhd3Jvw6p8B9browSGLtiwjvqGEj67x1XmyphXtuJLX3inuIp6DlJ2i9yDDTB1m5o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726006600; c=relaxed/simple; bh=vgIVOOQZwlXrDwhev8td9BK4bnD3X5cqSFsOwLrK8iM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WcO4h6/ZxKns/d6dauYPRo7AN57Wa8jEv8W5wPclO8kdLss9JWkzK4IFKJ/vHxQLM3rndu4ni0aFF20Gq8gPTZVaZfpWTdmTTVklB2Ath9eDlFeUCsA/6boB/nfCUl80JjMI+f7hZVabH2nqFaKGJKD647M4y4b/08l+/LdWVBI= 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=ANNQLJOy; arc=none smtp.client-ip=209.85.210.176 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="ANNQLJOy" Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-718e285544fso2749266b3a.1 for ; Tue, 10 Sep 2024 15:16:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726006599; x=1726611399; 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=5e7jM2SGiugZIDj7hvcHvckpF7J0ao6gx5zsDNU5OmE=; b=ANNQLJOyCiEbS8Uy3RRQUvLG8J1gbvU7eddI13UYzVhDsXxogoRDv7ckkkoaehdcV3 ABJgtKsUL46rSjfox5K7ChlM4djiFmoenKQA+Et6q4Y2AsIE6ot1g65UI9EWowdqV86l LQ9CImQKyi5VJX69hMRZx9LGxY2deKw0KGeL5fXD6zQ5uCoFXB4Go9woxlsLvYykvPCB 09p/YGuENbDaT1srrMpSsEyTKTsNyQVSNM8CAZB/zk+PmlkRHZjD6GcKg3apIjWz1R4k ASPibHPoyrseh/crvQ3AADdBTDG92o2ADiKamAe9LGTEf5/KRyj+NFSBQjr9CETqhVMd AXyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726006599; x=1726611399; 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=5e7jM2SGiugZIDj7hvcHvckpF7J0ao6gx5zsDNU5OmE=; b=t6OefMaY1i8/FpC/hfrEZrgbWWlXowtr7LYeikUICUdydGEhvmNlmU7VhmkJUiwR+q JbQU6+Qo0z8F+qaKz4xzLAxpKU1lbDNBISnxFXB6N3w04KIr1um8gv7zgAEwEtIMAzQR Fuqr+YPXVDmd0joGt/uBGGnebvqPWDUkbqjc/473D4Eibn2A6Lf6mROyAAq8CiHIXn5I SordLhy+3FO6rDk7sipZ2+Dgb3gGxXfxYxP3C4LJGf5stEBqx1nKpKHNyZIoFyevYD67 VN8XDsBN+a658yY0o9y0ivaWLPyeZQ/f9+lFd/opzcJUKyEE9I7vDHojTC4lHZST7T/L AwRw== X-Forwarded-Encrypted: i=1; AJvYcCUARDrP+Ebd8azMO6Mazlkf5LWFlRrnOFZ+2IybwMPzyiK9fZ1SOQUEsVx40NmqQdaf5V8=@vger.kernel.org X-Gm-Message-State: AOJu0Ywv80nZ8ur+NDYcnlnPAq6rzvncioL9oGHujhh1WxHlVcjBsliG IeH5tMeFynA5pp4cz3en5soWyl1liUYx1FbRi7Pr4xttpJfEmf2+FC9Wa9JZkao= X-Google-Smtp-Source: AGHT+IGmTWAlHqohfvDcmF4lhCn4e0s9xwSiGMy/9LUB1RgrtDOx1fMalziLV42CXKlDan+123/d1Q== X-Received: by 2002:a05:6a20:289e:b0:1cf:4348:d5c8 with SMTP id adf61e73a8af0-1cf5e157922mr2270616637.39.1726006598631; Tue, 10 Sep 2024 15:16:38 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00::9633]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71909003d0esm1884055b3a.93.2024.09.10.15.16.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 15:16:38 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Zhao Liu , "Richard W.M. Jones" , Joel Stanley , Kevin Wolf , Paolo Bonzini , qemu-arm@nongnu.org, Corey Minyard , Eric Farman , Thomas Huth , Keith Busch , WANG Xuerui , Hyman Huang , Stefan Berger , Michael Rolnik , Alistair Francis , =?utf-8?q?Marc-Andr=C3=A9_Lure?= =?utf-8?q?au?= , Markus Armbruster , Sriram Yagnaraman , Palmer Dabbelt , qemu-riscv@nongnu.org, Ani Sinha , Halil Pasic , Jesper Devantier , Laurent Vivier , Peter Maydell , Igor Mammedov , kvm@vger.kernel.org, =?utf-8?q?Alex_Be?= =?utf-8?q?nn=C3=A9e?= , Richard Henderson , Fam Zheng , qemu-s390x@nongnu.org, Hanna Reitz , Nicholas Piggin , Eduardo Habkost , Laurent Vivier , Rob Herring , Marcel Apfelbaum , qemu-block@nongnu.org, "Maciej S. Szmigiero" , qemu-ppc@nongnu.org, Daniel Henrique Barboza , Christian Borntraeger , Harsh Prateek Bora , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Nina Schoetterl-Glausch , "Michael S. Tsirkin" , Fabiano Rosas , Helge Deller , Dmitry Fleytman , Daniel Henrique Barboza , Akihiko Odaki , Marcelo Tosatti , David Gibson , Aurelien Jarno , Liu Zhiwei , Yanan Wang , Peter Xu , Bin Meng , Weiwei Li , Klaus Jensen , Jean-Christophe Dubois , Jason Wang , Pierrick Bouvier Subject: [PATCH 12/39] tests/qtest: replace assert(0) with g_assert_not_reached() Date: Tue, 10 Sep 2024 15:15:39 -0700 Message-Id: <20240910221606.1817478-13-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240910221606.1817478-1-pierrick.bouvier@linaro.org> References: <20240910221606.1817478-1-pierrick.bouvier@linaro.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Signed-off-by: Pierrick Bouvier Reviewed-by: Thomas Huth --- tests/qtest/ipmi-bt-test.c | 2 +- tests/qtest/ipmi-kcs-test.c | 4 ++-- tests/qtest/rtl8139-test.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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) {