{"id":2175367,"url":"http://patchwork.ozlabs.org/api/1.0/patches/2175367/?format=json","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/1.0/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},"msgid":"<20251217-a-few-test-py-improvements-v2-1-e1f91e3bf551@baylibre.com>","date":"2025-12-17T18:42:09","name":"[v2,1/3] test.py: check ubconfig exists before using it","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"95a8926f965a077f026def15fdd0f8102b4c4e00","submitter":{"id":87228,"url":"http://patchwork.ozlabs.org/api/1.0/people/87228/?format=json","name":"David Lechner","email":"dlechner@baylibre.com"},"delegate":{"id":3651,"url":"http://patchwork.ozlabs.org/api/1.0/users/3651/?format=json","username":"trini","first_name":"Tom","last_name":"Rini","email":"trini@ti.com"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/20251217-a-few-test-py-improvements-v2-1-e1f91e3bf551@baylibre.com/mbox/","series":[{"id":485760,"url":"http://patchwork.ozlabs.org/api/1.0/series/485760/?format=json","date":"2025-12-17T18:42:08","name":"a few test.py improvements","version":2,"mbox":"http://patchwork.ozlabs.org/series/485760/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2175367/checks/","tags":{},"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 (2048-bit key;\n unprotected) header.d=baylibre-com.20230601.gappssmtp.com\n header.i=@baylibre-com.20230601.gappssmtp.com header.a=rsa-sha256\n header.s=20230601 header.b=W9R0boay;\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=none (p=none dis=none) header.from=baylibre.com","phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de","phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=baylibre-com.20230601.gappssmtp.com\n header.i=@baylibre-com.20230601.gappssmtp.com header.b=\"W9R0boay\";\n\tdkim-atps=neutral","phobos.denx.de;\n dmarc=none (p=none dis=none) header.from=baylibre.com","phobos.denx.de;\n spf=pass smtp.mailfrom=dlechner@baylibre.com"],"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 4dWlGx0cgMz1xpw\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 18 Dec 2025 07:08:25 +1100 (AEDT)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id D99FC83C0C;\n\tWed, 17 Dec 2025 21:08:14 +0100 (CET)","by phobos.denx.de (Postfix, from userid 109)\n id 0031E83B49; Wed, 17 Dec 2025 19:43:14 +0100 (CET)","from mail-oi1-x233.google.com (mail-oi1-x233.google.com\n [IPv6:2607:f8b0:4864:20::233])\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 BDD4483B55\n for <u-boot@lists.denx.de>; Wed, 17 Dec 2025 19:43:12 +0100 (CET)","by mail-oi1-x233.google.com with SMTP id\n 5614622812f47-44fe6771b2dso1530369b6e.1\n for <u-boot@lists.denx.de>; Wed, 17 Dec 2025 10:43:12 -0800 (PST)","from [127.0.1.1] ([2600:8803:e7e4:500:11a:676d:852f:9349])\n by smtp.gmail.com with ESMTPSA id\n 586e51a60fabf-3fa18021a81sm91782fac.20.2025.12.17.10.43.10\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 17 Dec 2025 10:43:10 -0800 (PST)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,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=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1765996991;\n x=1766601791;\n darn=lists.denx.de;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:from:to:cc:subject:date:message-id\n :reply-to; bh=MxCSejA2VlXDaJWDiYw9OpE98IcuilOgAK/0AS2wwr8=;\n b=W9R0boayI4iygdZonPfR/dYuUgsRWm3VrClvERT80B2VlfCRamY0QAeQ6XakKTQAG3\n iGPH/0L4aDmEcgc/XF4YVal4Alw9fHvYUNBmQ6tnekkvNqHMlU3qKn5RG3fmfYSXx3Tp\n 4Ouo7MIM6jcnsrxxoHUd3ZU/OVXrRoSb5/YKl6jFg2AjYU/s4TyWJzbvHFOb8ZDANfqC\n TZkPHPxOvj8t6VQyu4St3g3jefT5UeFSzczHrYZk4pS2zP7KM527lKe4dnbPmd6pC1Xc\n VPcLXSBMMpLn1AZ8d3CbtQb0v3Ts4WrxZ95JOWxugmGrMH6J9aqHD5X9jtEO570A8O5B\n F3bA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1765996991; x=1766601791;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to\n :cc:subject:date:message-id:reply-to;\n bh=MxCSejA2VlXDaJW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aecuZ4cMTILkpgc8ww3BZnV7j6hcm6U7TTyf6GqP8RkONTl\n pUG+pl99MBWvzwvQ==","X-Google-Smtp-Source":"\n AGHT+IFlu4grOp28zXZjfi4YfdWybV5H8NmGbvMeekii+Xjoy186t0aSp1sIb25M1SSRxObpJjpOSA==","X-Received":"by 2002:a05:6808:3509:b0:450:c8c3:7106 with SMTP id\n 5614622812f47-455ac7f6d52mr8180277b6e.9.1765996991365;\n Wed, 17 Dec 2025 10:43:11 -0800 (PST)","From":"David Lechner <dlechner@baylibre.com>","Date":"Wed, 17 Dec 2025 12:42:09 -0600","Subject":"[PATCH v2 1/3] test.py: check ubconfig exists before using it","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"7bit","Message-Id":"\n <20251217-a-few-test-py-improvements-v2-1-e1f91e3bf551@baylibre.com>","References":"\n <20251217-a-few-test-py-improvements-v2-0-e1f91e3bf551@baylibre.com>","In-Reply-To":"\n <20251217-a-few-test-py-improvements-v2-0-e1f91e3bf551@baylibre.com>","To":"Tom Rini <trini@konsulko.com>","Cc":"Marek Vasut <marex@denx.de>, Simon Glass <sjg@chromium.org>,\n Mattijs Korpershoek <mkorpershoek@kernel.org>,\n Jerome Forissier <jerome.forissier@linaro.org>,\n Heinrich Schuchardt <xypron.glpk@gmx.de>,\n Julien Stephan <jstephan@baylibre.com>, u-boot@lists.denx.de,\n David Lechner <dlechner@baylibre.com>","X-Mailer":"b4 0.14.3","X-Developer-Signature":"v=1; a=openpgp-sha256; l=1825; i=dlechner@baylibre.com;\n h=from:subject:message-id;\n bh=bJhkvNHeJn+tdEbGjyJnKtBIMtQhBV9WMm/YO+F+35w=;\n b=owEBhAF7/pANAwAKAcLMIAH/AY/AAcsmYgBpQvmnMao+WII+1Q7yFlF+sxOBVaWPu/QgjS2Vi\n 2NYafD7fDmJAUoEAAEKADQWIQTsGNmeYg6D1pzYaJjCzCAB/wGPwAUCaUL5pxYcZGxlY2huZXJA\n YmF5bGlicmUuY29tAAoJEMLMIAH/AY/AUNgH/0rRL7NG91gwXKePDAqh6G0kRO1qfSvX5SLRIMw\n SH7LbRa5iEti5j1A0Hug4/ucS2ytOYnVhQEED9xLF+OPVtqUyqNMrCZo55xR75rdspadAJDuNjP\n gGZkCY2AbFWDnL4ljM89s1qeN2kwkte2jEy30O2hl47dlmm8+TabtvDdwT4uJ61zeGeR0aeYFcf\n P1IBnLhbEKgJw4aWPWEBcXvh/dOrV/GoWx5fc5woL2OvSzbEIx3rfORbMYYsdStRZFUA9LWJdkN\n HpfTH8Tj1FUhtfqGkJ4msKbYih8Kh6f3cBeEBXfI6ihdTQidttMlAQbKHHY2hC0VmjstawP/B3K\n GYFc=","X-Developer-Key":"i=dlechner@baylibre.com; a=openpgp;\n fpr=8A73D82A6A1F509907F373881F8AF88C82F77C03","X-Mailman-Approved-At":"Wed, 17 Dec 2025 21:08:13 +0100","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":"Set ubconfig to None and add a check in the show_timings() function of\ntest/py/test.py to ensure that the global ubconfig variable was actually\ninitialized before access attributes.\n\nIf tests fail early, e.g. because --build failed, ubconfig may not have\nbeen initialized yet and results in an exception in an atexit handler.\nAdding this check avoids unnecessary noise in the output.\n\n    Exception ignored in atexit callback: <function cleanup at 0x7de475ea6b60>\n    Traceback (most recent call last):\n    File \"u-boot/test/py/conftest.py\", line 669, in cleanup\n        show_timings()\n    File \"u-boot/test/py/conftest.py\", line 616, in show_timings\n        if ubconfig.timing:\n        ^^^^^^^^\n    NameError: name 'ubconfig' is not defined\n\nSigned-off-by: David Lechner <dlechner@baylibre.com>\n---\nv2 changes:\n- Set to None and check for not None instead of using 'in globals()'\n---\n test/py/conftest.py | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)","diff":"diff --git a/test/py/conftest.py b/test/py/conftest.py\nindex 8ce680a92a0..5689fcd0349 100644\n--- a/test/py/conftest.py\n+++ b/test/py/conftest.py\n@@ -28,9 +28,10 @@ import sys\n from spawn import BootFail, Timeout, Unexpected, handle_exception\n import time\n \n-# Globals: The HTML log file, and the top-level fixture\n+# Globals: The HTML log file, the top-level fixture and the config container\n log = None\n ubman_fix = None\n+ubconfig = None\n \n TEST_PY_DIR = os.path.dirname(os.path.abspath(__file__))\n \n@@ -613,7 +614,7 @@ def show_timings():\n         if too_long:\n             show_bar(f'>{get_time_delta(max_dur)}', too_long_msecs, too_long)\n         log.info(buf.getvalue())\n-    if ubconfig.timing:\n+    if ubconfig is not None and ubconfig.timing:\n         print(buf.getvalue(), end='')\n \n \n","prefixes":["v2","1/3"]}