Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.48.1: test_isoinfo_device_0 fails (iso_volume_id: CDROM) #79

Closed
dvzrv opened this issue Apr 27, 2022 · 3 comments
Closed

1.48.1: test_isoinfo_device_0 fails (iso_volume_id: CDROM) #79

dvzrv opened this issue Apr 27, 2022 · 3 comments

Comments

@dvzrv
Copy link

dvzrv commented Apr 27, 2022

Hi! When building 1.48.1 for Arch Linux (against qemu 7.0.0) I ran the test suite.

The test test_isoinfo_device_0 fails with:

libguestfs: trace: isoinfo_device = <struct guestfs_isoinfo = iso_system_id: LINUX, iso_volume_id: CDROM, iso_volume_space_size: 2495, iso_volume_set_size: 1, iso_volume_sequence_number: 1, iso_logical_block_size: 2048, iso_volume_set_id: , iso_publisher_id: , iso_data_preparer_id: , iso_application_id: MKISOFS ISO9660/HFS/UDF FILESYSTEM BUILDER & CDRECORD CD/DVD/BluRay CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING, iso_copyright_file_id: , iso_abstract_file_id: , iso_bibliographic_file_id: , iso_volume_creation_t: 1651087996, iso_volume_modification_t: 1651087996, iso_volume_expiration_t: -1, iso_volume_effective_t: 1651087996, >
test_isoinfo_device_0: test failed: expression false: STREQ (ret->iso_volume_id, "ISOIMAGE") && STREQ (ret->iso_volume_set_id, "") && ret->iso_volume_set_size == 1 && ret->iso_volume_sequence_number == 1 && ret->iso_logical_block_size == 2048

Full test log with trace:
test-suite.log

The only way to pass the test is to either disable the test or change the default(?) in the generated function

"STREQ (ret->iso_volume_id, \"ISOIMAGE\") && "^
and tests/c-api/tests.c (which... seems to be generated here: https://github.com/libguestfs/libguestfs/blob/master/generator/tests_c_api.ml)

It looks as if the test has been broken with bf28bc0

Is this project tested in CI against multiple target OS?

@rwmjones
Copy link
Member

If you want to skip just this one test, use:

export SKIP_TEST_ISOINFO_DEVICE_0=1

You can put that line into a file called localenv in the build directory to make it permanent.

I wonder why iso_volume_id is CDROM for you? I guess you're using original mkisofs?

@rwmjones
Copy link
Member

Possibly something like this would work:

diff --git a/generator/actions_core.ml b/generator/actions_core.ml
index e757140aaa..23a2eabef8 100644
--- a/generator/actions_core.ml
+++ b/generator/actions_core.ml
@@ -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 && "^

@dvzrv
Copy link
Author

dvzrv commented Apr 27, 2022

If you want to skip just this one test, use:

export SKIP_TEST_ISOINFO_DEVICE_0=1

Ah, very nice. Thanks!

I wonder why iso_volume_id is CDROM for you? I guess you're using original mkisofs?

We have cdrtools available: https://github.com/archlinux/svntogit-community/blob/packages/cdrtools/trunk/PKGBUILD

Possibly something like this would work:

Yes, that's what I'm doing right now.

archlinux-github pushed a commit to archlinux/svntogit-community that referenced this issue Apr 27, 2022
Use pkgver shortening in source link directly.
Add patch to disable PHP tests, as they are not compatible with php > 8.0:
libguestfs/libguestfs#78
Add patch to fix test_isoinfo_device_0: libguestfs/libguestfs#79
Switch to using qemu, as qemu > 7.0.0 introduces this virtual package.
Switch to using procps-ng instead of relying on the virtual procps.
Switch to using gptfdisk instead of relying on the virtual gdisk.
Add java-runtime, php and ruby to optdepends (should be turned into split
package) for bindings.
Build ruby bindings by default and add ruby-test-unit to checkdepends and
ruby-{rake,rdoc} to makedepends for that.
Run tests by default (with trace info).
Do not alter perl bindings after they have been installed.
Do not remove obsolete binaries (they are not installed any longer).
Add debug package.

git-svn-id: file:///srv/repos/svn-community/svn@1191326 9fca08f4-af9d-4005-b8df-a31f2cc04f65
archlinux-github pushed a commit to archlinux/svntogit-community that referenced this issue Apr 27, 2022
Use pkgver shortening in source link directly.
Add patch to disable PHP tests, as they are not compatible with php > 8.0:
libguestfs/libguestfs#78
Add patch to fix test_isoinfo_device_0: libguestfs/libguestfs#79
Switch to using qemu, as qemu > 7.0.0 introduces this virtual package.
Switch to using procps-ng instead of relying on the virtual procps.
Switch to using gptfdisk instead of relying on the virtual gdisk.
Add java-runtime, php and ruby to optdepends (should be turned into split
package) for bindings.
Build ruby bindings by default and add ruby-test-unit to checkdepends and
ruby-{rake,rdoc} to makedepends for that.
Run tests by default (with trace info).
Do not alter perl bindings after they have been installed.
Do not remove obsolete binaries (they are not installed any longer).
Add debug package.

git-svn-id: file:///srv/repos/svn-community/svn@1191326 9fca08f4-af9d-4005-b8df-a31f2cc04f65
rwmjones added a commit that referenced this issue May 12, 2022
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: #79
Reported-by: David Runge
(cherry picked from commit 0956e8e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants