From f0c14e0ecd67999277a283e3ed30bafb38e33ca3 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Wed, 13 May 2015 11:20:08 -0400 Subject: [PATCH] test/cli-integration/rbd: verify formatting for 'rbd disk-usage' Signed-off-by: Jason Dillaman --- .../cli-integration/rbd/formatted-output.t | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/src/test/cli-integration/rbd/formatted-output.t b/src/test/cli-integration/rbd/formatted-output.t index 61ba9d18eb65..846760b0a36a 100644 --- a/src/test/cli-integration/rbd/formatted-output.t +++ b/src/test/cli-integration/rbd/formatted-output.t @@ -31,6 +31,7 @@ clone $ rbd clone bar@snap rbd_other/child $ rbd snap create rbd_other/child@snap $ rbd flatten rbd_other/child 2> /dev/null + $ rbd bench-write rbd_other/child --io-pattern seq --io-total 1 > /dev/null 2>&1 lock ==== @@ -676,6 +677,50 @@ whenever it is run. grep -v to ignore it, but still work on other distros. 536870912 + $ rbd disk-usage rbd_other + warning: fast-diff map is not enabled for child. operation may be slow. + NAME PROVISIONED USED + child@snap 512M 0 + child 512M 4096k + 512M 4096k + $ rbd disk-usage rbd_other --format json | python -mjson.tool | sed 's/,$/, /' + warning: fast-diff map is not enabled for child. operation may be slow. + { + "images": [ + { + "name": "child", + "provisioned_size": 536870912, + "snapshot": "snap", + "used_size": 0 + }, + { + "name": "child", + "provisioned_size": 536870912, + "used_size": 4194304 + } + ], + "total_provisioned_size": 536870912, + "total_used_size": 4194304 + } + $ rbd disk-usage rbd_other --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp' + warning: fast-diff map is not enabled for child. operation may be slow. + + + + child + snap + 536870912 + 0 + + + child + 536870912 + 4194304 + + + 536870912 + 4194304 + # cleanup $ rbd snap remove rbd_other/child@snap -- 2.47.3