From 1ac09059f8b3e938bedbfe0fa0b19aba36803e59 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Thu, 24 May 2018 15:53:07 -0400 Subject: [PATCH] qa/workunits/rbd: fix unit formatting tests Signed-off-by: Jason Dillaman (cherry picked from commit d5b7d672b949767dc65359f26f5af3cad887e444) --- qa/workunits/rbd/cli_generic.sh | 4 ++-- qa/workunits/rbd/import_export.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qa/workunits/rbd/cli_generic.sh b/qa/workunits/rbd/cli_generic.sh index 13252d275e6ec..b1c54db4e58b4 100755 --- a/qa/workunits/rbd/cli_generic.sh +++ b/qa/workunits/rbd/cli_generic.sh @@ -572,7 +572,7 @@ test_thick_provision() { ret="" while [ $count -lt 10 ] do - rbd du|grep test1|tr -s " "|cut -d " " -f 3|grep '^64 MiB' && ret=$? + rbd du|grep test1|tr -s " "|cut -d " " -f 4-5|grep '^64 MiB' && ret=$? if [ "$ret" = "0" ] then break; @@ -594,7 +594,7 @@ test_thick_provision() { ret="" while [ $count -lt 10 ] do - rbd du|grep test1|tr -s " "|cut -d " " -f 3|grep '^4 GiB' && ret=$? + rbd du|grep test1|tr -s " "|cut -d " " -f 4-5|grep '^4 GiB' && ret=$? if [ "$ret" = "0" ] then break; diff --git a/qa/workunits/rbd/import_export.sh b/qa/workunits/rbd/import_export.sh index 562f5576f84ad..89e8d35cfa1a0 100755 --- a/qa/workunits/rbd/import_export.sh +++ b/qa/workunits/rbd/import_export.sh @@ -139,7 +139,7 @@ if rbd help export | grep -q export-format; then rbd import --stripe-count 1000 --stripe-unit 4096 ${TMPDIR}/img testimg rbd export --export-format 2 testimg ${TMPDIR}/img_v2 rbd import --export-format 2 ${TMPDIR}/img_v2 testimg_import - rbd info testimg_import|grep "stripe unit"|awk '{print $3}'|grep -Ei '(4 KiB|4096)' + rbd info testimg_import|grep "stripe unit"|grep -Ei '(4 KiB|4096)' rbd info testimg_import|grep "stripe count"|awk '{print $3}'|grep 1000 rm ${TMPDIR}/img_v2 -- 2.39.5