From nobody Sun Sep 28 15:59:01 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1758963938924308.92836264823256; Sat, 27 Sep 2025 02:05:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v2QrF-0004Df-LX; Sat, 27 Sep 2025 05:04:45 -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 1v2QrC-0004Bz-Sl; Sat, 27 Sep 2025 05:04:42 -0400 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v2Qr0-0006us-M3; Sat, 27 Sep 2025 05:04:41 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 9E9FF15855C; Sat, 27 Sep 2025 12:03:02 +0300 (MSK) Received: from think4mjt.origo (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 76A59291579; Sat, 27 Sep 2025 12:03:05 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, "Richard W.M. Jones" , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Bulekov , Darren Kenny , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth , Michael Tokarev Subject: [Stable-7.2.21 07/16] tests: Ensure TAP version is printed before other messages Date: Sat, 27 Sep 2025 12:02:51 +0300 Message-ID: <20250927090304.2901324-7-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=212.248.84.144; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=ham 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1758963941247116600 From: "Richard W.M. Jones" These two tests were failing with this error: stderr: TAP parsing error: version number must be on the first line [...] Unknown TAP version. The first line MUST be `TAP version `. Assuming= version 12. This can be fixed by ensuring we always call g_test_init first in the body of main. Thanks: Daniel Berrange, for diagnosing the problem Signed-off-by: Richard W.M. Jones Reviewed-by: Daniel P. Berrang=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alexander Bulekov Reviewed-by: Darren Kenny Message-Id: <20230227174019.1164205-1-rjones@redhat.com> Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Thomas Huth Message-Id: <20230228190653.1602033-17-alex.bennee@linaro.org> (cherry picked from commit ae4b01b3497934849278b49f3dfd28420f75e300) (Mjt: this fixes rtl3129 testing failure on 7.2.x) Signed-off-by: Michael Tokarev diff --git a/tests/qtest/fuzz-lsi53c895a-test.c b/tests/qtest/fuzz-lsi53c89= 5a-test.c index 8afbfdd274..1b55928b9f 100644 --- a/tests/qtest/fuzz-lsi53c895a-test.c +++ b/tests/qtest/fuzz-lsi53c895a-test.c @@ -142,12 +142,12 @@ static void test_lsi_do_dma_empty_queue(void) =20 int main(int argc, char **argv) { + g_test_init(&argc, &argv, NULL); + if (!qtest_has_device("lsi53c895a")) { return 0; } =20 - g_test_init(&argc, &argv, NULL); - qtest_add_func("fuzz/lsi53c895a/lsi_do_dma_empty_queue", test_lsi_do_dma_empty_queue); =20 diff --git a/tests/qtest/rtl8139-test.c b/tests/qtest/rtl8139-test.c index 8fa3313cc3..90bb616974 100644 --- a/tests/qtest/rtl8139-test.c +++ b/tests/qtest/rtl8139-test.c @@ -196,9 +196,10 @@ int main(int argc, char **argv) { int ret; =20 + g_test_init(&argc, &argv, NULL); + qtest_start("-device rtl8139"); =20 - g_test_init(&argc, &argv, NULL); qtest_add_func("/rtl8139/nop", nop); qtest_add_func("/rtl8139/timer", test_init); =20 --=20 2.47.3