From ba3c46864782ce57bfc51c8a6f137d3e8fee1022 Mon Sep 17 00:00:00 2001 From: Tomasz Zawadzki Date: Thu, 18 Jun 2020 07:40:05 -0400 Subject: [PATCH] test/cuse: do not disable exit on error Originally the idea was to disable error checking, to match output from Kernel and SPDK NVMe cuse. This includes passing test commands and failures. Any discrepancy would be caught by log output diff at the end. Flaw in this logic is that test command itself might be incorrect. We shouldn't depend on that, nor attempt to cover up some of the failures even if they occur on both interfaces. Most probable cause for this at all, was NVMe emulated in QEMU not really working with all the nvme-cli commands from this test. Since the original creation of this test, CUSE executes on physical devices (to be able to support namespace management). The behavior there is predictable and works with current test commands, thus the test exits on any error with this patch. Signed-off-by: Tomasz Zawadzki Change-Id: I086faf38b2cbbb6225935cc50d4fad14e81f1972 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3032 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Changpeng Liu Reviewed-by: Ben Walker Reviewed-by: Karol Latecki --- test/nvme/cuse/spdk_nvme_cli_cuse.sh | 8 -------- 1 file changed, 8 deletions(-) diff --git a/test/nvme/cuse/spdk_nvme_cli_cuse.sh b/test/nvme/cuse/spdk_nvme_cli_cuse.sh index e37a29ccb..2b6551e1b 100755 --- a/test/nvme/cuse/spdk_nvme_cli_cuse.sh +++ b/test/nvme/cuse/spdk_nvme_cli_cuse.sh @@ -32,8 +32,6 @@ waitforblk "${nvme_name}n1" oacs=$(${NVME_CMD} id-ctrl $ctrlr | grep oacs | cut -d: -f2) oacs_firmware=$((oacs & 0x4)) -set +e - ${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 @@ -49,8 +47,6 @@ ${NVME_CMD} get-feature $ctrlr -f 1 -s 1 -l 100 > ${KERNEL_OUT}.8 ${NVME_CMD} get-log $ctrlr -i 1 -l 100 > ${KERNEL_OUT}.9 ${NVME_CMD} reset $ctrlr > ${KERNEL_OUT}.10 -set -e - $rootdir/scripts/setup.sh $SPDK_BIN_DIR/spdk_tgt -m 0x3 & @@ -69,8 +65,6 @@ waitforfile "$ns" $rpc_py bdev_get_bdevs $rpc_py bdev_nvme_get_controllers -set +e - ${NVME_CMD} get-ns-id $ns > ${CUSE_OUT}.1 ${NVME_CMD} id-ns $ns > ${CUSE_OUT}.2 ${NVME_CMD} list-ns $ns > ${CUSE_OUT}.3 @@ -86,8 +80,6 @@ ${NVME_CMD} get-feature $ctrlr -f 1 -s 1 -l 100 > ${CUSE_OUT}.8 ${NVME_CMD} get-log $ctrlr -i 1 -l 100 > ${CUSE_OUT}.9 ${NVME_CMD} reset $ctrlr > ${CUSE_OUT}.10 -set -e - for i in {1..10}; do if [ -f "${KERNEL_OUT}.${i}" ] && [ -f "${CUSE_OUT}.${i}" ]; then sed -i "s/${nvme_name}/nvme0/g" ${KERNEL_OUT}.${i}