From patchwork Sun Dec 7 20:16:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 817 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765138640; bh=wLzNVZ9dUtwnhVA14z8YulRD7KBKBYNHeyEgHwkMzH8=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ZGOyAh4c3EGN64YJFPK8dyTGWxER6NXcum7MCVO1R1JbonjqYfQ1GsCXaqTNiB8mW u0gKisWafKYC+u/p4v7CK/rwR05TethAM1ABP5mEYooNj4lPDKfR71BK4/iaPhyS+g EV8a4tlv2LNwBbpjZTLUiN4RicAfuuplTxhKmuZS3RlrVlADy7+5pwKJuqPK9axHI7 i11RrsXzxCWVI6TsB4qEQHTdCsm3VgnZuk8KyERbJ8fIsGQPGcnRu1hLvKqyLC+RIX hmanoXO/XQn0LAXrlN1Ww3mFv9mHWnWViV7hUR2hZzVohi/PzzN0sUiuRaNvVpoa8u 42ZJ82cttefRA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id AFDA768950 for ; Sun, 7 Dec 2025 13:17:20 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id XLzeQM9ADL1v for ; Sun, 7 Dec 2025 13:17:20 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765138640; bh=wLzNVZ9dUtwnhVA14z8YulRD7KBKBYNHeyEgHwkMzH8=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ZGOyAh4c3EGN64YJFPK8dyTGWxER6NXcum7MCVO1R1JbonjqYfQ1GsCXaqTNiB8mW u0gKisWafKYC+u/p4v7CK/rwR05TethAM1ABP5mEYooNj4lPDKfR71BK4/iaPhyS+g EV8a4tlv2LNwBbpjZTLUiN4RicAfuuplTxhKmuZS3RlrVlADy7+5pwKJuqPK9axHI7 i11RrsXzxCWVI6TsB4qEQHTdCsm3VgnZuk8KyERbJ8fIsGQPGcnRu1hLvKqyLC+RIX hmanoXO/XQn0LAXrlN1Ww3mFv9mHWnWViV7hUR2hZzVohi/PzzN0sUiuRaNvVpoa8u 42ZJ82cttefRA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9E2F3688EF for ; Sun, 7 Dec 2025 13:17:20 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765138638; bh=crnBjiagvGD+IL+niyrLq6TYR5K09lVpVPWfeQtEbus=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=owhmUdMafUnwu1eKbk0thrsogq3swP5OUQdTwlwhBn+b4NI5Bls8QRtRPvFpgZfao ISQDND2k6SNyCd5y7UQJePMkfn7o86uBtFVLyq4LCGqHxzOGTd4pL0wwXM6ZGe/c+/ Rm5uN6qaCjWHhd5T8xY5tRiVPd8Msb3TP2krdSgkxKMoVrT5pvyxftrLfaylnKourC Rmtxx4SfPqjlcqvebnmUJpix5FsRdoxVszmhXFytNIRA84YEsNqGkDlThSIhrHO4di yHE0wDufFD+f2ORl95qHPlbSI88GKJ/ZOagvn0vbgMEtsITWW5rxcYlSJaD775UOvq ZGFENQlg7r81w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8CEA96883E; Sun, 7 Dec 2025 13:17:18 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id hGmC9D1giVzW; Sun, 7 Dec 2025 13:17:18 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765138633; bh=JHlIsnJIVNqBs35Ahf4rqP8lv8OByCKNTaRif32g06k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UxWxVqRRjnHjFJZWMZtuldITF2rawnmQxLh5jPkRJrYvetiVvMi+oS16TTmn8Y8at wQbwO4sJ8B3xyZuUTuf8fir+0pWuo2jTtOnyjes+txplZRLYAhBnfwfyDhKijxhtNn PdPZjQYcs8EqsCg59gjQrgbUyzaMVayQ6KtjOBGi+tqnzhMkM0kCbshtLzIHbb0Ssx 7e50W3xtzMpxsnb4BH9wsWDO/95zdt8mLwEEQuuzjqvsw6iH7s7q4tiwt6YCkhiBbk N/54Fn9ItQr4QERLf/Ctc6rDh4caFnY3Zlb+MkKbKWALAweRaKRBn0/pi0XxdfDPia QNIoN0zq/SXXQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 97A07688EF; Sun, 7 Dec 2025 13:17:13 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sun, 7 Dec 2025 13:16:02 -0700 Message-ID: <20251207201628.2882382-6-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251207201628.2882382-1-sjg@u-boot.org> References: <20251207201628.2882382-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: X3MJDUWFV5HMB735XACYXAFICQNCV4UC X-Message-ID-Hash: X3MJDUWFV5HMB735XACYXAFICQNCV4UC X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 05/22] test: Add a flag for test which need console output List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Some tests cannot run when the console is silent. An example is an expo test which checks text entry into a textline object. The console must be enabled so that the characters actually reach the putc_xy() in console_truetype, since in scene_textline_send_key(), the lineedit restores the vidconsole state, outputs the character and then saves the state again. If the character is never output, then the state won't be updated and the lineedit will be inconsistent. Rather than having individual tests handle this manually, add an explicit flag, in the hope that this quirk does not trip anyone else up. Put the flag next to the existing UTF_CONSOLE flag, since they are related. Signed-off-by: Simon Glass --- include/test/test.h | 17 +++++++++-------- test/test-main.c | 3 ++- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/include/test/test.h b/include/test/test.h index f2d956e913c..086fff1ca26 100644 --- a/include/test/test.h +++ b/include/test/test.h @@ -90,20 +90,21 @@ enum ut_flags { UTF_FLAT_TREE = BIT(3), /* test needs flat DT */ UTF_LIVE_TREE = BIT(4), /* needs live device tree */ UTF_CONSOLE = BIT(5), /* needs console recording */ + UTF_NO_SILENT = BIT(6), /* console cannot be silent */ /* do extra driver model init and uninit */ - UTF_DM = BIT(6), - UTF_OTHER_FDT = BIT(7), /* read in other device tree */ + UTF_DM = BIT(7), + UTF_OTHER_FDT = BIT(8), /* read in other device tree */ /* * Only run if explicitly requested with 'ut -f '. The * test name must end in "_norun" so that pytest detects this also, * since it cannot access the flags. */ - UTF_MANUAL = BIT(8), - UTF_ETH_BOOTDEV = BIT(9), /* enable Ethernet bootdevs */ - UTF_SF_BOOTDEV = BIT(10), /* enable SPI flash bootdevs */ - UFT_BLOBLIST = BIT(11), /* test changes gd->bloblist */ - UTF_INIT = BIT(12), /* test inits a suite */ - UTF_UNINIT = BIT(13), /* test uninits a suite */ + UTF_MANUAL = BIT(9), + UTF_ETH_BOOTDEV = BIT(10), /* enable Ethernet bootdevs */ + UTF_SF_BOOTDEV = BIT(11), /* enable SPI flash bootdevs */ + UFT_BLOBLIST = BIT(12), /* test changes gd->bloblist */ + UTF_INIT = BIT(13), /* test inits a suite */ + UTF_UNINIT = BIT(14), /* test uninits a suite */ }; /** diff --git a/test/test-main.c b/test/test-main.c index b27f892140c..941b883e156 100644 --- a/test/test-main.c +++ b/test/test-main.c @@ -410,7 +410,8 @@ static int test_pre_run(struct unit_test_state *uts, struct unit_test *test) gd_set_bloblist(NULL); } - ut_silence_console(uts); + if (!(test->flags & UTF_NO_SILENT)) + ut_silence_console(uts); return 0; }