kumquat-buildroot/support/testing/tests/fs/test_f2fs.py
Romain Naour 0b892513d0 support/testing: TestF2FS: update kernel to 4.19.310
Since the toolchain Bootlin update to 2023.11-1 [1], the arm Linux
kernel build is broken with binutils >= 2.41 with:

  arch/arm/mm/proc-v7.S: Assembler messages:
  arch/arm/mm/proc-v7.S:640: Error: junk at end of line, first unrecognized character is `#'

A similar issue has already be fixed for qemu m68k [2].

Bump to the latest kernel 4.19 that already include the backport
of 790756c7e022 ("ARM: 8933/1: replace Sun/Solaris style flag on section directive")

[1] 7e0e6e3b86
[2] a1ce9474e4

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/6703222383

Signed-off-by: Romain Naour <romain.naour@smile.fr>
(cherry picked from commit 7e126bd38d)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-05-15 15:25:16 +02:00

48 lines
1.8 KiB
Python

import os
import infra.basetest
def dumpf2fs_getprop(out, prop):
for line in out:
fields = line.split(" = ")
if fields[0] == prop:
return fields[1].strip()
class TestF2FS(infra.basetest.BRTest):
config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
"""
BR2_TARGET_ROOTFS_F2FS=y
BR2_TARGET_ROOTFS_F2FS_SIZE="128M"
BR2_TARGET_ROOTFS_F2FS_OVERPROVISION=0
BR2_TARGET_ROOTFS_F2FS_DISCARD=y
# BR2_TARGET_ROOTFS_TAR is not set
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.310"
BR2_LINUX_KERNEL_USE_DEFCONFIG=y
BR2_LINUX_KERNEL_DEFCONFIG="vexpress"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{}"
""".format(infra.filepath("conf/f2fs-kernel-fragment.config"))
def test_run(self):
img = os.path.join(self.builddir, "images", "rootfs.f2fs")
out = infra.run_cmd_on_host(self.builddir, ["host/sbin/dump.f2fs", img])
out = out.splitlines()
prop = dumpf2fs_getprop(out, "Info: total FS sectors")
self.assertEqual(prop, "262144 (128 MB)")
kernel = os.path.join(self.builddir, "images", "zImage")
kernel_cmdline = ["root=/dev/mmcblk0", "rootfstype=f2fs",
"console=ttyAMA0"]
dtb = infra.download(self.downloaddir, "vexpress-v2p-ca9.dtb")
options = ["-M", "vexpress-a9", "-dtb", dtb,
"-drive", "file={},if=sd,format=raw".format(img)]
self.emulator.boot(arch="armv7", kernel=kernel,
kernel_cmdline=kernel_cmdline,
options=options)
self.emulator.login()
cmd = "mount | grep '/dev/root on / type f2fs'"
self.assertRunOk(cmd)