From patchwork Mon Dec 29 21:43:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1108 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=1767044619; bh=JgZspr9QIXvt7SOq8CPXlvKV8o+O2LR0xJGbFBcZ9SA=; 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=H4Tp5XaobDA23dKMiF9Xuq2ZhP8CgO4m5Iom4a5cwQ/Vg0hWyWg3LkygvQoHJmVnr /GuHnTuQIzUcQ5i2cLm18I/Cp0ki7Pcne2yjdI27czKIKr/eNRLIiNfYGMrRDfq7XM v6SddCy2JCsrPuGu/Otm61Qh4cLQMjlzR+OHWzukIIEl3pLKiH2Pqi9gLK4ieeEGHE KFHl/JwRML4jDaSUlvamQoSMnxN+PvQ8LP3h+kyyqBGV9jFnGMth0YX0TctHg/PrK3 tMkrYJiWlLXWOPKagz74195TVKrr8xEODr3+MHOP7JqeHlKnnrC593eDRL5R6Ln5tk yXDu0dj2W5LUw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B8CF068F31 for ; Mon, 29 Dec 2025 14:43:39 -0700 (MST) 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 dpmHmr-Y3cOe for ; Mon, 29 Dec 2025 14:43:39 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767044619; bh=JgZspr9QIXvt7SOq8CPXlvKV8o+O2LR0xJGbFBcZ9SA=; 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=H4Tp5XaobDA23dKMiF9Xuq2ZhP8CgO4m5Iom4a5cwQ/Vg0hWyWg3LkygvQoHJmVnr /GuHnTuQIzUcQ5i2cLm18I/Cp0ki7Pcne2yjdI27czKIKr/eNRLIiNfYGMrRDfq7XM v6SddCy2JCsrPuGu/Otm61Qh4cLQMjlzR+OHWzukIIEl3pLKiH2Pqi9gLK4ieeEGHE KFHl/JwRML4jDaSUlvamQoSMnxN+PvQ8LP3h+kyyqBGV9jFnGMth0YX0TctHg/PrK3 tMkrYJiWlLXWOPKagz74195TVKrr8xEODr3+MHOP7JqeHlKnnrC593eDRL5R6Ln5tk yXDu0dj2W5LUw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A64C168BA9 for ; Mon, 29 Dec 2025 14:43:39 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767044617; bh=b5axrD+3sj7fhvemRoF+FzkRNmjgwNPtdKVfXBu00Nk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pccNZjUnWuYNhKW6Ro9qDA2bdB5UzYGOyurheZWmaaWRGaK4LxaSgwpEgXozFt7lt 0qbp/csyzG33t7ozl57lsgF91cqg3S2FgiuVcxHXtqvWHdFTBfV9KlbW3Fp78z11eD 1dXX0IAOhYQD0VXiCL/PJUnhbFPO8UNreNSOBSpCZC0LlXDqQ3w2NC3WtD36U2ucsb f+SrPpGR7uqW5QFSANVeq7FJjhXVM6DiFYxTAoRojdreMZS2qzki3Uap/LH7Sn0TXP 2JAzj3neZAW89jUkK9RPGit2P5UhqAH6RYp3chjT5e44uquHW3lplCDFn0Y+ZAYsyR GKVDrtNI5317Q== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 559BC68B7A; Mon, 29 Dec 2025 14:43:37 -0700 (MST) 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 gZwUwtP8pFEm; Mon, 29 Dec 2025 14:43:37 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767044613; bh=KaX9FfRxNNDRsj4KAQIQ3H+j0UOB5TfEM1qdYR+1KJM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jery8q+HRvAgOR3jF3MRSneJvXX+muoECKrJchvHdFwyT8lPTGq7b6F/Sm5vWJCb8 NHYl7VuAQuQy/REbfRfZiJqmSNvgtNUf9DKf98i4+FkcA6zSF5jR+PIwdhz6r58/QV HAZ6yXPKWpgA41Ax3tH1+abb60FVJmQ4o1qijejbfel0HEnzACKVFKTm8glNR4+vgQ XxbJ2o3kq42f7i9xoc0EHILXzGmf40lVj40wO0pF3N8c8QeK0620v4EUpBLfiTSREs nmw/6IMI24FIycKhnMFCemaliem6ngySSbUpoaFxeeDoquZjcd41oBp1jO1RVj2eSK tcTmgVJx01SiA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 08D6664C8A; Mon, 29 Dec 2025 14:43:32 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Mon, 29 Dec 2025 14:43:16 -0700 Message-ID: <20251229214319.237565-2-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251229214319.237565-1-sjg@u-boot.org> References: <20251229214319.237565-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 7SQFZKR2LNYBTADRKRUTX6CRYY56PSS7 X-Message-ID-Hash: 7SQFZKR2LNYBTADRKRUTX6CRYY56PSS7 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 , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 1/2] test: py: Use run_ut() helper for ext4l tests 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 Convert test_ext4l.py to use the run_ut() helper instead of manually building the ut command and checking for failures. This reduces duplication and makes the tests more concise. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- test/py/tests/test_fs/test_ext4l.py | 40 ++++++++--------------------- 1 file changed, 10 insertions(+), 30 deletions(-) diff --git a/test/py/tests/test_fs/test_ext4l.py b/test/py/tests/test_fs/test_ext4l.py index 3287f59fbe5..25d09dca889 100644 --- a/test/py/tests/test_fs/test_ext4l.py +++ b/test/py/tests/test_fs/test_ext4l.py @@ -72,69 +72,49 @@ class TestExt4l: def test_probe(self, ubman, ext4_image): """Test that ext4l can probe an ext4 filesystem.""" with ubman.log.section('Test ext4l probe'): - output = ubman.run_command( - f'ut -f fs fs_test_ext4l_probe_norun fs_image={ext4_image}') - assert 'failures: 0' in output + ubman.run_ut('fs', 'fs_test_ext4l_probe', fs_image=ext4_image) def test_msgs(self, ubman, ext4_image): """Test that ext4l_msgs env var produces mount messages.""" with ubman.log.section('Test ext4l msgs'): - output = ubman.run_command( - f'ut -f fs fs_test_ext4l_msgs_norun fs_image={ext4_image}') - assert 'failures: 0' in output + ubman.run_ut('fs', 'fs_test_ext4l_msgs', fs_image=ext4_image) def test_ls(self, ubman, ext4_image): """Test that ext4l can list directory contents.""" with ubman.log.section('Test ext4l ls'): - output = ubman.run_command( - f'ut -f fs fs_test_ext4l_ls_norun fs_image={ext4_image}') - assert 'failures: 0' in output + ubman.run_ut('fs', 'fs_test_ext4l_ls', fs_image=ext4_image) def test_opendir(self, ubman, ext4_image): """Test that ext4l can iterate directory entries.""" with ubman.log.section('Test ext4l opendir'): - output = ubman.run_command( - f'ut -f fs fs_test_ext4l_opendir_norun fs_image={ext4_image}') - assert 'failures: 0' in output + ubman.run_ut('fs', 'fs_test_ext4l_opendir', fs_image=ext4_image) def test_exists(self, ubman, ext4_image): """Test that ext4l_exists reports file existence correctly.""" with ubman.log.section('Test ext4l exists'): - output = ubman.run_command( - f'ut -f fs fs_test_ext4l_exists_norun fs_image={ext4_image}') - assert 'failures: 0' in output + ubman.run_ut('fs', 'fs_test_ext4l_exists', fs_image=ext4_image) def test_size(self, ubman, ext4_image): """Test that ext4l_size reports file size correctly.""" with ubman.log.section('Test ext4l size'): - output = ubman.run_command( - f'ut -f fs fs_test_ext4l_size_norun fs_image={ext4_image}') - assert 'failures: 0' in output + ubman.run_ut('fs', 'fs_test_ext4l_size', fs_image=ext4_image) def test_read(self, ubman, ext4_image): """Test that ext4l can read file contents.""" with ubman.log.section('Test ext4l read'): - output = ubman.run_command( - f'ut -f fs fs_test_ext4l_read_norun fs_image={ext4_image}') - assert 'failures: 0' in output + ubman.run_ut('fs', 'fs_test_ext4l_read', fs_image=ext4_image) def test_uuid(self, ubman, ext4_image): """Test that ext4l can return the filesystem UUID.""" with ubman.log.section('Test ext4l uuid'): - output = ubman.run_command( - f'ut -f fs fs_test_ext4l_uuid_norun fs_image={ext4_image}') - assert 'failures: 0' in output + ubman.run_ut('fs', 'fs_test_ext4l_uuid', fs_image=ext4_image) def test_statfs(self, ubman, ext4_image): """Test that ext4l can return filesystem statistics.""" with ubman.log.section('Test ext4l statfs'): - output = ubman.run_command( - f'ut -f fs fs_test_ext4l_statfs_norun fs_image={ext4_image}') - assert 'failures: 0' in output + ubman.run_ut('fs', 'fs_test_ext4l_statfs', fs_image=ext4_image) def test_fsinfo(self, ubman, ext4_image): """Test that fsinfo command displays filesystem statistics.""" with ubman.log.section('Test ext4l fsinfo'): - output = ubman.run_command( - f'ut -f fs fs_test_ext4l_fsinfo_norun fs_image={ext4_image}') - assert 'failures: 0' in output + ubman.run_ut('fs', 'fs_test_ext4l_fsinfo', fs_image=ext4_image)