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