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 <coxu@redhat.com> Reviewed-by: Philipp Rudo <prudo@redhat.com>
This commit is contained in:
parent
8f243d2ab1
commit
7cd799462e
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user