]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/rbd: relax greps to support upgrade formatting change 18598/head
authorJason Dillaman <dillaman@redhat.com>
Thu, 7 Sep 2017 12:55:27 +0000 (08:55 -0400)
committerJason Dillaman <dillaman@redhat.com>
Fri, 27 Oct 2017 18:58:38 +0000 (14:58 -0400)
Fixes: http://tracker.ceph.com/issues/21181
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 273c84578b06905229a7c6eae7b1a12bbe60de95)

Conflicts:
qa/workunits/rbd/import_export.sh: trivial resolution

qa/workunits/rbd/import_export.sh

index ac58c583c2708f6320db02baec1a4bf5a1a9b5d0..a3211ab6815e3a1a3af779e51637d58209b545c6 100755 (executable)
@@ -74,8 +74,9 @@ dd if=/dev/urandom bs=1M count=1 of=/tmp/sparse2; truncate /tmp/sparse2 -s 2M
 # 1M-block images; validate resulting blocks
 
 # 1M sparse, 1M data
+rbd rm sparse1 || true
 rbd import $RBD_CREATE_ARGS --order 20 /tmp/sparse1
-rbd ls -l | grep sparse1 | grep -i '2048k'
+rbd ls -l | grep sparse1 | grep -Ei '(2M|2048k)'
 [ $tiered -eq 1 -o "$(objects sparse1)" = '1' ]
 
 # export, compare contents and on-disk size
@@ -85,8 +86,9 @@ rm /tmp/sparse1.out
 rbd rm sparse1
 
 # 1M data, 1M sparse
+rbd rm sparse2 || true
 rbd import $RBD_CREATE_ARGS --order 20 /tmp/sparse2
-rbd ls -l | grep sparse2 | grep -i '2048k'
+rbd ls -l | grep sparse2 | grep -Ei '(2M|2048k)'
 [ $tiered -eq 1 -o "$(objects sparse2)" = '0' ]
 rbd export sparse2 /tmp/sparse2.out
 compare_files_and_ondisk_sizes /tmp/sparse2 /tmp/sparse2.out
@@ -97,7 +99,7 @@ rbd rm sparse2
 truncate /tmp/sparse1 -s 10M
 # import from stdin just for fun, verify still sparse
 rbd import $RBD_CREATE_ARGS --order 20 - sparse1 < /tmp/sparse1
-rbd ls -l | grep sparse1 | grep -i '10240k'
+rbd ls -l | grep sparse1 | grep -Ei '(10M|10240k)'
 [ $tiered -eq 1 -o "$(objects sparse1)" = '1' ]
 rbd export sparse1 /tmp/sparse1.out
 compare_files_and_ondisk_sizes /tmp/sparse1 /tmp/sparse1.out
@@ -108,7 +110,7 @@ rbd rm sparse1
 dd if=/dev/urandom bs=2M count=1 of=/tmp/sparse2 oflag=append conv=notrunc
 # again from stding
 rbd import $RBD_CREATE_ARGS --order 20 - sparse2 < /tmp/sparse2
-rbd ls -l | grep sparse2 | grep -i '4096k'
+rbd ls -l | grep sparse2 | grep -Ei '(4M|4096k)'
 [ $tiered -eq 1 -o "$(objects sparse2)" = '0 2 3' ]
 rbd export sparse2 /tmp/sparse2.out
 compare_files_and_ondisk_sizes /tmp/sparse2 /tmp/sparse2.out