Skip to contentSkip to conversation

util-linux: Delete md-raid tests

PATCH In review Khem Raj 3 participants 3 messages Dec 14, 2023 – Dec 15, 2023

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 util-linux: Delete md-raid tests

These tests are marked as known failures upstream as well [1] if we delete them then we can drop dependency on mdadm for ptests which can further reduce the dependency chain for ptest enabled minimal images

[1] https://github.com/util-linux/util-linux/commit/7519c3edab120b14623931d5ddb16fdc6e7cad5d

---
 meta/recipes-core/util-linux/util-linux_2.39.2.bb | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
meta/recipes-core/util-linux/util-linux_2.39.2.bb +7 -1
index 927037a3429..8c081674017 100644
@@ -137,7 +137,7 @@ RDEPENDS:${PN}-dev += " util-linux-libuuid-dev"
 RPROVIDES:${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev"
 
 RDEPENDS:${PN}-bash-completion += "${PN}-lsblk"
-RDEPENDS:${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs findutils grep iproute2 kmod mdadm procps sed socat which xz"
+RDEPENDS:${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs findutils grep iproute2 kmod procps sed socat which xz"
 RRECOMMENDS:${PN}-ptest += "kernel-module-scsi-debug kernel-module-sd-mod kernel-module-loop kernel-module-algif-hash"
 RDEPENDS:${PN}-swaponoff = "${PN}-swapon ${PN}-swapoff"
 ALLOW_EMPTY:${PN}-swaponoff = "1"
@@ -320,6 +320,12 @@ do_install_ptest() {
     if ! ${@bb.utils.contains('PACKAGECONFIG', 'pam', 'true', 'false', d)}; then
         rm -rf ${D}${PTEST_PATH}/tests/ts/chfn
     fi
+    # remove raid tests, known failures and avoid dependency on mdadm therefore
+    # See https://github.com/util-linux/util-linux/commit/7519c3edab120b14623931d5ddb16fdc6e7cad5d
+    rm -rf ${D}${PTEST_PATH}/tests/ts/blkid/md-raid0-whole
+    rm -rf ${D}${PTEST_PATH}/tests/ts/blkid/md-raid1-part
+    rm -rf ${D}${PTEST_PATH}/tests/ts/blkid/md-raid1-whole
+    rm -rf ${D}${PTEST_PATH}/tests/ts/fdisk/align-512-4K-md
 }
 
 # Delete tests not working on musl
Signature · 1 line
2.43.0
#1 lore raw
Quoted 28 lines · Khem Raj

These tests are marked as known failures upstream as well [1] if we delete them then we can drop dependency on mdadm for ptests which can further reduce the dependency chain for ptest enabled minimal images

[1] https://github.com/util-linux/util-linux/commit/7519c3edab120b14623931d5ddb16fdc6e7cad5d

---
 meta/recipes-core/util-linux/util-linux_2.39.2.bb | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
meta/recipes-core/util-linux/util-linux_2.39.2.bb +1 -1
index 927037a3429..8c081674017 100644
@@ -137,7 +137,7 @@ RDEPENDS:${PN}-dev += " util-linux-libuuid-dev"
 RPROVIDES:${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev"
 
 RDEPENDS:${PN}-bash-completion += "${PN}-lsblk"
-RDEPENDS:${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs findutils grep iproute2 kmod mdadm procps sed socat which xz"
+RDEPENDS:${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs findutils grep iproute2 kmod procps sed socat which xz"
 RRECOMMENDS:${PN}-ptest += "kernel-module-scsi-debug kernel-module-sd-mod kernel-module-loop kernel-module-algif-hash"
 RDEPENDS:${PN}-swaponoff = "${PN}-swapon ${PN}-swapoff"
 ALLOW_EMPTY:${PN}-swaponoff = "1"
@@ -320,6 +320,12 @@ do_install_ptest() {
     if ! ${@bb.utils.contains('PACKAGECONFIG', 'pam', 'true', 'false', d)}; then
         rm -rf ${D}${PTEST_PATH}/tests/ts/chfn
     fi

meta/recipes-core/util-linux/util-linux_2.39.2.bb do_install_ptest() {

Quoted 10 lines
meta/recipes-core/util-linux/util-linux_2.39.2.bb +6 -1
+    # remove raid tests, known failures and avoid dependency on mdadm therefore
+    # See https://github.com/util-linux/util-linux/commit/7519c3edab120b14623931d5ddb16fdc6e7cad5d
+    rm -rf ${D}${PTEST_PATH}/tests/ts/blkid/md-raid0-whole
+    rm -rf ${D}${PTEST_PATH}/tests/ts/blkid/md-raid1-part
+    rm -rf ${D}${PTEST_PATH}/tests/ts/blkid/md-raid1-whole
+    rm -rf ${D}${PTEST_PATH}/tests/ts/fdisk/align-512-4K-md
 }
 
 # Delete tests not working on musl
-

This sounds good to me, thanks!

Unwinding a few dependencies like this can make all the difference to build times.

Cheers,

Richard

#2 lore raw
In reply to Khem Raj

Hi,

Le 14/12/2023 à 20:34, Khem Raj a écrit :

Quoted 10 lines

These tests are marked as known failures upstream as well [1] if we delete them then we can drop dependency on mdadm for ptests which can further reduce the dependency chain for ptest enabled minimal images

[1] https://github.com/util-linux/util-linux/commit/7519c3edab120b14623931d5ddb16fdc6e7cad5d

---
 meta/recipes-core/util-linux/util-linux_2.39.2.bb | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Just tested it: this patch also work to remove bluez from the dependency chain of a default core-image-minimal build (https://bugzilla.yoctoproject.org/show_bug.cgi?id=15323)

Regards,

Signature · 2 lines
Yoann Congal
Smile ECS - Tech Expert