]> git.proxmox.com Git - pve-storage.git/commitdiff
add nvme regression test
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 17 Oct 2016 08:31:24 +0000 (10:31 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 28 Oct 2016 08:22:15 +0000 (10:22 +0200)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
test/disk_tests/nvme_smart/disklist [new file with mode: 0644]
test/disk_tests/nvme_smart/disklist_expected.json [new file with mode: 0644]
test/disk_tests/nvme_smart/nvme0_smart [new file with mode: 0644]
test/disk_tests/nvme_smart/nvme0n1/device/model [new file with mode: 0644]
test/disk_tests/nvme_smart/nvme0n1/queue/rotational [new file with mode: 0644]
test/disk_tests/nvme_smart/nvme0n1/size [new file with mode: 0644]
test/disk_tests/nvme_smart/nvme0n1_smart_expected.json [new file with mode: 0644]
test/disk_tests/nvme_smart/nvme0n1_udevadm [new file with mode: 0644]

diff --git a/test/disk_tests/nvme_smart/disklist b/test/disk_tests/nvme_smart/disklist
new file mode 100644 (file)
index 0000000..d00b90e
--- /dev/null
@@ -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 (file)
index 0000000..ac34d0f
--- /dev/null
@@ -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 (file)
index 0000000..2e6aaea
--- /dev/null
@@ -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 (file)
index 0000000..9bd6eba
--- /dev/null
@@ -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 (file)
index 0000000..573541a
--- /dev/null
@@ -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 (file)
index 0000000..83b33d2
--- /dev/null
@@ -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 (file)
index 0000000..00bece2
--- /dev/null
@@ -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 (file)
index 0000000..36c78ce
--- /dev/null
@@ -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