diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
commit | 19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch) | |
tree | 42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/test/cli-integration/rbd/snap-diff.t | |
parent | Initial commit. (diff) | |
download | ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip |
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/test/cli-integration/rbd/snap-diff.t | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/test/cli-integration/rbd/snap-diff.t b/src/test/cli-integration/rbd/snap-diff.t new file mode 100644 index 000000000..1ca2fb04d --- /dev/null +++ b/src/test/cli-integration/rbd/snap-diff.t @@ -0,0 +1,48 @@ + $ ceph osd pool create xrbddiff1 + pool 'xrbddiff1' created + $ rbd pool init xrbddiff1 + $ rbd create --thick-provision --size 1M xrbddiff1/xtestdiff1 --no-progress + $ rbd diff xrbddiff1/xtestdiff1 --format json + [{"offset":0,"length":1048576,"exists":"true"}] + $ rbd rm xrbddiff1/xtestdiff1 --no-progress + $ rbd create --size 1M xrbddiff1/xtestdiff1 + $ rbd diff xrbddiff1/xtestdiff1 --format json + [] + $ rbd snap create xrbddiff1/xtestdiff1 --snap=allzeroes --no-progress + $ rbd diff xrbddiff1/xtestdiff1 --format json + [] + $ rbd diff --from-snap=allzeroes xrbddiff1/xtestdiff1 --format json + [] + $ rbd bench --io-type write --io-size 1M --io-total 1M xrbddiff1/xtestdiff1 > /dev/null 2>&1 + $ rbd diff xrbddiff1/xtestdiff1 --format json + [{"offset":0,"length":1048576,"exists":"true"}] + $ rbd diff --from-snap=allzeroes xrbddiff1/xtestdiff1 --format json + [{"offset":0,"length":1048576,"exists":"true"}] + $ rbd snap create xrbddiff1/xtestdiff1 --snap=snap1 --no-progress + $ rbd snap list xrbddiff1/xtestdiff1 --format json | python3 -mjson.tool --sort-keys | sed 's/,$/, /' + [ + { + "id": *, (glob) + "name": "allzeroes", + "protected": "false", + "size": 1048576, + "timestamp": * (glob) + }, + { + "id": *, (glob) + "name": "snap1", + "protected": "false", + "size": 1048576, + "timestamp": * (glob) + } + ] + $ rbd diff --from-snap=snap1 xrbddiff1/xtestdiff1 --format json + [] + $ rbd snap rollback xrbddiff1/xtestdiff1@snap1 --no-progress + $ rbd diff --from-snap=snap1 xrbddiff1/xtestdiff1 --format json + [] + $ rbd snap rollback xrbddiff1/xtestdiff1@allzeroes --no-progress + $ rbd diff --from-snap=allzeroes xrbddiff1/xtestdiff1 --format json + [{"offset":0,"length":1048576,"exists":"false"}] + $ ceph osd pool rm xrbddiff1 xrbddiff1 --yes-i-really-really-mean-it + pool 'xrbddiff1' removed |