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