Bug 2211191

Summary: integration-test: Fix scsi_debug cd drive read-only detection
Product: Red Hat Enterprise Linux 9 Reporter: Tomáš Bžatek <tbzatek>
Component: udisks2Assignee: Tomáš Bžatek <tbzatek>
Status: CLOSED ERRATA QA Contact: guazhang <guazhang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.3CC: guazhang
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: udisks2-2.9.4-8.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-07 08:33:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tomáš Bžatek 2023-05-30 16:29:19 UTC
Upstream change: https://github.com/storaged-project/udisks/pull/1112
Related kernel bugreport: bug 2211183

UDisks integration tests are failing since kernel-5.14.0-306.el9 on emulated cd drives on read-only detection. The mentioned upstream change fixes the problem by forcefully setting the device as read-only.

======================================================================
ERROR: test_ext4 (__main__.FS)
fs: ext4
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/brq/tbzatek/devel/udisks/src/tests/integration-test", line 725, in test_ext4
    self._do_fs_check('ext4')
  File "/home/brq/tbzatek/devel/udisks/src/tests/integration-test", line 893, in _do_fs_check
    self._do_udisks_check(fs_type)
  File "/home/brq/tbzatek/devel/udisks/src/tests/integration-test", line 1117, in _do_udisks_check
    mount_path = cd_fs.call_mount_sync(no_options, None)
gi.repository.GLib.GError: udisks-error-quark: GDBus.Error:org.freedesktop.UDisks2.Error.Failed: Error mounting /dev/sr1 at /media/root/9378c1b9-14f3-4138-b73b-274dfc2c0d94: can't read superblock on /dev/sr1 (0)

======================================================================
ERROR: test_removable_fs (__main__.Polkit)
Mount FS on removable drive (allowed)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/brq/tbzatek/devel/udisks/src/tests/integration-test", line 1753, in test_removable_fs
    mount_path = fs.call_mount_sync(no_options, None)
gi.repository.GLib.GError: udisks-error-quark: GDBus.Error:org.freedesktop.UDisks2.Error.Failed: Error mounting /dev/sr1 at /media/root/9378c1b9-14f3-4138-b73b-274dfc2c0d94: can't read superblock on /dev/sr1 (0)

----------------------------------------------------------------------

Comment 5 errata-xmlrpc 2023-11-07 08:33:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (udisks2 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:6453