{"id":2219909,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2219909/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/20260405111206.945185-6-sjg@chromium.org/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/1.2/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260405111206.945185-6-sjg@chromium.org>","list_archive_url":null,"date":"2026-04-05T11:11:50","name":"[v2,5/8] test: Update fit test to fix a few Python warnings","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"db7895322dbdcef9a04c0af8334f15f539d138e8","submitter":{"id":6170,"url":"http://patchwork.ozlabs.org/api/1.2/people/6170/?format=json","name":"Simon Glass","email":"sjg@chromium.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/20260405111206.945185-6-sjg@chromium.org/mbox/","series":[{"id":498774,"url":"http://patchwork.ozlabs.org/api/1.2/series/498774/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=498774","date":"2026-04-05T11:11:45","name":"test: Refactor FIT test for clarity and extensibility","version":2,"mbox":"http://patchwork.ozlabs.org/series/498774/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2219909/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2219909/checks/","tags":{},"related":[],"headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256\n header.s=google header.b=f2cqyUMh;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)","phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=chromium.org","phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de","phobos.denx.de;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=chromium.org header.i=@chromium.org\n header.b=\"f2cqyUMh\";\n\tdkim-atps=neutral","phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=chromium.org","phobos.denx.de;\n spf=pass smtp.mailfrom=sjg@chromium.org"],"Received":["from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fpVF33Xl8z1yD3\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 05 Apr 2026 21:13:11 +1000 (AEST)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 4F08384120;\n\tSun,  5 Apr 2026 13:12:40 +0200 (CEST)","by phobos.denx.de (Postfix, from userid 109)\n id 42B078341A; Sun,  5 Apr 2026 13:12:39 +0200 (CEST)","from mail-oa1-x2f.google.com (mail-oa1-x2f.google.com\n [IPv6:2001:4860:4864:20::2f])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 0DD1484020\n for <u-boot@lists.denx.de>; Sun,  5 Apr 2026 13:12:36 +0200 (CEST)","by mail-oa1-x2f.google.com with SMTP id\n 586e51a60fabf-40ea611d1a4so1308047fac.2\n for <u-boot@lists.denx.de>; Sun, 05 Apr 2026 04:12:35 -0700 (PDT)","from chromium.org ([73.34.74.121]) by smtp.gmail.com with ESMTPSA id\n 5614622812f47-46d8d109b69sm6414382b6e.0.2026.04.05.04.12.31\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sun, 05 Apr 2026 04:12:32 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,\n RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=chromium.org; s=google; t=1775387554; x=1775992354; darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=+9Tn0VH4oSx3AdU4sU7QfHuzg3FL0kz9+OT6yTwOMuk=;\n b=f2cqyUMhs+vjm58TrNRhixjqOIkiqEixYRBYkQfGVZ1ye+XyWfzsH4af91jxR2W0hK\n BfDPUtezLR6MDgbemTjM9PNCoXZHI/0FXdha0Hnk41894NvO4M+jelhGh4b4P/B9gmTk\n xMCq0WumB3gbZ74aX7qwaKB9FbqzC0STlEe3Q=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775387554; x=1775992354;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=+9Tn0VH4oSx3AdU4sU7QfHuzg3FL0kz9+OT6yTwOMuk=;\n b=flmBT4sjwqsmySpnVv1dg7mFTsL/6Zl/thUEjMyfTN+VNIJ/4icHr0Aphw9LBpYHIQ\n iBhD9g2EhLrPa4C8JqxvCJupnkf6RVUnYa6tkDxZ2xSygrsC7JvtKwlU8rWxWUUF3W7c\n 1yigtWU/1ctCrCW2z8lBAXhjzXrUqkYsXyuO43KaZRzidTv2x1VMi8BPAs6ndQLsnQOK\n XWoVaGuWsBNl3aD9DLtTh4oMDbVNuR8vhIVZYegDRMaCl6M17bcTdg2FZni5DCM1hRmr\n Cg07yLsXj8HqHeMcIQ/FkwXyUvDS7pFfkvZZzxfcbN/vwq3VBo4lcu5IZQ5TGrtMGgZ9\n DSpQ==","X-Gm-Message-State":"AOJu0YxDJZJZdGkynjgppqLkih52JdHAQ8dK5Sc90Zqs87uuBLC+tSWX\n maeS3oGl2xvJ+qmpctOGxE/KC7N/8sXv2k3uO5oJhcvZaGanjTBzs/j7YaM3kLarwD67i0+4iCc\n gABhlzA==","X-Gm-Gg":"AeBDietPebimB3V7e95nQEBr450NOChwrQCOa2ZDPhz744xZTxuFEHS5/HmomMnR7zN\n J9zmDRp5kNkyH2p/jRWxbAYgazv5WNz2C3t8idCDBgsKY1tolFucb0puZbIlPd090Io8ObVBE25\n lKwuEJm6E4WQvtF6rqOFK6hUSr8ADMHt8QmZ4m06hdnanVoTTNC79Z3UWHuLTHmX49bOJN5f5Xt\n QnIPbr8J9FwIW2Jd/g41wYPQBABkxyQp3s+N8713erjmTNN9DcMn/F+gndtnBS2rgO5rlgfz5Ku\n ZIZX7PkzJj/ofY5XVdajqanLM/vv5esvUGv2wCNfGCkgB8ZYP6OTdZ6wGIXJjNYowQr0e3FiHmm\n sDOoCENpLH6JIqa7HwSNhEDtPl4w/MaYAMAW/Big0nxsFav5IbQKVBLGRBwa7aQMj6wVdzvLXSI\n pqMa7cPBO75xelIxej3Q==","X-Received":"by 2002:a05:6808:ec2:b0:467:f636:23bd with SMTP id\n 5614622812f47-46ef831b60emr4471184b6e.42.1775387553841;\n Sun, 05 Apr 2026 04:12:33 -0700 (PDT)","From":"Simon Glass <sjg@chromium.org>","To":"u-boot@lists.denx.de","Cc":"Simon Glass <sjg@chromium.org>,\n\tTom Rini <trini@konsulko.com>","Subject":"[PATCH v2 5/8] test: Update fit test to fix a few Python warnings","Date":"Sun,  5 Apr 2026 05:11:50 -0600","Message-ID":"<20260405111206.945185-6-sjg@chromium.org>","X-Mailer":"git-send-email 2.43.0","In-Reply-To":"<20260405111206.945185-1-sjg@chromium.org>","References":"<20260405111206.945185-1-sjg@chromium.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.39","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<https://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>","X-Virus-Scanned":"clamav-milter 0.103.8 at phobos.denx.de","X-Virus-Status":"Clean"},"content":"Fix some warnings and disable one that cannot be fixed.\n\nSigned-off-by: Simon Glass <sjg@chromium.org>\n---\n\n(no changes since v1)\n\n test/py/tests/test_fit.py | 15 +++++++++------\n 1 file changed, 9 insertions(+), 6 deletions(-)","diff":"diff --git a/test/py/tests/test_fit.py b/test/py/tests/test_fit.py\nindex 9bfe25c0a51..6a8649792cf 100755\n--- a/test/py/tests/test_fit.py\n+++ b/test/py/tests/test_fit.py\n@@ -1,13 +1,14 @@\n # SPDX-License-Identifier:\tGPL-2.0+\n # Copyright (c) 2013, Google Inc.\n-#\n-# Sanity check of the FIT handling in U-Boot\n+\n+\"\"\"Sanity check of the FIT handling in U-Boot\"\"\"\n \n import os\n-import pytest\n import struct\n-import utils\n+\n+import pytest\n import fit_util\n+import utils\n \n # Define a base ITS which we can adjust using % and a dictionary\n base_its = '''\n@@ -160,8 +161,8 @@ def test_fit_base(ubman):\n         fname = make_fname(filename)\n         data = ''\n         for i in range(100):\n-            data += '%s %d was seldom used in the middle ages\\n' % (text, i)\n-        with open(fname, 'w') as fd:\n+            data += f'{text} {i} was seldom used in the middle ages\\n'\n+        with open(fname, 'w', encoding='ascii') as fd:\n             print(data, file=fd)\n         return fname\n \n@@ -202,6 +203,7 @@ def test_fit_base(ubman):\n                           'third_line:')\n         '30'\n         \"\"\"\n+        # pylint: disable=W0612\n         __tracebackhide__ = True\n         for line in '\\n'.join(text).splitlines():\n             pos = line.find(match)\n@@ -209,6 +211,7 @@ def test_fit_base(ubman):\n                 return line[:pos] + line[pos + len(match):]\n \n         pytest.fail(\"Expected '%s' but not found in output\")\n+        return '<no-match>'\n \n     def check_equal(expected_fname, actual_fname, failure_msg):\n         \"\"\"Check that a file matches its expected contents\n","prefixes":["v2","5/8"]}