From 34296fc6978a27422d1cb44ad5e6c3f3a544be1a Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Wed, 28 Aug 2024 12:48:53 +0200 Subject: [PATCH] tests: Fix expected rotation rate for SCSI debug drives in tests On 6.11 the SCSI debug CD drives are marked as not rotational and for these we report rotation rate 0. --- src/tests/dbus-tests/test_40_drive.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tests/dbus-tests/test_40_drive.py b/src/tests/dbus-tests/test_40_drive.py index 4f13f8a4f..f374f3841 100644 --- a/src/tests/dbus-tests/test_40_drive.py +++ b/src/tests/dbus-tests/test_40_drive.py @@ -95,6 +95,8 @@ def read_sys_file(value): ret_code, wwn = self.run_command('lsblk -d -no WWN %s' % self.cd_dev) self.assertEqual(ret_code, 0) + rotational = read_sys_file("block/%s/queue/rotational" % os.path.basename(self.cd_dev)) + # values expected are preset by scsi_debug and do not change expected_prop_vals = { 'MediaCompatibility': ['optical_cd'], @@ -104,7 +106,7 @@ def read_sys_file(value): 'MediaRemovable': 1, 'Optical': 1, 'Removable': 1, - 'RotationRate': -1, + 'RotationRate': -1 if rotational == "1" else 0, 'Media': 'optical_cd', 'Model': read_sys_file('model'), 'Revision': read_sys_file('rev'),