summaryrefslogtreecommitdiff
diff options
authorMaciej Kisielewski <maciej.kisielewski@canonical.com>2017-03-30 00:59:21 +0200
committerMaciej Kisielewski <maciej.kisielewski@canonical.com>2017-04-04 15:56:47 +0200
commit8ec9087948a297c6449cd6f4ad271ebf95cfb8c7 (patch)
treee5cbfe35abb95d874ada5b04a477c101f77f537f
parentaf7c972ea51e8ddcfbd800b5e1d640d809c697e8 (diff)
add job that checks APSTE availabilty on NVMe drives
I decided to go with device.driver == 'nvme' and device.category == 'OTHER'" template-filter to make sure only one job is generated (per controller), and that the template will be given nvmeN name (N being 0, 1..), so the check for pm_qos file would be possible. If I'd narrow it down to category == 'DISK' then the drives would be reported, like nvme0n1, which is fine for the nvme cli tool, but it would require some obscure tweaking to get 'the parent' for the sysfs check.
-rw-r--r--jobs/disk.txt.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/jobs/disk.txt.in b/jobs/disk.txt.in
index 8d22fb3..c1df7e3 100644
--- a/jobs/disk.txt.in
+++ b/jobs/disk.txt.in
@@ -1,3 +1,8 @@
+# This is for disk/apste_support_on_*
+unit: packaging meta-data
+os-id: debian
+Depends: nvme-cli
+
plugin: shell
category_id: 2013.com.canonical.plainbox::disk
id: disk/detect
@@ -128,3 +133,13 @@ _description:
The verification of this test is automated. Do not change the
automatically selected result.
+unit: template
+template-resource: device
+template-filter: device.driver == 'nvme' and device.category == 'OTHER'
+plugin: shell
+category_id: 2013.com.canonical.plainbox::disk
+id: disk/apste_support_on_{name}
+estimated_duration: 1.0
+user: root
+command: nvme get-feature -f 0x0c -H /dev/{name} | grep '(APSTE).*Enabled' && test -e /sys/class/nvme/{name}/power/pm_qos_latency_tolerance_us
+_summary: Check support for Autonomous Power State Transition on {name}