neil / rpms / udisks2

Forked from rpms/udisks2 a year ago
Clone
2b3357
From c21ad308b1313a35cafa1664e5eb4772925bc005 Mon Sep 17 00:00:00 2001
2b3357
From: Tomas Bzatek <tbzatek@redhat.com>
2b3357
Date: Thu, 22 Apr 2021 18:05:29 +0200
2b3357
Subject: [PATCH 1/2] tests: Mark Drive.ATA tests as unstable
2b3357
2b3357
Some of the tests operate on physical ATA drives, comparing values between
2b3357
smartctl output and udisks. Different libraries used, different approach
2b3357
to retrieve some ATA features and values. Turned out this is not working
2b3357
correctly on some SATA disks with each approach giving slightly different
2b3357
results, presumably for the quirks in place.
2b3357
---
2b3357
 src/tests/dbus-tests/test_drive_ata.py | 8 +++++---
2b3357
 1 file changed, 5 insertions(+), 3 deletions(-)
2b3357
2b3357
diff --git a/src/tests/dbus-tests/test_drive_ata.py b/src/tests/dbus-tests/test_drive_ata.py
2b3357
index 3187367e..e91bd02f 100644
2b3357
--- a/src/tests/dbus-tests/test_drive_ata.py
2b3357
+++ b/src/tests/dbus-tests/test_drive_ata.py
2b3357
@@ -4,7 +4,7 @@ import re
2b3357
 import unittest
2b3357
 import time
2b3357
 
2b3357
-from udiskstestcase import UdisksTestCase
2b3357
+import udiskstestcase
2b3357
 
2b3357
 SMART_CMDLINE_FAIL      = 1 << 0
2b3357
 SMART_OPEN_READ_FAIL    = 1 << 1
2b3357
@@ -32,7 +32,7 @@ def _get_sata_disks():
2b3357
 
2b3357
 
2b3357
 for disk in _get_sata_disks():
2b3357
-    ret, out = UdisksTestCase.run_command("smartctl -a /dev/%s" % disk)
2b3357
+    ret, out = udiskstestcase.UdisksTestCase.run_command("smartctl -a /dev/%s" % disk)
2b3357
 
2b3357
     # Only the following bits in the exit status mean the device failed to
2b3357
     # provide valid SMART data, others may be set for different reasons (see
2b3357
@@ -46,7 +46,7 @@ for disk in _get_sata_disks():
2b3357
     else:
2b3357
         smart_unsupported.add(disk)
2b3357
 
2b3357
-class UdisksDriveAtaTest(UdisksTestCase):
2b3357
+class UdisksDriveAtaTest(udiskstestcase.UdisksTestCase):
2b3357
     '''Noninvasive tests for the Drive.Ata interface'''
2b3357
 
2b3357
     def get_smart_setting(self, disk, attr, out_prefix):
2b3357
@@ -102,6 +102,7 @@ class UdisksDriveAtaTest(UdisksTestCase)
2b3357
             intro_data = drive_intro.Introspect()
2b3357
             self.assertNotIn('interface name="org.freedesktop.UDisks2.Drive.Ata"', intro_data)
2b3357
 
2b3357
+    @udiskstestcase.tag_test(udiskstestcase.TestTags.UNSTABLE)
2b3357
     @unittest.skipUnless(smart_supported, "No disks supporting S.M.A.R.T. available")
2b3357
     def test_properties(self):
2b3357
         for disk in smart_supported:
2b3357
@@ -148,6 +149,7 @@ class UdisksDriveAtaTest(UdisksTestCase)
2b3357
                 # nineth field is the raw value
2b3357
                 self.assertEqual(int(pwon_s.value / 3600), int(pwon_attr[8]))
2b3357
 
2b3357
+    @udiskstestcase.tag_test(udiskstestcase.TestTags.UNSTABLE)
2b3357
     @unittest.skipUnless(smart_supported, "No disks supporting S.M.A.R.T. available")
2b3357
     def test_smart_get_attributes(self):
2b3357
         for disk in smart_supported:
2b3357
-- 
2b3357
2.30.2
2b3357