tests: Fix isoinfo test to recognise cdrtools iso_volume_id

cdrtools writes "CDROM" into the Volume Identifier field in the PVD,
whereas genisoimage and xorriso write "ISOIMAGE".  Recognise either
string as valid in the test.

Fixes: https://github.com/libguestfs/libguestfs/issues/79
Reported-by: David Runge
This commit is contained in:
Richard W.M. Jones
2022-04-28 08:39:13 +01:00
parent ef8c6593eb
commit 0956e8e0c5

View File

@@ -6829,7 +6829,8 @@ this will create the largest possible LV." };
tests = [
InitNone, Always, TestResult (
[["isoinfo_device"; "/dev/sdd"]],
"STREQ (ret->iso_volume_id, \"ISOIMAGE\") && "^
"(STREQ (ret->iso_volume_id, \"CDROM\") || "^
" STREQ (ret->iso_volume_id, \"ISOIMAGE\")) && "^
"STREQ (ret->iso_volume_set_id, \"\") && "^
"ret->iso_volume_set_size == 1 && "^
"ret->iso_volume_sequence_number == 1 && "^