support/testing/tests/package/test_firewalld: use ext2 instead of cpio

The CPIO filesystem generated by the test_firewalld test is too
large, and doesn't fit as an initramfs in the 256MB of RAM available
in the versatilepb machine. This causes a "Initramfs unpacking failed:
write error" when booting, and many files being missing from the root
filesystem, ultimately causing the test to fail.

The test_firewalld test initially started to fail following a systemd
update [1][3]:

  [BRTEST# systemctl is-active firewalld
  failed

But really started to crash at boot following a python 3.14 update
[2][4]:

  Run /init as init process
  /init: exec: line 15: /sbin/init: not found

Also, update TestFirewalldSysVInit to use ext2 instead of cpio.

[1] 926e0504d0
[2] a0a6abc8b1

Fixes:
[3] https://gitlab.com/buildroot.org/buildroot/-/jobs/12944797059
[4] https://gitlab.com/buildroot.org/buildroot/-/jobs/11856840940

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Romain Naour
2026-02-02 15:45:50 +01:00
committed by Julien Olivain
parent bf832ca167
commit 6a7fe6382a

View File

@@ -23,19 +23,21 @@ class TestFirewalldSystemd(infra.basetest.BRTest):
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_FIREWALLD=y
BR2_TARGET_ROOTFS_CPIO=y
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_SIZE="512M"
# BR2_TARGET_ROOTFS_TAR is not set
"""
def test_run(self):
cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
ext2_file = os.path.join(self.builddir, "images", "rootfs.ext2")
kernel_file = os.path.join(self.builddir, "images", "zImage")
dtb_file = os.path.join(self.builddir, "images", "vexpress-v2p-ca9.dtb")
self.emulator.boot(arch="armv7",
kernel=kernel_file,
kernel_cmdline=["console=ttyAMA0,115200"],
kernel_cmdline=["console=ttyAMA0,115200",
"rootwait", "root=/dev/mmcblk0"],
options=[
"-initrd", cpio_file,
'-drive', f'file={ext2_file},if=sd,format=raw',
"-dtb", dtb_file,
"-M", "vexpress-a9"
])
@@ -78,19 +80,21 @@ class TestFirewalldSysVInit(infra.basetest.BRTest):
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_FIREWALLD=y
BR2_TARGET_ROOTFS_CPIO=y
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_SIZE="512M"
# BR2_TARGET_ROOTFS_TAR is not set
"""
def test_run(self):
cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
ext2_file = os.path.join(self.builddir, "images", "rootfs.ext2")
kernel_file = os.path.join(self.builddir, "images", "zImage")
dtb_file = os.path.join(self.builddir, "images", "vexpress-v2p-ca9.dtb")
self.emulator.boot(arch="armv7",
kernel=kernel_file,
kernel_cmdline=["console=ttyAMA0,115200"],
kernel_cmdline=["console=ttyAMA0,115200",
"rootwait", "root=/dev/mmcblk0"],
options=[
"-initrd", cpio_file,
'-drive', f'file={ext2_file},if=sd,format=raw',
"-dtb", dtb_file,
"-M", "vexpress-a9"
])