summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/parted
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2021-07-16 12:32:24 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-06 09:59:14 +0100
commitef2599f8677a5c52dc1217ee5168b4bf959fd156 (patch)
tree7b2a86d142fe3eed92761107e31ccde4529a89ae /meta/recipes-extended/parted
parentc63ca93da1ae7296a5a041e66b392ca4bfd1fbfb (diff)
downloadpoky-ef2599f8677a5c52dc1217ee5168b4bf959fd156.tar.gz
parted: skip tests that need vfat support
At the time of writing the qemu kernels don't support vfat filesystems. There are patches on the list to add that, but as two tests fail without vfat support, make them skip if vfat isn't available. [ YOCTO #14470 ] (From OE-Core rev: 414288ee0c96253b0714e10cd3be6c1366f4b10a) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 17ecb3552cb7d7e7f82cc8b2e1b83f276525cbda) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/parted')
-rw-r--r--meta/recipes-extended/parted/files/check-vfat.patch51
-rw-r--r--meta/recipes-extended/parted/parted_3.4.bb1
2 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-extended/parted/files/check-vfat.patch b/meta/recipes-extended/parted/files/check-vfat.patch
new file mode 100644
index 0000000000..c64130a4e2
--- /dev/null
+++ b/meta/recipes-extended/parted/files/check-vfat.patch
@@ -0,0 +1,51 @@
1Add checks for both mkfs.vfat and the vfat file system in the kernel before
2running tests.
3
4Upstream-Status: Pending
5Signed-off-by: Ross Burton <ross.burton@arm.com>
6
7diff --git a/tests/t-lib-helpers.sh b/tests/t-lib-helpers.sh
8index 4c6c75f..2cc7577 100644
9--- a/tests/t-lib-helpers.sh
10+++ b/tests/t-lib-helpers.sh
11@@ -418,3 +418,13 @@ require_64bit_()
12 ;;
13 esac
14 }
15+
16+# Check if the specified filesystem is either built into the kernel, or can be loaded
17+# as a module
18+# Usage: has_filesystem vfat
19+# Ruturns 0 if the filesystem is available, otherwise skips the test
20+require_filesystem_()
21+{
22+ grep -q $1 /proc/filesystems && return 0
23+ modprobe --quiet --dry-run $1 || skip_ "this test requires kernel support for $1"
24+}
25diff --git a/tests/t1100-busy-label.sh b/tests/t1100-busy-label.sh
26index f1a13df..0f47b08 100755
27--- a/tests/t1100-busy-label.sh
28+++ b/tests/t1100-busy-label.sh
29@@ -19,6 +19,9 @@
30 . "${srcdir=.}/init.sh"; path_prepend_ ../parted
31 require_root_
32 require_scsi_debug_module_
33+require_fat_
34+require_filesystem_ vfat
35+
36 ss=$sector_size_
37
38 scsi_debug_setup_ sector_size=$ss dev_size_mb=90 > dev-name ||
39diff --git a/tests/t1101-busy-partition.sh b/tests/t1101-busy-partition.sh
40index e35e6f0..c813848 100755
41--- a/tests/t1101-busy-partition.sh
42+++ b/tests/t1101-busy-partition.sh
43@@ -22,6 +22,8 @@ test "$VERBOSE" = yes && parted --version
44
45 require_root_
46 require_scsi_debug_module_
47+require_fat_
48+require_filesystem_ vfat
49
50 # create memory-backed device
51 scsi_debug_setup_ dev_size_mb=80 > dev-name ||
diff --git a/meta/recipes-extended/parted/parted_3.4.bb b/meta/recipes-extended/parted/parted_3.4.bb
index 6f9f0a3106..4260f3a0d4 100644
--- a/meta/recipes-extended/parted/parted_3.4.bb
+++ b/meta/recipes-extended/parted/parted_3.4.bb
@@ -11,6 +11,7 @@ SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \
11 file://fix-doc-mandir.patch \ 11 file://fix-doc-mandir.patch \
12 file://0002-libparted_fs_resize-link-against-libuuid-explicitly-.patch \ 12 file://0002-libparted_fs_resize-link-against-libuuid-explicitly-.patch \
13 file://run-ptest \ 13 file://run-ptest \
14 file://check-vfat.patch \
14 " 15 "
15 16
16SRC_URI[md5sum] = "357d19387c6e7bc4a8a90fe2d015fe80" 17SRC_URI[md5sum] = "357d19387c6e7bc4a8a90fe2d015fe80"