[pve-devel] [PATCH storage 1/2] disk_tests: improve nvme smart test

Dominik Csapak d.csapak at proxmox.com
Tue Apr 14 16:17:32 CEST 2020


by using an actual percentage for 'Percentage Used' instead of 0%

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
this test now fails, but is repaired by the next patch of the series

 test/disk_tests/nvme_smart/disklist_expected.json      | 2 +-
 test/disk_tests/nvme_smart/nvme0_smart                 | 2 +-
 test/disk_tests/nvme_smart/nvme0n1_smart_expected.json | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/disk_tests/nvme_smart/disklist_expected.json b/test/disk_tests/nvme_smart/disklist_expected.json
index 0b043b1..1bcdb7d 100644
--- a/test/disk_tests/nvme_smart/disklist_expected.json
+++ b/test/disk_tests/nvme_smart/disklist_expected.json
@@ -1,6 +1,6 @@
 {
     "nvme0n1" : {
-	"wearout" : 100,
+	"wearout" : 69,
 	"vendor" : "unknown",
 	"size" : 512000,
 	"health" : "PASSED",
diff --git a/test/disk_tests/nvme_smart/nvme0_smart b/test/disk_tests/nvme_smart/nvme0_smart
index 2e6aaea..f371d5b 100644
--- a/test/disk_tests/nvme_smart/nvme0_smart
+++ b/test/disk_tests/nvme_smart/nvme0_smart
@@ -9,7 +9,7 @@ Critical Warning:                   0x00
 Temperature:                        32 Celsius
 Available Spare:                    100%
 Available Spare Threshold:          10%
-Percentage Used:                    0%
+Percentage Used:                    31%
 Data Units Read:                    1,299,288 [665 GB]
 Data Units Written:                 5,592,478 [2.86 TB]
 Host Read Commands:                 30,360,807
diff --git a/test/disk_tests/nvme_smart/nvme0n1_smart_expected.json b/test/disk_tests/nvme_smart/nvme0n1_smart_expected.json
index 6ea2d67..af8eade 100644
--- a/test/disk_tests/nvme_smart/nvme0n1_smart_expected.json
+++ b/test/disk_tests/nvme_smart/nvme0n1_smart_expected.json
@@ -1,6 +1,6 @@
 {
-    "text" : "\nSMART/Health Information (NVMe Log 0x02, NSID 0xffffffff)\nCritical Warning:                   0x00\nTemperature:                        32 Celsius\nAvailable Spare:                    100%\nAvailable Spare Threshold:          10%\nPercentage Used:                    0%\nData Units Read:                    1,299,288 [665 GB]\nData Units Written:                 5,592,478 [2.86 TB]\nHost Read Commands:                 30,360,807\nHost Write Commands:                470,356,196\nController Busy Time:               12\nPower Cycles:                       98\nPower On Hours:                     687\nUnsafe Shutdowns:                   21\nMedia and Data Integrity Errors:    0\nError Information Log Entries:      0\n",
+    "text" : "\nSMART/Health Information (NVMe Log 0x02, NSID 0xffffffff)\nCritical Warning:                   0x00\nTemperature:                        32 Celsius\nAvailable Spare:                    100%\nAvailable Spare Threshold:          10%\nPercentage Used:                    31%\nData Units Read:                    1,299,288 [665 GB]\nData Units Written:                 5,592,478 [2.86 TB]\nHost Read Commands:                 30,360,807\nHost Write Commands:                470,356,196\nController Busy Time:               12\nPower Cycles:                       98\nPower On Hours:                     687\nUnsafe Shutdowns:                   21\nMedia and Data Integrity Errors:    0\nError Information Log Entries:      0\n",
     "health" : "PASSED",
     "type" : "text",
-    "wearout": 100
+    "wearout": 69
 }
-- 
2.20.1





More information about the pve-devel mailing list