From patchwork Wed Sep 10 09:54: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: 282 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=1757498055; bh=JBN/hRmF+8cyqEv7L2euc+ZmTM+DQduEBjlJwQ81mco=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=rBU9FHN7AXNypY3rxKKfEI6AYUMdSrQ9u/gkrRd6IXxiatTqHADAXsSTVfehUWGqk cOQ97tNcsEOFCRq6xWU4gFHrUAP/glh2duDFaiDgzcLCCiWvKRYEVOzoR1ZJ95TvFe spf0hJR0eR1YUWRRRA0XeRz4i82lpNWuK7T8Mpi4ZwpsexvikL1hLUlACSDQf5F3/w DK8V3deiCv8YGHyP+k+vBHED+R38J6eVEY26shMlqGeHFp8jWpad3z9zzzEuZPwOBn kWO1dFB+pQSL0IPbTS/0QFU523+Mp/DqATatzkxLApi0GARtvjGxDiJwXjTMY5mSPq pYUeM6mefAfRQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8886367A22 for ; Wed, 10 Sep 2025 03:54:15 -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 e8nOpDcnsLGI for ; Wed, 10 Sep 2025 03:54:15 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757498055; bh=JBN/hRmF+8cyqEv7L2euc+ZmTM+DQduEBjlJwQ81mco=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=rBU9FHN7AXNypY3rxKKfEI6AYUMdSrQ9u/gkrRd6IXxiatTqHADAXsSTVfehUWGqk cOQ97tNcsEOFCRq6xWU4gFHrUAP/glh2duDFaiDgzcLCCiWvKRYEVOzoR1ZJ95TvFe spf0hJR0eR1YUWRRRA0XeRz4i82lpNWuK7T8Mpi4ZwpsexvikL1hLUlACSDQf5F3/w DK8V3deiCv8YGHyP+k+vBHED+R38J6eVEY26shMlqGeHFp8jWpad3z9zzzEuZPwOBn kWO1dFB+pQSL0IPbTS/0QFU523+Mp/DqATatzkxLApi0GARtvjGxDiJwXjTMY5mSPq pYUeM6mefAfRQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 763DA67953 for ; Wed, 10 Sep 2025 03:54:15 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757498053; bh=i1wX32zjF9h/rxr6orvTOCsCorKa0lZZHnio9gorBsE=; h=From:To:Cc:Subject:Date:From; b=szie0Vhn3adZi8VwZxpXl5NzoAzrG01mzwi3120O9HMGZOYn7/PfH3WYQyR7iFSoI 0t5J6PbNGohtCFwNa/6sWn1q1djGk7BFPvmLSl3QZUlabcqLNCf1VcyWqVpxR/55L+ 8Qut3+PfMlQeCNxwKqr8R7PK4uGTvKl4ZLYfbTtsKBGzMJ9G9bFS/KisD5UrG/8WzI PQZ7uErzHuBceR8o0q8UBkvbhZb9i9LJByrsekyQjeKEF+HaDT6LLmczCmQdeNovD9 HS0XaeOo5K/AUJKm8BuvJGqUDZ66dw3MsyciRcBzkYnHmA5nyCkzWkTnbQ12bRxoY9 wN26+5ND7PtMg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id AE2C75FFD6; Wed, 10 Sep 2025 03:54:13 -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 KF0faXnDcRQH; Wed, 10 Sep 2025 03:54:13 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757498049; bh=tMliwCboJC7tYbfMTKaR5irqZ4I5qefoxh5YfJfNuL8=; h=From:To:Cc:Subject:Date:From; b=wjrBnBhmizM3pM6s87Hz0catAzNekEBIGNCQ+zfMJFP03NTD3CsZ5MKu5lOVrF8xY S0GKPsUSnUR9aTpfDDZhWcdJTZY8nySjpM0BOw/5KLBQ9d2MWdm3ZjPgg2lMNl7mHr JAB2EPZ6TQ55MHhSjhuPN9tJLDMIsSC5Wndua3doT5TD9TCiduOB+aAambZ2O8MFNN mh4l2XB5PPMZO+k071ixWJvAkMF3OzfYfuwucx2wz0FGTweofU/jaVX0KYVF8tNGLZ Qt3kJMb2EzrMiPrB5N66bgPu0MCR44SJ7V6vTDdG9R037vvaLH78i5ajc1jedBRtAQ oGve3jcAmnDhA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 8AA5B67953; Wed, 10 Sep 2025 03:54:09 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Wed, 10 Sep 2025 03:54:02 -0600 Message-ID: <20250910095404.4024784-1-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: 4EKKGP7KKIKFSX36NUD6MSCH7W5CMHDE X-Message-ID-Hash: 4EKKGP7KKIKFSX36NUD6MSCH7W5CMHDE 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] u_boot_pylib: Rename missing_list to missing_set 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 The 'required' argument is a set so it is confusing to assign it to a variable called 'missing_list'. Rename it to 'missing'. Also document what happens if the parameter is None. Signed-off-by: Simon Glass Suggested-by: Heinrich Schuchardt --- tools/u_boot_pylib/test_util.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tools/u_boot_pylib/test_util.py b/tools/u_boot_pylib/test_util.py index 7bd12705557..f0cf8ba2f93 100644 --- a/tools/u_boot_pylib/test_util.py +++ b/tools/u_boot_pylib/test_util.py @@ -36,7 +36,8 @@ def run_test_coverage(prog, filter_fname, exclude_list, build_dir, exclude_list: List of file patterns to exclude from the coverage calculation build_dir: Build directory, used to locate libfdt.py - required: Set of modules which must be in the coverage report + required (set of str): Set of modules which must be in the coverage + report. If None, then missing tests are not reported extra_args (str): Extra arguments to pass to the tool before the -t/test arg single_thread (str): Argument string to make the tests run @@ -78,11 +79,11 @@ def run_test_coverage(prog, filter_fname, exclude_list, build_dir, # Convert '/path/to/name.py' just the module name 'name' test_set = set([os.path.splitext(os.path.basename(line.split()[0]))[0] for line in lines if '/etype/' in line]) - missing_list = required - missing_list.discard('__init__') - missing_list.difference_update(test_set) - if missing_list: - print('Missing tests for %s' % (', '.join(missing_list))) + missing = required + missing.discard('__init__') + missing.difference_update(test_set) + if missing: + print('Missing tests for %s' % (', '.join(missing))) print(stdout) ok = False