]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/cli-integration/rbd: updated unit formatting
authorJason Dillaman <dillaman@redhat.com>
Fri, 20 Apr 2018 15:19:46 +0000 (11:19 -0400)
committerJason Dillaman <dillaman@redhat.com>
Fri, 20 Apr 2018 15:19:46 +0000 (11:19 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/test/cli-integration/rbd/formatted-output.t

index f9ec49b22be27408045e1e054816b2e2aef26cae..697af56fd3f0e962c5471c7a17980d412a636ded 100644 (file)
@@ -56,8 +56,8 @@ TODO: figure out why .* does not match the block_name_prefix line in rbd info.
 For now, use a more inclusive regex.
   $ rbd info foo
   rbd image 'foo':
-  \tsize 1024 MB in 256 objects (esc)
-  \torder 22 (4096 kB objects) (esc)
+  \tsize 1GiB in 256 objects (esc)
+  \torder 22 (4MiB objects) (esc)
   [^^]+ (re)
   \tformat: 1 (esc)
   $ rbd info foo --format json | python -mjson.tool | sed 's/,$/, /'
@@ -86,8 +86,8 @@ whenever it is run. grep -v to ignore it, but still work on other distros.
   </image>
   $ rbd info foo@snap
   rbd image 'foo':
-  \tsize 1024 MB in 256 objects (esc)
-  \torder 22 (4096 kB objects) (esc)
+  \tsize 1GiB in 256 objects (esc)
+  \torder 22 (4MiB objects) (esc)
   [^^]+ (re)
   \tformat: 1 (esc)
   \tprotected: False (esc)
@@ -117,8 +117,8 @@ whenever it is run. grep -v to ignore it, but still work on other distros.
   </image>
   $ rbd info bar
   rbd image 'bar':
-  \tsize 1024 MB in 256 objects (esc)
-  \torder 22 (4096 kB objects) (esc)
+  \tsize 1GiB in 256 objects (esc)
+  \torder 22 (4MiB objects) (esc)
   \tid:* (glob)
   [^^]+ (re)
   \tformat: 2 (esc)
@@ -170,8 +170,8 @@ whenever it is run. grep -v to ignore it, but still work on other distros.
   </image>
   $ rbd info bar@snap
   rbd image 'bar':
-  \tsize 512 MB in 128 objects (esc)
-  \torder 22 (4096 kB objects) (esc)
+  \tsize 512MiB in 128 objects (esc)
+  \torder 22 (4MiB objects) (esc)
   \tid:* (glob)
   [^^]+ (re)
   \tformat: 2 (esc)
@@ -226,8 +226,8 @@ whenever it is run. grep -v to ignore it, but still work on other distros.
   </image>
   $ rbd info bar@snap2
   rbd image 'bar':
-  \tsize 1024 MB in 256 objects (esc)
-  \torder 22 (4096 kB objects) (esc)
+  \tsize 1GiB in 256 objects (esc)
+  \torder 22 (4MiB objects) (esc)
   \tid:* (glob)
   [^^]+ (re)
   \tformat: 2 (esc)
@@ -282,8 +282,8 @@ whenever it is run. grep -v to ignore it, but still work on other distros.
   </image>
   $ rbd info baz
   rbd image 'baz':
-  \tsize 2048 MB in 512 objects (esc)
-  \torder 22 (4096 kB objects) (esc)
+  \tsize 2GiB in 512 objects (esc)
+  \torder 22 (4MiB objects) (esc)
   \tid:* (glob)
   [^^]+ (re)
   \tformat: 2 (esc)
@@ -327,8 +327,8 @@ whenever it is run. grep -v to ignore it, but still work on other distros.
   </image>
   $ rbd info quux
   rbd image 'quux':
-  \tsize 1024 kB in 1 objects (esc)
-  \torder 22 (4096 kB objects) (esc)
+  \tsize 1MiB in 1 objects (esc)
+  \torder 22 (4MiB objects) (esc)
   [^^]+ (re)
   \tformat: 1 (esc)
   $ rbd info quux --format json | python -mjson.tool | sed 's/,$/, /'
@@ -355,8 +355,8 @@ whenever it is run. grep -v to ignore it, but still work on other distros.
   </image>
   $ rbd info rbd_other/child
   rbd image 'child':
-  \tsize 512 MB in 128 objects (esc)
-  \torder 22 (4096 kB objects) (esc)
+  \tsize 512MiB in 128 objects (esc)
+  \torder 22 (4MiB objects) (esc)
   \tid:* (glob)
   [^^]+ (re)
   \tformat: 2 (esc)
@@ -406,8 +406,8 @@ whenever it is run. grep -v to ignore it, but still work on other distros.
   </image>
   $ rbd info rbd_other/child@snap
   rbd image 'child':
-  \tsize 512 MB in 128 objects (esc)
-  \torder 22 (4096 kB objects) (esc)
+  \tsize 512MiB in 128 objects (esc)
+  \torder 22 (4MiB objects) (esc)
   \tid:* (glob)
   [^^]+ (re)
   \tformat: 2 (esc)
@@ -417,7 +417,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros.
   \tcreate_timestamp:* (glob)
   \tprotected: False (esc)
   \tparent: rbd/bar@snap (esc)
-  \toverlap: 512 MB (esc)
+  \toverlap: 512MiB (esc)
   $ rbd info rbd_other/child@snap --format json | python -mjson.tool | sed 's/,$/, /'
   {
       "block_name_prefix": "rbd_data.*",  (glob)
@@ -474,8 +474,8 @@ whenever it is run. grep -v to ignore it, but still work on other distros.
   </image>
   $ rbd info rbd_other/deep-flatten-child
   rbd image 'deep-flatten-child':
-  \tsize 512 MB in 128 objects (esc)
-  \torder 22 (4096 kB objects) (esc)
+  \tsize 512MiB in 128 objects (esc)
+  \torder 22 (4MiB objects) (esc)
   \tid:* (glob)
   [^^]+ (re)
   \tformat: 2 (esc)
@@ -527,8 +527,8 @@ whenever it is run. grep -v to ignore it, but still work on other distros.
   </image>
   $ rbd info rbd_other/deep-flatten-child@snap
   rbd image 'deep-flatten-child':
-  \tsize 512 MB in 128 objects (esc)
-  \torder 22 (4096 kB objects) (esc)
+  \tsize 512MiB in 128 objects (esc)
+  \torder 22 (4MiB objects) (esc)
   \tid:* (glob)
   [^^]+ (re)
   \tformat: 2 (esc)
@@ -604,15 +604,15 @@ whenever it is run. grep -v to ignore it, but still work on other distros.
     <name>quuy</name>
   </images>
   $ rbd list -l
-  NAME      SIZE PARENT FMT PROT LOCK 
-  foo         1G          1           
-  foo@snap    1G          1           
-  quux        1M          1      excl 
-  bar         1G          2           
-  bar@snap  512M          2 yes       
-  bar@snap2   1G          2           
-  baz         2G          2      shr  
-  quuy        2G          2           
+  NAME        SIZE PARENT FMT PROT LOCK 
+  foo         1GiB          1           
+  foo@snap    1GiB          1           
+  quux        1MiB          1      excl 
+  bar         1GiB          2           
+  bar@snap  512MiB          2 yes       
+  bar@snap2   1GiB          2           
+  baz         2GiB          2      shr  
+  quuy        2GiB          2           
   $ rbd list -l --format json | python -mjson.tool | sed 's/,$/, /'
   [
       {
@@ -729,11 +729,11 @@ whenever it is run. grep -v to ignore it, but still work on other distros.
     <name>deep-flatten-child</name>
   </images>
   $ rbd list rbd_other -l
-  NAME                    SIZE PARENT       FMT PROT LOCK 
-  child                   512M                2           
-  child@snap              512M rbd/bar@snap   2           
-  deep-flatten-child      512M                2           
-  deep-flatten-child@snap 512M                2           
+  NAME                      SIZE PARENT       FMT PROT LOCK 
+  child                   512MiB                2           
+  child@snap              512MiB rbd/bar@snap   2           
+  deep-flatten-child      512MiB                2           
+  deep-flatten-child@snap 512MiB                2           
   $ rbd list rbd_other -l --format json | python -mjson.tool | sed 's/,$/, /'
   [
       {
@@ -867,8 +867,8 @@ whenever it is run. grep -v to ignore it, but still work on other distros.
     </lock>
   </locks>
   $ rbd snap list foo
-  SNAPID NAME    SIZE TIMESTAMP 
-      *snap*1024*MB* (glob)
+  SNAPID NAME SIZE TIMESTAMP 
+      *snap*1GiB* (glob)
   $ rbd snap list foo --format json | python -mjson.tool | sed 's/,$/, /'
   [
       {
@@ -888,9 +888,9 @@ whenever it is run. grep -v to ignore it, but still work on other distros.
     </snapshot>
   </snapshots>
   $ rbd snap list bar
-  SNAPID NAME     SIZE TIMESTAMP                
-      *snap*512*MB* (glob)
-      *snap2*1024*MB* (glob)
+  SNAPID NAME    SIZE TIMESTAMP                
+      *snap*512MiB* (glob)
+      *snap2*1GiB* (glob)
   $ rbd snap list bar --format json | python -mjson.tool | sed 's/,$/, /'
   [
       {
@@ -928,7 +928,7 @@ whenever it is run. grep -v to ignore it, but still work on other distros.
   <snapshots></snapshots>
   $ rbd snap list rbd_other/child
   SNAPID NAME   SIZE TIMESTAMP                
-      *snap*512*MB* (glob)
+      *snap*512MiB* (glob)
   $ rbd snap list rbd_other/child --format json | python -mjson.tool | sed 's/,$/, /'
   [
       {
@@ -949,11 +949,11 @@ whenever it is run. grep -v to ignore it, but still work on other distros.
   </snapshots>
   $ rbd disk-usage --pool rbd_other 2>/dev/null
   NAME                    PROVISIONED USED 
-  child@snap                     512M    0 
-  child                          512M   4M 
-  deep-flatten-child@snap        512M    0 
-  deep-flatten-child             512M    0 
-  <TOTAL>                          1G   4M 
+  child@snap                   512MiB   0B 
+  child                        512MiB 4MiB 
+  deep-flatten-child@snap      512MiB   0B 
+  deep-flatten-child           512MiB   0B 
+  <TOTAL>                        1GiB 4MiB 
   $ rbd disk-usage --pool rbd_other --format json | python -mjson.tool | sed 's/,$/, /'
   {
       "images": [