[pve-devel] [PATCH storage 1/2] tests: add ssd sas disk
Dominik Csapak
d.csapak at proxmox.com
Fri Dec 11 14:52:40 CET 2020
copied from test 'sas' with rotational set to 0
this has then the type 'ssd', rpm: 0, and health: 'OK'
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
test/disk_tests/sas_ssd/disklist | 1 +
.../disk_tests/sas_ssd/disklist_expected.json | 17 ++++++++++
test/disk_tests/sas_ssd/sda/device/model | 1 +
test/disk_tests/sas_ssd/sda/device/vendor | 1 +
test/disk_tests/sas_ssd/sda/queue/rotational | 1 +
test/disk_tests/sas_ssd/sda/size | 1 +
test/disk_tests/sas_ssd/sda_smart | 20 ++++++++++++
.../sas_ssd/sda_smart_expected.json | 5 +++
test/disk_tests/sas_ssd/sda_udevadm | 31 +++++++++++++++++++
9 files changed, 78 insertions(+)
create mode 100644 test/disk_tests/sas_ssd/disklist
create mode 100644 test/disk_tests/sas_ssd/disklist_expected.json
create mode 100644 test/disk_tests/sas_ssd/sda/device/model
create mode 100644 test/disk_tests/sas_ssd/sda/device/vendor
create mode 100644 test/disk_tests/sas_ssd/sda/queue/rotational
create mode 100644 test/disk_tests/sas_ssd/sda/size
create mode 100644 test/disk_tests/sas_ssd/sda_smart
create mode 100644 test/disk_tests/sas_ssd/sda_smart_expected.json
create mode 100644 test/disk_tests/sas_ssd/sda_udevadm
diff --git a/test/disk_tests/sas_ssd/disklist b/test/disk_tests/sas_ssd/disklist
new file mode 100644
index 0000000..9191c61
--- /dev/null
+++ b/test/disk_tests/sas_ssd/disklist
@@ -0,0 +1 @@
+sda
diff --git a/test/disk_tests/sas_ssd/disklist_expected.json b/test/disk_tests/sas_ssd/disklist_expected.json
new file mode 100644
index 0000000..9e7ada3
--- /dev/null
+++ b/test/disk_tests/sas_ssd/disklist_expected.json
@@ -0,0 +1,17 @@
+{
+ "sda" : {
+ "gpt" : 1,
+ "devpath" : "/dev/sda",
+ "type" : "ssd",
+ "model" : "MODEL1",
+ "health" : "OK",
+ "osdid" : -1,
+ "wwn" : "0x0000000000000000",
+ "vendor" : "VENDOR1",
+ "rpm" : 0,
+ "size" : 5120000,
+ "serial" : "SER2",
+ "wearout" : "N/A",
+ "by_id_link" : "/dev/disk/by-id/scsi-00000000000000000"
+ }
+}
diff --git a/test/disk_tests/sas_ssd/sda/device/model b/test/disk_tests/sas_ssd/sda/device/model
new file mode 100644
index 0000000..6b69674
--- /dev/null
+++ b/test/disk_tests/sas_ssd/sda/device/model
@@ -0,0 +1 @@
+MODEL1
diff --git a/test/disk_tests/sas_ssd/sda/device/vendor b/test/disk_tests/sas_ssd/sda/device/vendor
new file mode 100644
index 0000000..a7894eb
--- /dev/null
+++ b/test/disk_tests/sas_ssd/sda/device/vendor
@@ -0,0 +1 @@
+VENDOR1
diff --git a/test/disk_tests/sas_ssd/sda/queue/rotational b/test/disk_tests/sas_ssd/sda/queue/rotational
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/disk_tests/sas_ssd/sda/queue/rotational
@@ -0,0 +1 @@
+0
diff --git a/test/disk_tests/sas_ssd/sda/size b/test/disk_tests/sas_ssd/sda/size
new file mode 100644
index 0000000..5caff40
--- /dev/null
+++ b/test/disk_tests/sas_ssd/sda/size
@@ -0,0 +1 @@
+10000
diff --git a/test/disk_tests/sas_ssd/sda_smart b/test/disk_tests/sas_ssd/sda_smart
new file mode 100644
index 0000000..856af39
--- /dev/null
+++ b/test/disk_tests/sas_ssd/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_ssd/sda_smart_expected.json b/test/disk_tests/sas_ssd/sda_smart_expected.json
new file mode 100644
index 0000000..e096c8b
--- /dev/null
+++ b/test/disk_tests/sas_ssd/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_ssd/sda_udevadm b/test/disk_tests/sas_ssd/sda_udevadm
new file mode 100644
index 0000000..ac0744d
--- /dev/null
+++ b/test/disk_tests/sas_ssd/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.20.1
More information about the pve-devel
mailing list