From patchwork Thu Sep 12 07:38:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 827817 Delivered-To: patch@linaro.org Received: by 2002:adf:ab1c:0:b0:367:895a:4699 with SMTP id q28csp1143645wrc; Thu, 12 Sep 2024 00:47:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX4ssCIthsbZkGgSjTopqjHoECnJtxNbjKlVUAVyAaR2jHB0ACIdsgkKIheNUwvGoNIPIUyvg==@linaro.org X-Google-Smtp-Source: AGHT+IH3s58thbdNtW81jPEZ6rUIb/Tg44Mfofbri1QRmarFYkOCO1aIrYLUaOrcPj4o9+KJopXp X-Received: by 2002:ac8:5955:0:b0:458:1eba:6c23 with SMTP id d75a77b69052e-4586045796fmr26792721cf.60.1726127241534; Thu, 12 Sep 2024 00:47:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726127241; cv=none; d=google.com; s=arc-20240605; b=jjDZTREId7MxBpbCUJmycQRLtZdB9d08Dhkq9qf5WozGzI7ZUwNpja90Tk27vS8et8 xHKbsqYeAr381t3Cb4d3ErxELrQo2Z/gBNbZlZrH/P9ssjrb7DRKfMyQQzNXQe66qQ4P OOl1TmqD1CaQDkmLjfS7GXCQ75i+pTRhAfJomWaoPt3ri4tP8z5swGroG192XTrohKHK PYZaO2pXqxufnR4Q7v3XLPweqZdlVM7mSLhYBo703Mik4HtwIhhJScCATYaOe1NrMIqQ aZ0Xfh2zfr+Lc6/H8efYvz8e+mECXLrZO46zqk3MvIen8QIMPIENXxvnmmwhhdAssgNR K6Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lAgxsGkzSX6UIjZ+akO+9hnbz8NplQ6SsHLnjF/2omU=; fh=9lXHm2cv0EOsvaESlQxkp+iopfNbpS2ZXLeBYSea/ko=; b=A+XwT9IrleooRFV3gd7pqwhCE3cq31UjPEQpT7h4R4lwx4+OyCI+d0dqWcAGGzOtSd pp84M2T9baQV0NiXXtwl5zRHNy8wczJZP5cgHfCk7g4GZGcM98wAV5KwWSFjAwzm+2Lf iGnDMk0BeCrMtIvSE1reRbtbwYcKD5Xa0oBw0MQueGYJ4JS6eA/DdnMd7MpXvUCMe+5n QK1URW3GEC0j2A1FGccMVcZwu58kJdAnani6n7ppvTjwc1ixT7Gwd2+kuZik6yAd/OPS xi6pdef7KNh6GL64PGNhwfWQcGK+3zTuoYy20fwp2YUkALlupVjYTDpDLOti/HElvUH5 H/ng==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZM5hy7AC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-45822f8263fsi122023201cf.486.2024.09.12.00.47.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Sep 2024 00:47:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZM5hy7AC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1soeTR-0001dB-80; Thu, 12 Sep 2024 03:42:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1soeRR-0004qB-2X for qemu-devel@nongnu.org; Thu, 12 Sep 2024 03:40:37 -0400 Received: from mail-il1-x12f.google.com ([2607:f8b0:4864:20::12f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1soeRK-0000gN-Pa for qemu-devel@nongnu.org; Thu, 12 Sep 2024 03:40:34 -0400 Received: by mail-il1-x12f.google.com with SMTP id e9e14a558f8ab-37636c3872bso2430305ab.3 for ; Thu, 12 Sep 2024 00:40:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726126827; x=1726731627; darn=nongnu.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=lAgxsGkzSX6UIjZ+akO+9hnbz8NplQ6SsHLnjF/2omU=; b=ZM5hy7ACFMjNG/zZDPBHMwW5cZe+RA8zsNBTYf0ivTTN4jGKlPVoO2AFvY6RsL6Pvd 9Z+3Be5YN0yVGqlZBBF1Ffh3CrIHlCUFH85P6yUvuLEjA3FA9te1xZY9SDr73EnIsDU9 mutI0+YrqBfkxpsPFeMViqMB2FXKThPaCcdYy9VgjVeojxRQqE48+cej5jbH1l6S/tVc dF8WEbm0YFXC7HlWmYJPq118IK2KF/IBJFwoAYZ3KiMTLy3vhkc+FHlj7PuCkbRaTeqh OzuXIh8hPfjsEaoxdvs/nT8TBaTeN8HhzO6z/iha0Z7fo5JbrfmNk2mlMk26QROWdT+5 sdsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726126827; x=1726731627; 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=lAgxsGkzSX6UIjZ+akO+9hnbz8NplQ6SsHLnjF/2omU=; b=LYH0ZlEi9AdacTFAapnxhh1j/jWQ2+ZoBoZaJrLDYWMOK1apwvMiy3F8BREN3GOtNy Qx1445EI6UsXCWBkqwCf3kU+JYL9BEQ6Ddqdfg3FykXi3BMOT0fYbscmAvkEUJKNr7x2 y/mHHAootM4VNjHN+KOlXqARt9WjQwPQAknqHs73UfF5KRUVILMJsTjBGHYXwIM4HeiL lw5bIU3SD4JocLVqrP2QJ6YkKgQazVt0DS0VmZ9vZjvb+ZGG8CwDk8q3VHRtLMWhTUd7 k6r3zG6ysvx2N8CtYPofgIFO9TcgU2u7OGLRFn82TTywR8oUxD37Cr8Y7Gx9Y9G8XdeI YVPw== X-Gm-Message-State: AOJu0Yyi3WURPu4H8hyIIM+z6zKjchePVhCJMFIrpn9xLfZgYselBTo9 hOyxqmgcxMXigGZheQA6+Fe2OhJ0uomTnZUI1t/8KbKpIhYoWH+/edtSC/yAiAglGNedLcdO5Xj sGKG6IPoZ X-Received: by 2002:a05:6e02:180c:b0:39f:709d:72b5 with SMTP id e9e14a558f8ab-3a0848fc3ddmr16439855ab.10.1726126827207; Thu, 12 Sep 2024 00:40:27 -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.40.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2024 00:40:26 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Jason Wang , =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier , Marcelo Tosatti , Nicholas Piggin , Klaus Jensen , WANG Xuerui , Halil Pasic , Rob Herring , Michael Rolnik , Zhao Liu , Peter Maydell , Richard Henderson , Fabiano Rosas , Corey Minyard , Keith Busch , Thomas Huth , "Maciej S. Szmigiero" , Harsh Prateek Bora , Kevin Wolf , Paolo Bonzini , Jesper Devantier , Hyman Huang , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Palmer Dabbelt , qemu-s390x@nongnu.org, Laurent Vivier , qemu-riscv@nongnu.org, "Richard W.M. Jones" , Liu Zhiwei , Aurelien Jarno , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Marcel Apfelbaum , kvm@vger.kernel.org, Christian Borntraeger , Akihiko Odaki , Daniel Henrique Barboza , Hanna Reitz , Ani Sinha , qemu-ppc@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Alistair Francis , Bin Meng , "Michael S. Tsirkin" , Helge Deller , Peter Xu , Daniel Henrique Barboza , Dmitry Fleytman , Nina Schoetterl-Glausch , Yanan Wang , qemu-arm@nongnu.org, Igor Mammedov , Jean-Christophe Dubois , Eric Farman , Sriram Yagnaraman , qemu-block@nongnu.org, Stefan Berger , Joel Stanley , Eduardo Habkost , David Gibson , Fam Zheng , Weiwei Li , Markus Armbruster , Pierrick Bouvier Subject: [PATCH v2 23/48] tests/qtest: replace assert(false) with g_assert_not_reached() Date: Thu, 12 Sep 2024 00:38:56 -0700 Message-Id: <20240912073921.453203-24-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> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::12f; envelope-from=pierrick.bouvier@linaro.org; helo=mail-il1-x12f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This patch is part of a series that moves towards a consistent use of g_assert_not_reached() rather than an ad hoc mix of different assertion mechanisms. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- tests/qtest/numa-test.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/qtest/numa-test.c b/tests/qtest/numa-test.c index ede418963cb..6d92baee860 100644 --- a/tests/qtest/numa-test.c +++ b/tests/qtest/numa-test.c @@ -162,7 +162,7 @@ static void pc_numa_cpu(const void *data) } else if (socket == 1 && core == 1 && thread == 1) { g_assert_cmpint(node, ==, 1); } else { - g_assert(false); + g_assert_not_reached(); } qobject_unref(e); } @@ -207,7 +207,7 @@ static void spapr_numa_cpu(const void *data) } else if (core == 3) { g_assert_cmpint(node, ==, 1); } else { - g_assert(false); + g_assert_not_reached(); } qobject_unref(e); } @@ -257,7 +257,7 @@ static void aarch64_numa_cpu(const void *data) } else if (socket == 1 && cluster == 0 && core == 0 && thread == 0) { g_assert_cmpint(node, ==, 0); } else { - g_assert(false); + g_assert_not_reached(); } qobject_unref(e); } @@ -305,7 +305,7 @@ static void loongarch64_numa_cpu(const void *data) } else if (socket == 1 && core == 0 && thread == 0) { g_assert_cmpint(node, ==, 0); } else { - g_assert(false); + g_assert_not_reached(); } qobject_unref(e); } @@ -367,7 +367,7 @@ static void pc_dynamic_cpu_cfg(const void *data) } else if (socket == 1) { g_assert_cmpint(node, ==, 0); } else { - g_assert(false); + g_assert_not_reached(); } qobject_unref(e); }