{"id":2219906,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2219906/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/20260405111206.945185-3-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-3-sjg@chromium.org>","list_archive_url":null,"date":"2026-04-05T11:11:47","name":"[v2,2/8] test: fit: Avoid restarting U-Boot","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"d0d6ab449602f21f9e75924dcdc3ef0c88268fa5","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-3-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/2219906/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2219906/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=W3FuM86P;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; 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=\"W3FuM86P\";\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 [85.214.62.61])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fpVDT6Vn4z1yD3\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 05 Apr 2026 21:12:41 +1000 (AEST)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id B2DA883C5E;\n\tSun,  5 Apr 2026 13:12:30 +0200 (CEST)","by phobos.denx.de (Postfix, from userid 109)\n id C469884020; Sun,  5 Apr 2026 13:12:28 +0200 (CEST)","from mail-oi1-x236.google.com (mail-oi1-x236.google.com\n [IPv6:2607:f8b0:4864:20::236])\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 DC5C583C5E\n for <u-boot@lists.denx.de>; Sun,  5 Apr 2026 13:12:25 +0200 (CEST)","by mail-oi1-x236.google.com with SMTP id\n 5614622812f47-4704fb0d5b8so915814b6e.0\n for <u-boot@lists.denx.de>; Sun, 05 Apr 2026 04:12:25 -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.21\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sun, 05 Apr 2026 04:12:22 -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=1775387544; x=1775992344; 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=rJohr6U/rQ1BWdImYqelCwf68CJzOQHRgvLd10+2QfE=;\n b=W3FuM86PWiChVFG1yun+x/eNAY9ocbEwlNfuMv9o/F1U+DDgY7w1WN7J9w1itVkYQs\n wwTbxvwKuh9u2LNME8IoG9l59HqDlwhDc12w0ohnC0xQ1QiNiHgZEBkx0w69ijeFEXTQ\n liHCvAWYta2XvO4tdW9xAthsRWyyRkP/J4dDE=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775387544; x=1775992344;\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=rJohr6U/rQ1BWdImYqelCwf68CJzOQHRgvLd10+2QfE=;\n b=RfKfaLIRpXAbC74Yrpquet3U/5X1NnyMyFDw+VDDh8DX6MX6kDPltLVJZp+e6fxC0F\n zNgu+LadPdy+DcJ/mxFasbY2lqIOiNzw93Ryt3DIXYg7zLsC6GwJKZVB9y/gvwx/8CDs\n AK3RFz1gaCqSZgHH5B5Q4FIjvpLFux87rQok2p9NyhZGYpf8CCGck+xJjRRoWA2QkMZy\n VY6wq261tWwp+/8QmY3/JdpTMGytWcxobswVzaue7hxUOq79TnIgmRN4vL1I6Le2fSqB\n FtvxvTkkKRcsz5MAcghc21Jy2l0tDnqiqQHF3zO6rrJIjCpayI8CFWusfWKyHJvlyGWu\n KNeQ==","X-Gm-Message-State":"AOJu0YzpBgqDJjpomRWULscpdrdrVv7xo6iqQR+6ZOV/gDaNsbmCqp/q\n s3l7fvragDIDAFJTuhpZJkEyxsOBZ9wPz5f3fRmzvu6ZBOLmUuocPBX6Nzz8hAFwHRHuI/Drq0P\n 9VmH2MQ==","X-Gm-Gg":"AeBDieuivWalDx897dJhfZ14m77O4t7iWxPh8v6SXjEndhyEcuIrdvPntXRgoLj3/Yj\n p3EoC5hGMyd5XoNfT8Y5VBTnjk9fjn8SJZFniwWoEH5LTXFwIwF3ZvgaIYMh8hBz31dVUq+kPuO\n 1q9YOrfi/ZHJgL2eZaD/mv2vYoFvVuHR1ecd6+RZW8txd+Xpi2piJ3q0ft11JEoIycEZY9Yc20Z\n sFF5jw4O4OcEygwTCVG2/Wv7rCN1NwB7uz6eElZ/PZilkww0iWSI8N0r2WugPeL5XH2ip1+Ug1h\n cXQWB0Rct584g7C2+2BT/TniXZcC0mU1laQZcudGEMb9UPhkq3NFruQup+IA+ehqj+YHbBGVA0O\n XVge8vF2wbztr9K29RqfIT55x/5IuzVnfc1Un1/7aZ1/1Adx1GpiLnhxQKN2lK+M3OKjEc4mgqq\n l3i08kURN69RUs2/iPSw==","X-Received":"by 2002:a05:6808:4f69:b0:45e:fd68:3de7 with SMTP id\n 5614622812f47-46f03b34f79mr3965192b6e.24.1775387543990;\n Sun, 05 Apr 2026 04:12:23 -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 2/8] test: fit: Avoid restarting U-Boot","Date":"Sun,  5 Apr 2026 05:11:47 -0600","Message-ID":"<20260405111206.945185-3-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":"We don't actually need to use the test FDT as the control FDT. It slows\ndown the test since U-Boot needs to be restarted each time.\n\nInstead of restarting, update the test to clear memory before it loads\nthe FIT.\n\nRename the data-variable to fdt_data since is it no-longer the control\nFDT.\n\nSigned-off-by: Simon Glass <sjg@chromium.org>\n---\n\n(no changes since v1)\n\n test/py/tests/test_fit.py | 29 ++++++++---------------------\n 1 file changed, 8 insertions(+), 21 deletions(-)","diff":"diff --git a/test/py/tests/test_fit.py b/test/py/tests/test_fit.py\nindex 71c98be27cf..4a19bd5cb49 100755\n--- a/test/py/tests/test_fit.py\n+++ b/test/py/tests/test_fit.py\n@@ -104,6 +104,7 @@ base_fdt = '''\n # then run the 'bootm' command, then save out memory from the places where\n # we expect 'bootm' to write things. Then quit.\n base_script = '''\n+mw.b 0 0 160000\n host load hostfs 0 %(fit_addr)x %(fit)s\n fdt addr %(fit_addr)x\n bootm start %(fit_addr)x\n@@ -260,7 +261,7 @@ def test_fit(ubman):\n           - run code coverage to make sure we are testing all the code\n         \"\"\"\n         # Set up invariant files\n-        control_dtb = fit_util.make_dtb(ubman, base_fdt, 'u-boot')\n+        fdt_data = fit_util.make_dtb(ubman, base_fdt, 'u-boot')\n         kernel = fit_util.make_kernel(ubman, 'test-kernel.bin', 'kernel')\n         ramdisk = make_ramdisk('test-ramdisk.bin', 'ramdisk')\n         loadables1 = fit_util.make_kernel(ubman, 'test-loadables1.bin', 'lenrek')\n@@ -284,7 +285,7 @@ def test_fit(ubman):\n             'fdt' : fdt,\n             'fdt_out' : fdt_out,\n             'fdt_addr' : 0x80000,\n-            'fdt_size' : filesize(control_dtb),\n+            'fdt_size' : filesize(fdt_data),\n             'fdt_load' : '',\n \n             'ramdisk' : ramdisk,\n@@ -317,12 +318,10 @@ def test_fit(ubman):\n \n         # First check that we can load a kernel\n         # We could perhaps reduce duplication with some loss of readability\n-        ubman.config.dtb = control_dtb\n-        ubman.restart_uboot()\n         with ubman.log.section('Kernel load'):\n             output = ubman.run_command_list(cmd.splitlines())\n             check_equal(kernel, kernel_out, 'Kernel not loaded')\n-            check_not_equal(control_dtb, fdt_out,\n+            check_not_equal(fdt_data, fdt_out,\n                             'FDT loaded but should be ignored')\n             check_not_equal(ramdisk, ramdisk_out,\n                             'Ramdisk loaded but should not be')\n@@ -351,10 +350,9 @@ def test_fit(ubman):\n         with ubman.log.section('Kernel + FDT load'):\n             params['fdt_load'] = 'load = <%#x>;' % params['fdt_addr']\n             fit = fit_util.make_fit(ubman, mkimage, base_its, params)\n-            ubman.restart_uboot()\n             output = ubman.run_command_list(cmd.splitlines())\n             check_equal(kernel, kernel_out, 'Kernel not loaded')\n-            check_equal(control_dtb, fdt_out, 'FDT not loaded')\n+            check_equal(fdt_data, fdt_out, 'FDT not loaded')\n             check_not_equal(ramdisk, ramdisk_out,\n                             'Ramdisk loaded but should not be')\n \n@@ -363,7 +361,6 @@ def test_fit(ubman):\n             params['ramdisk_config'] = 'ramdisk = \"ramdisk-1\";'\n             params['ramdisk_load'] = 'load = <%#x>;' % params['ramdisk_addr']\n             fit = fit_util.make_fit(ubman, mkimage, base_its, params)\n-            ubman.restart_uboot()\n             output = ubman.run_command_list(cmd.splitlines())\n             check_equal(ramdisk, ramdisk_out, 'Ramdisk not loaded')\n \n@@ -375,7 +372,6 @@ def test_fit(ubman):\n             params['loadables2_load'] = ('load = <%#x>;' %\n                                          params['loadables2_addr'])\n             fit = fit_util.make_fit(ubman, mkimage, base_its, params)\n-            ubman.restart_uboot()\n             output = ubman.run_command_list(cmd.splitlines())\n             check_equal(loadables1, loadables1_out,\n                         'Loadables1 (kernel) not loaded')\n@@ -389,21 +385,12 @@ def test_fit(ubman):\n             params['fdt'] = make_compressed(fdt)\n             params['ramdisk'] = make_compressed(ramdisk)\n             fit = fit_util.make_fit(ubman, mkimage, base_its, params)\n-            ubman.restart_uboot()\n             output = ubman.run_command_list(cmd.splitlines())\n             check_equal(kernel, kernel_out, 'Kernel not loaded')\n-            check_equal(control_dtb, fdt_out, 'FDT not loaded')\n+            check_equal(fdt_data, fdt_out, 'FDT not loaded')\n             check_not_equal(ramdisk, ramdisk_out, 'Ramdisk got decompressed?')\n             check_equal(ramdisk + '.gz', ramdisk_out, 'Ramdist not loaded')\n \n \n-    # We need to use our own device tree file. Remember to restore it\n-    # afterwards.\n-    old_dtb = ubman.config.dtb\n-    try:\n-        mkimage = ubman.config.build_dir + '/tools/mkimage'\n-        run_fit_test(mkimage)\n-    finally:\n-        # Go back to the original U-Boot with the correct dtb.\n-        ubman.config.dtb = old_dtb\n-        ubman.restart_uboot()\n+    mkimage = ubman.config.build_dir + '/tools/mkimage'\n+    run_fit_test(mkimage)\n","prefixes":["v2","2/8"]}