diff --git a/qa/workunits/rbd/rbd-nbd.sh b/qa/workunits/rbd/rbd-nbd.sh index dfc4e6c8032fa..8973f68c904ab 100755 --- a/qa/workunits/rbd/rbd-nbd.sh +++ b/qa/workunits/rbd/rbd-nbd.sh @@ -15,27 +15,27 @@ function expect_false() } rbd remove $gen || true -rbd-nbd unmap $dev || true +sudo rbd-nbd unmap $dev || true #read test dd if=/dev/urandom of=$data bs=1M count=$size rbd --no-progress import $data $gen -rbd-nbd --device $dev map $gen -[ "`dd if=$data bs=1M | md5sum`" != "`dd if=$dev bs=1M | md5sum`" ] && false +sudo rbd-nbd --device $dev map $gen +[ "`dd if=$data bs=1M | md5sum`" != "`sudo dd if=$dev bs=1M | md5sum`" ] && false #write test dd if=/dev/urandom of=$data bs=1M count=$size -dd if=$data of=$dev bs=1M +sudo dd if=$data of=$dev bs=1M sync [ "`dd if=$data bs=1M | md5sum`" != "`rbd --no-progress export $gen - | md5sum`" ] && false #trim test -mkfs.ext4 $dev # better idea? +sudo mkfs.ext4 $dev # better idea? sync info=`rbd du $gen | tail -n 1` [ "`echo $info | awk '{print $2}'`" == "`echo $info | awk '{print $3}'`" ] && false -rbd-nbd unmap $dev +sudo rbd-nbd unmap $dev popd rm -rf rbd_nbd_test