diff options
Diffstat (limited to 'poky/meta/recipes-extended/parted')
-rw-r--r-- | poky/meta/recipes-extended/parted/files/check-vfat.patch | 51 | ||||
-rw-r--r-- | poky/meta/recipes-extended/parted/files/run-ptest | 2 | ||||
-rw-r--r-- | poky/meta/recipes-extended/parted/parted_3.4.bb | 10 |
3 files changed, 59 insertions, 4 deletions
diff --git a/poky/meta/recipes-extended/parted/files/check-vfat.patch b/poky/meta/recipes-extended/parted/files/check-vfat.patch new file mode 100644 index 0000000000..c64130a4e2 --- /dev/null +++ b/poky/meta/recipes-extended/parted/files/check-vfat.patch @@ -0,0 +1,51 @@ +Add checks for both mkfs.vfat and the vfat file system in the kernel before +running tests. + +Upstream-Status: Pending +Signed-off-by: Ross Burton <ross.burton@arm.com> + +diff --git a/tests/t-lib-helpers.sh b/tests/t-lib-helpers.sh +index 4c6c75f..2cc7577 100644 +--- a/tests/t-lib-helpers.sh ++++ b/tests/t-lib-helpers.sh +@@ -418,3 +418,13 @@ require_64bit_() + ;; + esac + } ++ ++# Check if the specified filesystem is either built into the kernel, or can be loaded ++# as a module ++# Usage: has_filesystem vfat ++# Ruturns 0 if the filesystem is available, otherwise skips the test ++require_filesystem_() ++{ ++ grep -q $1 /proc/filesystems && return 0 ++ modprobe --quiet --dry-run $1 || skip_ "this test requires kernel support for $1" ++} +diff --git a/tests/t1100-busy-label.sh b/tests/t1100-busy-label.sh +index f1a13df..0f47b08 100755 +--- a/tests/t1100-busy-label.sh ++++ b/tests/t1100-busy-label.sh +@@ -19,6 +19,9 @@ + . "${srcdir=.}/init.sh"; path_prepend_ ../parted + require_root_ + require_scsi_debug_module_ ++require_fat_ ++require_filesystem_ vfat ++ + ss=$sector_size_ + + scsi_debug_setup_ sector_size=$ss dev_size_mb=90 > dev-name || +diff --git a/tests/t1101-busy-partition.sh b/tests/t1101-busy-partition.sh +index e35e6f0..c813848 100755 +--- a/tests/t1101-busy-partition.sh ++++ b/tests/t1101-busy-partition.sh +@@ -22,6 +22,8 @@ test "$VERBOSE" = yes && parted --version + + require_root_ + require_scsi_debug_module_ ++require_fat_ ++require_filesystem_ vfat + + # create memory-backed device + scsi_debug_setup_ dev_size_mb=80 > dev-name || diff --git a/poky/meta/recipes-extended/parted/files/run-ptest b/poky/meta/recipes-extended/parted/files/run-ptest index 374f1bfbc9..c3d6fca339 100644 --- a/poky/meta/recipes-extended/parted/files/run-ptest +++ b/poky/meta/recipes-extended/parted/files/run-ptest @@ -2,6 +2,6 @@ mkdir -p /etc/udev/mount.blacklist.d echo /dev/sda1 >> /etc/udev/mount.blacklist.d/parted-tmp -rm -f *.log +rm -f tests/*.log make -C tests test-suite.log rm /etc/udev/mount.blacklist.d/parted-tmp diff --git a/poky/meta/recipes-extended/parted/parted_3.4.bb b/poky/meta/recipes-extended/parted/parted_3.4.bb index c15f5aeb0b..4260f3a0d4 100644 --- a/poky/meta/recipes-extended/parted/parted_3.4.bb +++ b/poky/meta/recipes-extended/parted/parted_3.4.bb @@ -11,6 +11,7 @@ SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \ file://fix-doc-mandir.patch \ file://0002-libparted_fs_resize-link-against-libuuid-explicitly-.patch \ file://run-ptest \ + file://check-vfat.patch \ " SRC_URI[md5sum] = "357d19387c6e7bc4a8a90fe2d015fe80" @@ -35,10 +36,13 @@ do_install_ptest() { cp ${S}/build-aux/test-driver $t/build-aux/ cp -r ${S}/tests $t cp ${B}/tests/Makefile $t/tests/ + mkdir $t/lib + cp ${B}/lib/config.h $t/lib sed -i "s|^VERSION.*|VERSION = ${PV}|g" $t/tests/Makefile sed -i "s|^srcdir =.*|srcdir = \.|g" $t/tests/Makefile sed -i "s|^abs_srcdir =.*|abs_srcdir = \.|g" $t/tests/Makefile - sed -i "s|^abs_top_srcdir =.*|abs_top_srcdir = \.\.|g" $t/tests/Makefile + sed -i "s|^abs_top_srcdir =.*|abs_top_srcdir = "${PTEST_PATH}"|g" $t/tests/Makefile + sed -i "s|^abs_top_builddir =.*|abs_top_builddir = "${PTEST_PATH}"|g" $t/tests/Makefile sed -i "s|^Makefile:.*|Makefile:|g" $t/tests/Makefile sed -i "/^BUILDINFO.*$/d" $t/tests/Makefile for i in print-align print-max print-flags dup-clobber duplicate fs-resize; \ @@ -47,8 +51,8 @@ do_install_ptest() { sed -e 's| ../parted||' -i $t/tests/*.sh } -RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup python3 make gawk e2fsprogs-mke2fs python3-core" -RRECOMMENDS_${PN}-ptest = "kernel-module-scsi-debug" +RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup util-linux-mkswap python3 make gawk e2fsprogs-mke2fs e2fsprogs-tune2fs python3-core dosfstools" +RRECOMMENDS_${PN}-ptest += "kernel-module-scsi-debug kernel-module-loop kernel-module-vfat" RDEPENDS_${PN}-ptest_append_libc-glibc = "\ glibc-utils \ locale-base-en-us \ |