From 7cd799462e68393dffe0dc1f3a87c06440a96740 Mon Sep 17 00:00:00 2001 From: Coiby Xu Date: Thu, 15 Jun 2023 13:17:20 +0800 Subject: [PATCH] tests: skip checking if the second partition has the boot label All the tests failed to run on the Fedora 37 host because the boot partition failed to be mounted and in turn the key kernel cmdline parameters like selinux=0 couldn't be added. The root problem is somehow running lsblk on the second partition returns an empty label unless we wait for enough time. Before figuring out the root cause, simply skip check that the second partition needs to have the boot label. Note the root problem can be produced by building a test image, cd tests ./scripts/build-image.sh Fedora-Cloud-Base-37-1.7.x86_64.qcow2 output_image scripts/build-scripts/base-image_test.sh Source image is qcow2, using snapshot... Formatting 'build/base-image1.building', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=5368709120 backing_file=Fedora-Cloud-Base-37-1.7.x86_64.qcow2 backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 It's a image with multiple partitions, using last partition as main partition grep: /boot/grub2/grubenv: No such file or directory grub2-editenv: error: cannot open `/boot/grub2/grubenv.new': No such file or directory. /dev/nbd0 disconnected Signed-off-by: Coiby Xu Reviewed-by: Philipp Rudo --- tests/scripts/image-init-lib.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/scripts/image-init-lib.sh b/tests/scripts/image-init-lib.sh index 467f32f..b0af7f8 100644 --- a/tests/scripts/image-init-lib.sh +++ b/tests/scripts/image-init-lib.sh @@ -86,9 +86,9 @@ get_mountable_dev() { get_mount_boot() { local dev=$1 _second_part=${dev}p2 - if [[ $(lsblk -f $_second_part -n -o LABEL 2> /dev/null) == boot ]]; then - echo $_second_part - fi + # it's better to check if the 2nd partition has the boot label using lsblk + # but somehow this doesn't work starting with Fedora37 + echo $_second_part }