From patchwork Fri Jul 11 16:53:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jonas Mark (BT-FS/ENG1-Mue)" X-Patchwork-Id: 66644 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9308DC83F1A for ; Fri, 11 Jul 2025 16:54:39 +0000 (UTC) Received: from AS8PR04CU009.outbound.protection.outlook.com (AS8PR04CU009.outbound.protection.outlook.com [52.101.70.63]) by mx.groups.io with SMTP id smtpd.web11.18748.1752252870477150278 for ; Fri, 11 Jul 2025 09:54:30 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@de.bosch.com header.s=selector2 header.b=annAM/ZF; spf=pass (domain: de.bosch.com, ip: 52.101.70.63, mailfrom: mark.jonas@de.bosch.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tXQ/Yw9kj8KtY5ge944bo/QD7fZWzYKq5jU9H9wZbSRcHn06AFVD+NFY9jSwtIXcgvP+VaYPyMH1Pl6K/KDdQBDoRguEAe+LeD9Vqv+K1RjfJWhPm/9KBBKbUWvPhVcDStgwuz4bPSqbiPyFgzRWBc3xs6ASUmEWtNoaH1UwrCWguWoRinpsnXud57RPJGfXlLCk3n8whhaNMyOCPt/MMdyFiLEq3Qhhne/ftavgZf63FtSDxG/frYN1TQ7Bjd3w+2Sx/24AZJM+t5uFUkd4TgvVyN2snsRav78xo+V2LMluW98ydyFOWl0SVrnYaA1W5uL3QWmJUHdZhLkmk+MS+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fouxwQZ9toBQMWkGNsniIgSadO0bwcCsih26Rmb43AQ=; b=SOIS6gJ9ZR/4gYOa8Tv72tD5q6kX3f2NCV7RiShIhwgFIkPb+zXXJ67rVF/P2mxw7bGpRKibuOMFoOi4DLSIX/vv81lqC42585KAQWXTqk8x1iy1s/1bGQE1FARTlAzQ9jFLuMFW1aVqVoivy3pSYyvhC8SEx0f7DSrwaAFsQkgXobZf3pzi/LMMOEumXQIdjTjCqKeFxjDp3+eMJ3rEry/oxViSxWBHq2YyvsZuISJL+Za6eCiXXLKOsikcTzUYqx68zNaGyqjki7A9daWKOOugRr1mgY9t3S0264VUJbidFIvksOlpq6GgHicAvWs4mAoRyTHaNoHoqJMFajBMYg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 139.15.153.205) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=de.bosch.com; dmarc=pass (p=reject sp=none pct=100) action=none header.from=de.bosch.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=de.bosch.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fouxwQZ9toBQMWkGNsniIgSadO0bwcCsih26Rmb43AQ=; b=annAM/ZF/Etw2pmcbL3dgUUNnNmwVBmLwuUlGYRufAJvTCWjH+/DqEJxXSltLhxb11Qj6PAP+9QcfkTQWRWQdZ822g7jb9hsdGZfD6oQF76YlTStKef0Li6+9SM80cfsN6A4QfFztOKMXHNmsXR3TtoPz6r8zsXDLG2BL9JYggi6pjZn8RNK2vLTkhGso/Rjx6Jl1sd6BPTAAiUgkvr1Z6efOWkcuFpzWpeRFuyTiIfOWJVWZWO3hHNR2t/Tu228WJ8idvQC9ifcO4HdPUfoTtKivS1DC1o0+a4pQOopNeR4TeOkXHpkPAuZzJB3OTMDYQPsieiFQE7kkRalj27Tvg== Received: from AS9PR01CA0046.eurprd01.prod.exchangelabs.com (2603:10a6:20b:542::24) by AS2PR10MB7069.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:597::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8857.25; Fri, 11 Jul 2025 16:54:26 +0000 Received: from AMS0EPF000001AA.eurprd05.prod.outlook.com (2603:10a6:20b:542:cafe::6e) by AS9PR01CA0046.outlook.office365.com (2603:10a6:20b:542::24) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8922.25 via Frontend Transport; Fri, 11 Jul 2025 16:54:53 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 139.15.153.205) smtp.mailfrom=de.bosch.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=de.bosch.com; Received-SPF: Pass (protection.outlook.com: domain of de.bosch.com designates 139.15.153.205 as permitted sender) receiver=protection.outlook.com; client-ip=139.15.153.205; helo=eop.bosch-org.com; pr=C Received: from eop.bosch-org.com (139.15.153.205) by AMS0EPF000001AA.mail.protection.outlook.com (10.167.16.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8922.22 via Frontend Transport; Fri, 11 Jul 2025 16:54:25 +0000 Received: from SI-EXCAS2001.de.bosch.com (10.139.217.202) by eop.bosch-org.com (139.15.153.205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.26; Fri, 11 Jul 2025 18:54:25 +0200 Received: from RNGMBX3003.de.bosch.com (10.124.11.208) by SI-EXCAS2001.de.bosch.com (10.139.217.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.57; Fri, 11 Jul 2025 18:54:25 +0200 Received: from GRB-C-0009M.ot.de.bosch.com (10.22.69.188) by smtp.app.bosch.com (10.124.11.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.26; Fri, 11 Jul 2025 18:54:24 +0200 From: To: CC: , , , Ricardo Simoes , Mark Jonas Subject: [PATCH v2] dosfstools: Add ptests Date: Fri, 11 Jul 2025 18:53:44 +0200 Message-ID: <20250711165344.15438-1-mark.jonas@de.bosch.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.22.69.188] X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS0EPF000001AA:EE_|AS2PR10MB7069:EE_ X-MS-Office365-Filtering-Correlation-Id: e224d79b-4e42-43a6-2731-08ddc09b97f9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: +XPQYhVLF3eR6MMRkXLKgVb2veFL4x+IQ3oMKiWbaLVtoD6Sb+913aq1sHMr+5UgO9zWxX0+XXvAE7ae97y0yQqbbGkzKTrrg21o7uHuWviMaW1qUpk3Tfa/Muim8FGUBAQuyADM9eI08rDd/LPbdLRO/mhtwsQo4qobnSntXeU9468QpFFj1OgnNVkGghgFT4BYRaP3crii868N39NZOy1dGrYJmSW+OyxCAFKzyj39Q0oGRCKZlUmQwrkgqM3wpw2hiBiXcqZCCtiWfdRQN+Ii9hiyx7eE+3wTzhN23QnOMIZ3jCTBAgq+sYsu0AFc3Uhvn8Ea8/J893i9HY6h2PFvs6qciTl1CjCIfojxys3Y88mGozExifMJCfNGAPcB0UGMbe5UFGgPfnw7zEC8zTaNMY791hvzdLipBInKnrcchZGQSHQ8AqLZu+Bjr3C1G7yAw7ssm8wbGkBnUrDm446y8H8w1OtXISxJUGGc6FE6qXqVqO0ArH2QAN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IPV:NLI;SFV:NSPM;H:eop.bosch-org.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(376014)(82310400026)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: de.bosch.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2025 16:54:25.7954 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e224d79b-4e42-43a6-2731-08ddc09b97f9 X-MS-Exchange-CrossTenant-Id: 0ae51e19-07c8-4e4b-bb6d-648ee58410f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=0ae51e19-07c8-4e4b-bb6d-648ee58410f4;Ip=[139.15.153.205];Helo=[eop.bosch-org.com] X-MS-Exchange-CrossTenant-AuthSource: AMS0EPF000001AA.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR10MB7069 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 11 Jul 2025 16:54:39 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/220162 From: Ricardo Simoes Signed-off-by: Ricardo Simoes Signed-off-by: Mark Jonas --- v1 -> v2: - Add missing RDEPENDS of ptest - Link tools to /usr/sbin instead of /sbin .../distro/include/ptest-packagelists.inc | 1 + .../dosfstools/dosfstools_4.2.bb | 30 ++++++++++++++++++- .../dosfstools/files/run-ptest | 5 ++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/dosfstools/files/run-ptest diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 4253c7b062..46c8945eb4 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc @@ -99,6 +99,7 @@ PTESTS_SLOW = "\ coreutils \ curl \ dbus \ + dosfstools \ e2fsprogs \ elfutils \ gettext \ diff --git a/meta/recipes-devtools/dosfstools/dosfstools_4.2.bb b/meta/recipes-devtools/dosfstools/dosfstools_4.2.bb index 86fb68f664..0772f39381 100644 --- a/meta/recipes-devtools/dosfstools/dosfstools_4.2.bb +++ b/meta/recipes-devtools/dosfstools/dosfstools_4.2.bb @@ -10,18 +10,46 @@ LICENSE = "GPL-3.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BP}.tar.gz \ + file://run-ptest \ file://source-date-epoch.patch \ file://0001-fsck.fat-Adhere-to-the-fsck-exit-codes.patch \ file://0002-manpages-Document-fsck.fat-new-exit-codes.patch \ " SRC_URI[sha256sum] = "64926eebf90092dca21b14259a5301b7b98e7b1943e8a201c7d726084809b527" -inherit autotools gettext pkgconfig update-alternatives github-releases +inherit autotools gettext pkgconfig ptest update-alternatives github-releases EXTRA_OECONF = "--enable-compat-symlinks --without-iconv" CFLAGS += "-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" +do_install_ptest () { + mkdir -p ${D}${PTEST_PATH}/tests + install -m 0744 ${S}/tests/* ${D}${PTEST_PATH}/tests/ + install -m 0744 ${S}/test-driver ${D}${PTEST_PATH}/tests/ + + mkdir -p ${D}${PTEST_PATH}/src + ln -sf /usr/sbin/mkfs.fat ${D}${PTEST_PATH}/src/mkfs.fat + ln -sf /usr/sbin/fsck.fat ${D}${PTEST_PATH}/src/fsck.fat + ln -sf /usr/sbin/fatlabel ${D}${PTEST_PATH}/src/fatlabel + + # dosfstools tests depends on variables defined in the tests/Makefile. + # To run the tests, we need to modify the following: + # - srcdir: used to find the test scripts for each dosfstools tools + # - top_srcdir: used to find the test-driver script + # - Makefile: originally used to recreate build rules when needed. They're not needed here + # because we only want to run the tests. + # - XXD_FOUND: Always satisfied by RDEPENDS of ptest package + sed \ + -e 's/^srcdir = ..*/srcdir = \./' \ + -e 's/^top_srcdir = ..*/top_srcdir = \./' \ + -e 's/^Makefile: ..*/Makefile: /' \ + -e 's/XXD_FOUND=/XXD_FOUND=yes/' \ + ${B}/tests/Makefile > ${D}${PTEST_PATH}/tests/Makefile +} + +RDEPENDS:${PN}-ptest += "bash diffutils gawk make xxd" + BBCLASSEXTEND = "native nativesdk" ALTERNATIVE_PRIORITY = "100" diff --git a/meta/recipes-devtools/dosfstools/files/run-ptest b/meta/recipes-devtools/dosfstools/files/run-ptest new file mode 100644 index 0000000000..4f6e349a23 --- /dev/null +++ b/meta/recipes-devtools/dosfstools/files/run-ptest @@ -0,0 +1,5 @@ +#!/bin/sh + +cd tests + +make check