| Message ID | 20260416023021.626949-15-sjg@u-boot.org |
|---|---|
| State | New |
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> 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=1776306672; bh=kxciMjqlepySyqKNDIz1N9S2+z40GND8BGLcWESX8rU=; 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=EVtHyfu9ru2dNbjiZ+jgRaO0PPVV+9HOGB33Q3+ZiSu+HPVY8J9EFdwEkR59SeSXF 26nQN2XqLfuljQY0l1pdfjoa3bpBzjrwsNyBqDN+NBy0or9KdjeCqeKZkMY/YmJyje L2SwyNxyV9JpP4dgrJFK0WwBJglkT+bDCsUb+j6Y= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9960C6A4C7 for <u-boot-concept@u-boot.org>; Wed, 15 Apr 2026 20:31:12 -0600 (MDT) 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 WMGy0lOm7g6r for <u-boot-concept@u-boot.org>; Wed, 15 Apr 2026 20:31:12 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306669; bh=kxciMjqlepySyqKNDIz1N9S2+z40GND8BGLcWESX8rU=; 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=KlAqk5EqMfoC3JoyWLvIeIA/P8vYesc04I5judg/Xv6hweB17CmjM0QcUaRWEnqW9 40pl3Gs5rJ8hjshljoTO4/aPeBQ7LjlEN3xQvlKVaDRqgyx/su0BvuMj+MUhMvVTWE rPQ0mE9rGCkSusHB+Qwd5fGSSsHNvH8roUFbwkoU= Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 01E326A4C8 for <u-boot-concept@u-boot.org>; Wed, 15 Apr 2026 20:31:09 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306667; bh=QoHD9KaIZMuhqh4p2igLR8RAgF9uhhJBzvWqjeeOfu8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hIgu7jt+ExVkPFFhdn0+ZiPPygOai/KU7wDaVMO4vst3D1/OSPnvCKfLlA89wZPE7 3TFdA3t0sH8HL0/X3/PRCIbNqLngmfevP5RrUwJtX+9DpraIGnArljp3K6iTg9gidz TiHJDihkvfdHmTYlG64vbcUsYMxK4r/dBY7aH9jk= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 14C566A4B8; Wed, 15 Apr 2026 20:31:07 -0600 (MDT) 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 Jn7znyipJfmf; Wed, 15 Apr 2026 20:31:06 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306661; bh=1UNOpeRH9ZRlpN4rVimzUdcdoP+4WX/yHFkZAv4Zqbg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sIYi+Imh+kRkBJ5IatUpzKtYCnnbdWZAXPkukYPzPH6wU/PEHF6kBSg0TNJl+6JFc sePOlJdmveUMEZ5S2h+G+R/w7bzLVDp09J13GhstPYQKkoRMnb27/VfOQ39qzbUq4N RLiFPdCNyHR5LW4WN/0aHYeorDAcTrL6QncfdoTU= Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 9930E6A4BF; Wed, 15 Apr 2026 20:31:01 -0600 (MDT) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Wed, 15 Apr 2026 20:29:39 -0600 Message-ID: <20260416023021.626949-15-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260416023021.626949-1-sjg@u-boot.org> References: <20260416023021.626949-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: Q57HBQHZBZPNLMVW5UV35SWDOARALR5V X-Message-ID-Hash: Q57HBQHZBZPNLMVW5UV35SWDOARALR5V 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: Simon Glass <sjg@chromium.org> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 14/33] test: video: Reselect default font at start of video_silence List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/Q57HBQHZBZPNLMVW5UV35SWDOARALR5V/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
Fix memory leaks and test pollution in sandbox tests
|
|
Commit Message
Simon Glass
April 16, 2026, 2:29 a.m. UTC
From: Simon Glass <sjg@chromium.org> dm_test_video_silence() compares the framebuffer against an exact compressed byte count, which only matches when the vidconsole is using its default font. If an earlier test (for example expo or cedit) switched the font and did not restore it, the messages that this test writes rasterise to different pixels and the byte count no longer matches. Select the default font before clearing and writing, so the test does its work with a known font regardless of what state a preceding test left behind. Signed-off-by: Simon Glass <sjg@chromium.org> --- test/dm/video.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/test/dm/video.c b/test/dm/video.c index 18d257e39f4..a0608ebc23f 100644 --- a/test/dm/video.c +++ b/test/dm/video.c @@ -1214,6 +1214,12 @@ static int dm_test_video_silence(struct unit_test_state *uts) sdev = stdio_get_by_name("vidconsole"); ut_assertnonnull(sdev); con = sdev->priv; + /* + * Restore the default font so an earlier test that left a different + * one selected does not change the pixels written by the messages + * below. + */ + ut_assertok(vidconsole_select_font(con, NULL, NULL, 0)); ut_assertok(vidconsole_clear_and_reset(con)); ut_unsilence_console(uts);