test/nvme: cuse nvme-cli check if oacs firmware supported
When firmware upload is not supported, fw-log may return random data. This patch compares an output of fw-log only if oacs.firmware is set. Change-Id: I74d7766ca6ebdf0a94f200a35e6215ed44ef1062 Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481670 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
5700688366
commit
c879a8eed4
@ -30,12 +30,18 @@ set +e
|
||||
ctrlr="/dev/${nvme_name}"
|
||||
ns="/dev/${nvme_name}n1"
|
||||
|
||||
oacs=$( ${NVME_CMD} id-ctrl $ctrlr | grep oacs | cut -d: -f2 )
|
||||
oacs_firmware=$(( oacs & 0x4 ))
|
||||
|
||||
${NVME_CMD} get-ns-id $ns > ${KERNEL_OUT}.1
|
||||
${NVME_CMD} id-ns $ns > ${KERNEL_OUT}.2
|
||||
${NVME_CMD} list-ns $ns > ${KERNEL_OUT}.3
|
||||
|
||||
${NVME_CMD} id-ctrl $ctrlr > ${KERNEL_OUT}.4
|
||||
${NVME_CMD} list-ctrl $ctrlr > ${KERNEL_OUT}.5
|
||||
if [ "$oacs_firmware" -ne "0" ]; then
|
||||
${NVME_CMD} fw-log $ctrlr > ${KERNEL_OUT}.6
|
||||
fi
|
||||
${NVME_CMD} smart-log $ctrlr
|
||||
${NVME_CMD} error-log $ctrlr > ${KERNEL_OUT}.7
|
||||
${NVME_CMD} get-feature $ctrlr -f 1 -s 1 -l 100 > ${KERNEL_OUT}.8
|
||||
@ -74,6 +80,9 @@ ${NVME_CMD} list-ns $ns > ${CUSE_OUT}.3
|
||||
ctrlr="/dev/spdk/nvme0"
|
||||
${NVME_CMD} id-ctrl $ctrlr > ${CUSE_OUT}.4
|
||||
${NVME_CMD} list-ctrl $ctrlr > ${CUSE_OUT}.5
|
||||
if [ "$oacs_firmware" -ne "0" ]; then
|
||||
${NVME_CMD} fw-log $ctrlr > ${CUSE_OUT}.6
|
||||
fi
|
||||
${NVME_CMD} smart-log $ctrlr
|
||||
${NVME_CMD} error-log $ctrlr > ${CUSE_OUT}.7
|
||||
${NVME_CMD} get-feature $ctrlr -f 1 -s 1 -l 100 > ${CUSE_OUT}.8
|
||||
|
Loading…
Reference in New Issue
Block a user