]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/rbd: adapt import_export test to handle multiple units 22913/head
authorJason Dillaman <dillaman@redhat.com>
Fri, 6 Jul 2018 17:12:53 +0000 (13:12 -0400)
committerNathan Cutler <ncutler@suse.com>
Fri, 6 Jul 2018 17:54:07 +0000 (19:54 +0200)
Fixes: http://tracker.ceph.com/issues/24740
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 620d10e0a4608153c8571ea1b6d1c3e1d3f63685)

Conflicts:
qa/workunits/rbd/import_export.sh

qa/workunits/rbd/import_export.sh

index 2965a1735c1b5aaa1e55e86cbadcaca0aa5365eb..3c2d48b08148fb470e4834c8945fbc2766532876 100755 (executable)
@@ -80,7 +80,7 @@ dd if=/dev/urandom bs=1M count=1 of=${TMPDIR}/sparse2; truncate ${TMPDIR}/sparse
 
 # 1M sparse, 1M data
 rbd import $RBD_CREATE_ARGS --order 20 ${TMPDIR}/sparse1
-rbd ls -l | grep sparse1 | grep -Ei '(2M|2048k)'
+rbd ls -l | grep sparse1 | grep -Ei '(2 MiB|2M|2048k)'
 [ $tiered -eq 1 -o "$(objects sparse1)" = '1' ]
 
 # export, compare contents and on-disk size
@@ -91,7 +91,7 @@ rbd rm sparse1
 
 # 1M data, 1M sparse
 rbd import $RBD_CREATE_ARGS --order 20 ${TMPDIR}/sparse2
-rbd ls -l | grep sparse2 | grep -Ei '(2M|2048k)'
+rbd ls -l | grep sparse2 | grep -Ei '(2 MiB|2M|2048k)'
 [ $tiered -eq 1 -o "$(objects sparse2)" = '0' ]
 rbd export sparse2 ${TMPDIR}/sparse2.out
 compare_files_and_ondisk_sizes ${TMPDIR}/sparse2 ${TMPDIR}/sparse2.out
@@ -102,7 +102,7 @@ rbd rm sparse2
 truncate ${TMPDIR}/sparse1 -s 10M
 # import from stdin just for fun, verify still sparse
 rbd import $RBD_CREATE_ARGS --order 20 - sparse1 < ${TMPDIR}/sparse1
-rbd ls -l | grep sparse1 | grep -Ei '(10M|10240k)'
+rbd ls -l | grep sparse1 | grep -Ei '(10 MiB|10M|10240k)'
 [ $tiered -eq 1 -o "$(objects sparse1)" = '1' ]
 rbd export sparse1 ${TMPDIR}/sparse1.out
 compare_files_and_ondisk_sizes ${TMPDIR}/sparse1 ${TMPDIR}/sparse1.out
@@ -113,7 +113,7 @@ rbd rm sparse1
 dd if=/dev/urandom bs=2M count=1 of=${TMPDIR}/sparse2 oflag=append conv=notrunc
 # again from stding
 rbd import $RBD_CREATE_ARGS --order 20 - sparse2 < ${TMPDIR}/sparse2
-rbd ls -l | grep sparse2 | grep -Ei '(4M|4096k)'
+rbd ls -l | grep sparse2 | grep -Ei '(4 MiB|4M|4096k)'
 [ $tiered -eq 1 -o "$(objects sparse2)" = '0 2 3' ]
 rbd export sparse2 ${TMPDIR}/sparse2.out
 compare_files_and_ondisk_sizes ${TMPDIR}/sparse2 ${TMPDIR}/sparse2.out