Skip to contentSkip to conversation

util-linux: Add fix to isolate test fstab entries using CUSTOM_FSTAB

PATCH New Virendra Thakur 1 participant 1 message May 22, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 util-linux: Add fix to isolate test fstab entries using CUSTOM_FSTAB

During ptest execution, util-linux adds mount entries in /etc/fstab and runs mount -a, which mounts all available entries from /etc/fstab. This can cause unintended mounts that are unrelated to the test, leading to incorrect test behavior.

To avoid this, upstream util-linux introduced a mechanism using CUSTOM_FSTAB,which isolates test-specific fstab entries. Only entries listed in CUSTOM_FSTAB are mounted during test execution, ensuring tests do not interfere with or depend on the system's /etc/fstab.

This commit backports below upstream changes to use CUSTOM_FSTAB.
https://github.com/util-linux/util-linux/commit/ed3d33faff17fb702a3acfca2f9f24e69f4920de
https://github.com/util-linux/util-linux/commit/b1580bd760519a2cf052f023057846e54de47484
https://github.com/util-linux/util-linux/commit/6aa8d17b6b53b86a46c5da68c02a893113130496

---
 meta/recipes-core/util-linux/util-linux.inc   |   1 +
 .../util-linux/fstab-isolation.patch          | 448 ++++++++++++++++++
 2 files changed, 449 insertions(+)
 create mode 100644 meta/recipes-core/util-linux/util-linux/fstab-isolation.patch
meta/recipes-core/util-linux/util-linux.inc +1 -0
index 48520ef951..1ecf5c7b39 100644
@@ -42,6 +42,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-lin
            file://fcntl-lock.c \
            file://CVE-2024-28085-0001.patch \
            file://CVE-2024-28085-0002.patch \
+	   file://fstab-isolation.patch \
            "
 
 SRC_URI[sha256sum] = "7b6605e48d1a49f43cc4b4cfc59f313d0dd5402fa40b96810bd572e167dfed0f"
meta/recipes-core/util-linux/util-linux/fstab-isolation.patch new file +448 -0

448 lines not on this page · raw message

Signature · 1 line
2.34.1