[pve-devel] [PATCH storage 5/7] add sas regression tests
Dominik Csapak
d.csapak at proxmox.com
Mon Oct 17 10:31:25 CEST 2016
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
test/disk_tests/sas/disklist | 1 +
test/disk_tests/sas/disklist_expected.json | 17 ++++++++++++++++
test/disk_tests/sas/sda/device/model | 1 +
test/disk_tests/sas/sda/device/vendor | 1 +
test/disk_tests/sas/sda/queue/rotational | 1 +
test/disk_tests/sas/sda/size | 1 +
test/disk_tests/sas/sda_smart | 20 +++++++++++++++++++
test/disk_tests/sas/sda_smart_expected.json | 5 +++++
test/disk_tests/sas/sda_udevadm | 31 +++++++++++++++++++++++++++++
9 files changed, 78 insertions(+)
create mode 100644 test/disk_tests/sas/disklist
create mode 100644 test/disk_tests/sas/disklist_expected.json
create mode 100644 test/disk_tests/sas/sda/device/model
create mode 100644 test/disk_tests/sas/sda/device/vendor
create mode 100644 test/disk_tests/sas/sda/queue/rotational
create mode 100644 test/disk_tests/sas/sda/size
create mode 100644 test/disk_tests/sas/sda_smart
create mode 100644 test/disk_tests/sas/sda_smart_expected.json
create mode 100644 test/disk_tests/sas/sda_udevadm
diff --git a/test/disk_tests/sas/disklist b/test/disk_tests/sas/disklist
new file mode 100644
index 0000000..9191c61
--- /dev/null
+++ b/test/disk_tests/sas/disklist
@@ -0,0 +1 @@
+sda
diff --git a/test/disk_tests/sas/disklist_expected.json b/test/disk_tests/sas/disklist_expected.json
new file mode 100644
index 0000000..77f7d33
--- /dev/null
+++ b/test/disk_tests/sas/disklist_expected.json
@@ -0,0 +1,17 @@
+{
+ "sda" : {
+ "gpt" : 1,
+ "devpath" : "/dev/sda",
+ "type" : "unknown",
+ "model" : "MODEL1",
+ "health" : "UNKNOWN",
+ "osdid" : -1,
+ "journals" : 0,
+ "wwn" : "0x0000000000000000",
+ "vendor" : "VENDOR1",
+ "rpm" : -1,
+ "size" : 5120000,
+ "serial" : "SER2",
+ "wearout" : "N/A"
+ }
+}
diff --git a/test/disk_tests/sas/sda/device/model b/test/disk_tests/sas/sda/device/model
new file mode 100644
index 0000000..6b69674
--- /dev/null
+++ b/test/disk_tests/sas/sda/device/model
@@ -0,0 +1 @@
+MODEL1
diff --git a/test/disk_tests/sas/sda/device/vendor b/test/disk_tests/sas/sda/device/vendor
new file mode 100644
index 0000000..a7894eb
--- /dev/null
+++ b/test/disk_tests/sas/sda/device/vendor
@@ -0,0 +1 @@
+VENDOR1
diff --git a/test/disk_tests/sas/sda/queue/rotational b/test/disk_tests/sas/sda/queue/rotational
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/test/disk_tests/sas/sda/queue/rotational
@@ -0,0 +1 @@
+1
diff --git a/test/disk_tests/sas/sda/size b/test/disk_tests/sas/sda/size
new file mode 100644
index 0000000..5caff40
--- /dev/null
+++ b/test/disk_tests/sas/sda/size
@@ -0,0 +1 @@
+10000
diff --git a/test/disk_tests/sas/sda_smart b/test/disk_tests/sas/sda_smart
new file mode 100644
index 0000000..856af39
--- /dev/null
+++ b/test/disk_tests/sas/sda_smart
@@ -0,0 +1,20 @@
+=== START OF READ SMART DATA SECTION ===
+SMART Health Status: OK
+
+Percentage used endurance indicator: 0%
+Current Drive Temperature: 20 C
+Drive Trip Temperature: 70 C
+
+Manufactured in week 47 of year 2012
+Specified cycle count over device lifetime: 0
+Accumulated start-stop cycles: 0
+Specified load-unload count over device lifetime: 0
+Accumulated load-unload cycles: 0
+Elements in grown defect list: 0
+
+Vendor (Seagate) cache information
+ Blocks sent to initiator = 1286675833552896
+
+Vendor (Seagate/Hitachi) factory information
+ number of hours powered up = 7127.12
+ number of minutes until next internal SMART test = 0
diff --git a/test/disk_tests/sas/sda_smart_expected.json b/test/disk_tests/sas/sda_smart_expected.json
new file mode 100644
index 0000000..e096c8b
--- /dev/null
+++ b/test/disk_tests/sas/sda_smart_expected.json
@@ -0,0 +1,5 @@
+{
+ "health" : "OK",
+ "text" : "\nPercentage used endurance indicator: 0%\nCurrent Drive Temperature: 20 C\nDrive Trip Temperature: 70 C\n\nManufactured in week 47 of year 2012\nSpecified cycle count over device lifetime: 0\nAccumulated start-stop cycles: 0\nSpecified load-unload count over device lifetime: 0\nAccumulated load-unload cycles: 0\nElements in grown defect list: 0\n\nVendor (Seagate) cache information\n Blocks sent to initiator = 1286675833552896\n\nVendor (Seagate/Hitachi) factory information\n number of hours powered up = 7127.12\n number of minutes until next internal SMART test = 0\n",
+ "type" : "text"
+}
diff --git a/test/disk_tests/sas/sda_udevadm b/test/disk_tests/sas/sda_udevadm
new file mode 100644
index 0000000..ac0744d
--- /dev/null
+++ b/test/disk_tests/sas/sda_udevadm
@@ -0,0 +1,31 @@
+P: /devices/pci0000:00/0000:00:03.0/0000:02:00.0/host4/port-4:0/end_device-4:0/target4:0:0/4:0:0:0/block/sda
+N: sda
+S: disk/by-id/scsi-00000000000000000
+S: disk/by-id/wwn-0x0000000000000000
+S: disk/by-path/pci-0000:02:00.0-sas-0x0000000000000000-lun-0
+E: DEVLINKS=/dev/disk/by-id/scsi-00000000000000000 /dev/disk/by-id/wwn-0x0000000000000000 /dev/disk/by-path/pci-0000:02:00.0-sas-0x0000000000000000-lun-0
+E: DEVNAME=/dev/sda
+E: DEVPATH=/devices/pci0000:00/0000:00:03.0/0000:02:00.0/host4/port-4:0/end_device-4:0/target4:0:0/4:0:0:0/block/sda
+E: DEVTYPE=disk
+E: ID_BUS=scsi
+E: ID_MODEL=MODEL1
+E: ID_MODEL_ENC=MODEL1\x20\x20\x20\x20\x20\x20
+E: ID_PART_TABLE_TYPE=gpt
+E: ID_PART_TABLE_UUID=605740f0-44a1-4dc5-9fea-bde166df963e
+E: ID_PATH=pci-0000:02:00.0-sas-0x0000000000000000-lun-0
+E: ID_PATH_TAG=pci-0000_02_00_0-sas-0x0000000000000000-lun-0
+E: ID_REVISION=ES64
+E: ID_SCSI=1
+E: ID_SCSI_SERIAL=SERIAL
+E: ID_SERIAL=SERIAL2
+E: ID_SERIAL_SHORT=SER2
+E: ID_TYPE=disk
+E: ID_VENDOR=VENDOR1
+E: ID_VENDOR_ENC=VENDOR1\x20
+E: ID_WWN=0x0000000000000000
+E: ID_WWN_WITH_EXTENSION=0x0000000000000000
+E: MAJOR=8
+E: MINOR=0
+E: SUBSYSTEM=block
+E: TAGS=:systemd:
+E: USEC_INITIALIZED=667541
--
2.1.4
More information about the pve-devel
mailing list