From 6888292ba58660b3b58d8a23b530cc4738ee4d65 Mon Sep 17 00:00:00 2001 From: Ben Walker Date: Thu, 26 Sep 2019 11:49:11 -0700 Subject: [PATCH] test/compress: Wait for bdevs to be created This shouldn't be necessary - the RPCs shouldn't complete until the bdevs are fully created. But testing a theory as to why another patch is failing. Change-Id: I72c471547a7dfbb57d695bf8a3a6fb8428a2ebcd Signed-off-by: Ben Walker Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469624 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- test/compress/compress.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/compress/compress.sh b/test/compress/compress.sh index f5de945065..d3b6d3f39f 100755 --- a/test/compress/compress.sh +++ b/test/compress/compress.sh @@ -27,18 +27,26 @@ function destroy_vols() { function create_vols() { $rootdir/scripts/gen_nvme.sh --json | $rpc_py load_subsystem_config + waitforbdev Nvme0n1 + $rpc_py bdev_lvol_create_lvstore Nvme0n1 lvs0 $rpc_py bdev_lvol_create -t -l lvs0 lv0 100 + waitforbdev lvs0/lv0 + $rpc_py bdev_lvol_create -t -l lvs0 lv1 100 + waitforbdev lvs0/lv1 + # use QAT for lv0, if the test system does not have QAT this will # fail which is what we want $rpc_py set_compress_pmd -p 1 $rpc_py bdev_compress_create -b lvs0/lv0 -p /tmp/pmem + waitforbdev COMP_lvs0/lv0 + # use ISAL for lv1, if ISAL is for some reason not available this will # fail which is what we want $rpc_py set_compress_pmd -p 2 - compress_bdev=$($rpc_py bdev_compress_create -b lvs0/lv1 -p /tmp/pmem) - waitforbdev $compress_bdev + $rpc_py bdev_compress_create -b lvs0/lv1 -p /tmp/pmem + waitforbdev COMP_lvs0/lv1 } function run_bdevio() {