[Buildroot] [git commit] support/tests/cpio: extend runtime tests
Arnout Vandecappelle
arnout at mind.be
Sat Sep 17 20:13:23 UTC 2022
commit: https://git.buildroot.net/buildroot/commit/?id=c25b4454881c8cd49ea725fed44db00d12fd1811
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
Check that dependencies that are DT_NEEDED by a program are
automatically copied by dracut. We use cramfs, the package,
as it is small and just depends on libz.
Test more than one dracut config file.
Reported-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>
Signed-off-by: Yann E. MORIN <yann.morin.1998 at free.fr>
Cc: Thierry Bultel <thierry.bultel at linatsea.fr>
Cc: Adam Duskett <aduskett at gmail.com>
[Arnout: remove test for features that haven't been merged yet]
Signed-off-by: Arnout Vandecappelle <arnout at mind.be>
---
support/testing/tests/fs/test_cpio.py | 8 +++++++-
support/testing/tests/fs/test_cpio/dracut-cramfs.conf | 7 +++++++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/support/testing/tests/fs/test_cpio.py b/support/testing/tests/fs/test_cpio.py
index 9a529f1edd..8c0d357994 100644
--- a/support/testing/tests/fs/test_cpio.py
+++ b/support/testing/tests/fs/test_cpio.py
@@ -37,11 +37,14 @@ class TestCpioDracutBase(infra.basetest.BRTest):
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_INIT_BUSYBOX=y
+ BR2_PACKAGE_CRAMFS=y
BR2_PACKAGE_PV=y
BR2_TARGET_ROOTFS_CPIO=y
BR2_TARGET_ROOTFS_CPIO_DRACUT=y
+ BR2_TARGET_ROOTFS_CPIO_DRACUT_CONF_FILES="{}"
# BR2_TARGET_ROOTFS_TAR is not set
- """
+ """.format(" ".join(["fs/cpio/dracut.conf",
+ "support/testing/tests/fs/test_cpio/dracut-cramfs.conf"]))
def check_dracut(self):
out = subprocess.check_output(["cpio", "--list"],
@@ -52,6 +55,9 @@ class TestCpioDracutBase(infra.basetest.BRTest):
universal_newlines=True)
# pv should *not* be included in cpio image
self.assertEqual(out.find("bin/pv"), -1)
+ # libz should be, because of cramfs
+ self.assertNotEqual(out.find("usr/bin/mkcramfs"), -1)
+ self.assertNotEqual(out.find("usr/lib/libz.so"), -1)
exit_code = boot_img(self.emulator,
self.builddir)
diff --git a/support/testing/tests/fs/test_cpio/dracut-cramfs.conf b/support/testing/tests/fs/test_cpio/dracut-cramfs.conf
new file mode 100644
index 0000000000..69e49239fc
--- /dev/null
+++ b/support/testing/tests/fs/test_cpio/dracut-cramfs.conf
@@ -0,0 +1,7 @@
+install_items+="
+/usr/bin/mkcramfs
+"
+
+add_dracutmodules+="
+cramfs
+"
More information about the buildroot
mailing list