[pve-devel] [PATCH storage 4/7] add nvme regression test

Dominik Csapak d.csapak at proxmox.com
Mon Oct 17 10:31:24 CEST 2016


Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 test/disk_tests/nvme_smart/disklist                |  1 +
 test/disk_tests/nvme_smart/disklist_expected.json  | 17 +++++++++++++++++
 test/disk_tests/nvme_smart/nvme0_smart             | 22 ++++++++++++++++++++++
 test/disk_tests/nvme_smart/nvme0n1/device/model    |  1 +
 .../disk_tests/nvme_smart/nvme0n1/queue/rotational |  1 +
 test/disk_tests/nvme_smart/nvme0n1/size            |  1 +
 .../nvme_smart/nvme0n1_smart_expected.json         |  5 +++++
 test/disk_tests/nvme_smart/nvme0n1_udevadm         | 18 ++++++++++++++++++
 8 files changed, 66 insertions(+)
 create mode 100644 test/disk_tests/nvme_smart/disklist
 create mode 100644 test/disk_tests/nvme_smart/disklist_expected.json
 create mode 100644 test/disk_tests/nvme_smart/nvme0_smart
 create mode 100644 test/disk_tests/nvme_smart/nvme0n1/device/model
 create mode 100644 test/disk_tests/nvme_smart/nvme0n1/queue/rotational
 create mode 100644 test/disk_tests/nvme_smart/nvme0n1/size
 create mode 100644 test/disk_tests/nvme_smart/nvme0n1_smart_expected.json
 create mode 100644 test/disk_tests/nvme_smart/nvme0n1_udevadm

diff --git a/test/disk_tests/nvme_smart/disklist b/test/disk_tests/nvme_smart/disklist
new file mode 100644
index 0000000..d00b90e
--- /dev/null
+++ b/test/disk_tests/nvme_smart/disklist
@@ -0,0 +1 @@
+nvme0n1
diff --git a/test/disk_tests/nvme_smart/disklist_expected.json b/test/disk_tests/nvme_smart/disklist_expected.json
new file mode 100644
index 0000000..ac34d0f
--- /dev/null
+++ b/test/disk_tests/nvme_smart/disklist_expected.json
@@ -0,0 +1,17 @@
+{
+    "nvme0n1" : {
+	"wearout" : "N/A",
+	"vendor" : "unknown",
+	"size" : 512000,
+	"journals" : 0,
+	"health" : "PASSED",
+	"serial" : "unknown",
+	"model" : "NVME MODEL 1",
+	"rpm" : 0,
+	"osdid" : -1,
+	"devpath" : "/dev/nvme0n1",
+	"gpt" : 0,
+	"wwn" : "unknown",
+	"type" : "ssd"
+    }
+}
diff --git a/test/disk_tests/nvme_smart/nvme0_smart b/test/disk_tests/nvme_smart/nvme0_smart
new file mode 100644
index 0000000..2e6aaea
--- /dev/null
+++ b/test/disk_tests/nvme_smart/nvme0_smart
@@ -0,0 +1,22 @@
+smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.4.19-1-pve] (local build)
+Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
+
+=== START OF SMART DATA SECTION ===
+SMART overall-health self-assessment test result: PASSED
+
+SMART/Health Information (NVMe Log 0x02, NSID 0xffffffff)
+Critical Warning:                   0x00
+Temperature:                        32 Celsius
+Available Spare:                    100%
+Available Spare Threshold:          10%
+Percentage Used:                    0%
+Data Units Read:                    1,299,288 [665 GB]
+Data Units Written:                 5,592,478 [2.86 TB]
+Host Read Commands:                 30,360,807
+Host Write Commands:                470,356,196
+Controller Busy Time:               12
+Power Cycles:                       98
+Power On Hours:                     687
+Unsafe Shutdowns:                   21
+Media and Data Integrity Errors:    0
+Error Information Log Entries:      0
diff --git a/test/disk_tests/nvme_smart/nvme0n1/device/model b/test/disk_tests/nvme_smart/nvme0n1/device/model
new file mode 100644
index 0000000..9bd6eba
--- /dev/null
+++ b/test/disk_tests/nvme_smart/nvme0n1/device/model
@@ -0,0 +1 @@
+NVME MODEL 1
diff --git a/test/disk_tests/nvme_smart/nvme0n1/queue/rotational b/test/disk_tests/nvme_smart/nvme0n1/queue/rotational
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/disk_tests/nvme_smart/nvme0n1/queue/rotational
@@ -0,0 +1 @@
+0
diff --git a/test/disk_tests/nvme_smart/nvme0n1/size b/test/disk_tests/nvme_smart/nvme0n1/size
new file mode 100644
index 0000000..83b33d2
--- /dev/null
+++ b/test/disk_tests/nvme_smart/nvme0n1/size
@@ -0,0 +1 @@
+1000
diff --git a/test/disk_tests/nvme_smart/nvme0n1_smart_expected.json b/test/disk_tests/nvme_smart/nvme0n1_smart_expected.json
new file mode 100644
index 0000000..00bece2
--- /dev/null
+++ b/test/disk_tests/nvme_smart/nvme0n1_smart_expected.json
@@ -0,0 +1,5 @@
+{
+    "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",
+    "health" : "PASSED",
+    "type" : "text"
+}
diff --git a/test/disk_tests/nvme_smart/nvme0n1_udevadm b/test/disk_tests/nvme_smart/nvme0n1_udevadm
new file mode 100644
index 0000000..36c78ce
--- /dev/null
+++ b/test/disk_tests/nvme_smart/nvme0n1_udevadm
@@ -0,0 +1,18 @@
+
+P: /devices/pci0000:00/0000:00:01.1/0000:02:00.0/nvme/nvme0/nvme0n1
+N: nvme0n1
+S: disk/by-id/lvm-pv-uuid-Py4eod-qfzj-i8Q3-Dxu6-xf0Q-H3Wr-w5Fo8V
+E: DEVLINKS=/dev/disk/by-id/lvm-pv-uuid-Py4eod-qfzj-i8Q3-Dxu6-xf0Q-H3Wr-w5Fo8V
+E: DEVNAME=/dev/nvme0n1
+E: DEVPATH=/devices/pci0000:00/0000:00:01.1/0000:02:00.0/nvme/nvme0/nvme0n1
+E: DEVTYPE=disk
+E: ID_FS_TYPE=LVM2_member
+E: ID_FS_USAGE=raid
+E: ID_FS_UUID=Py4eod-qfzj-i8Q3-Dxu6-xf0Q-H3Wr-w5Fo8V
+E: ID_FS_UUID_ENC=Py4eod-qfzj-i8Q3-Dxu6-xf0Q-H3Wr-w5Fo8V
+E: ID_FS_VERSION=LVM2 001
+E: MAJOR=259
+E: MINOR=0
+E: SUBSYSTEM=block
+E: TAGS=:systemd:
+E: USEC_INITIALIZED=3842
-- 
2.1.4





More information about the pve-devel mailing list