From a7d4189587e343a581660f1a118f6667c26e5bd4 Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Fri, 13 May 2016 15:05:53 +0200 Subject: [PATCH] qa: rbd/concurrent.sh: suppress rbd map output rbd_map_image() echoes the id of the image and is used in command substitution: id=$(rbd_map_image "${image}") Output from rbd map isn't consumed and clobbers the return. Signed-off-by: Ilya Dryomov --- qa/workunits/rbd/concurrent.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qa/workunits/rbd/concurrent.sh b/qa/workunits/rbd/concurrent.sh index f3373b5fff242..e2fb7974724ba 100755 --- a/qa/workunits/rbd/concurrent.sh +++ b/qa/workunits/rbd/concurrent.sh @@ -257,7 +257,8 @@ function rbd_map_image() { local image="$1" local id - sudo rbd map "${image}" --user "${CEPH_ID}" ${SECRET_ARGS} + sudo rbd map "${image}" --user "${CEPH_ID}" ${SECRET_ARGS} \ + > /dev/null 2>&1 id=$(rbd_image_id "${image}") echo "${id}" @@ -317,7 +318,7 @@ function rbd_unmap_image() { [ $# -eq 1 ] || exit 99 local id="$1" - sudo rbd unmap "/dev/rbd${id}" > /dev/null 2>&1 + sudo rbd unmap "/dev/rbd${id}" } function rbd_destroy_image() { -- 2.39.5