aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/parted/files
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2021-07-16 12:32:24 +0100
committerAnuj Mittal <anuj.mittal@intel.com>2021-07-31 17:56:12 +0800
commit414288ee0c96253b0714e10cd3be6c1366f4b10a (patch)
tree38a330dbe27b41a0ad7ef6049b16834b97371cc1 /meta/recipes-extended/parted/files
parent09be83e7f575c0c271d76c6805f8f782701f48b3 (diff)
downloadopenembedded-core-contrib-414288ee0c96253b0714e10cd3be6c1366f4b10a.tar.gz
openembedded-core-contrib-414288ee0c96253b0714e10cd3be6c1366f4b10a.tar.bz2
openembedded-core-contrib-414288ee0c96253b0714e10cd3be6c1366f4b10a.zip
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 ] 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>
Diffstat (limited to 'meta/recipes-extended/parted/files')
-rw-r--r--meta/recipes-extended/parted/files/check-vfat.patch51
1 files changed, 51 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 @@
+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 ||