diff options
author | David Zafman <dzafman@redhat.com> | 2016-05-07 04:54:11 +0200 |
---|---|---|
committer | David Zafman <dzafman@redhat.com> | 2016-05-07 04:55:33 +0200 |
commit | a2147ad3cb256c34541ff7dc285594a22a24dfc6 (patch) | |
tree | f7899471ffd68be748a8e765c6b3f9ca5b691188 | |
parent | Merge pull request #8912 from markhpc/wip-promote-throttle-fix (diff) | |
download | ceph-a2147ad3cb256c34541ff7dc285594a22a24dfc6.tar.xz ceph-a2147ad3cb256c34541ff7dc285594a22a24dfc6.zip |
test: Fix test to not use jq -S which isn't avail in all distributions
Fixes: http://tracker.ceph.com/issues/15766
Signed-off-by: David Zafman <dzafman@redhat.com>
-rwxr-xr-x | src/test/osd/osd-scrub-snaps.sh | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/src/test/osd/osd-scrub-snaps.sh b/src/test/osd/osd-scrub-snaps.sh index 9898b1eef3f..0f58eba67cb 100755 --- a/src/test/osd/osd-scrub-snaps.sh +++ b/src/test/osd/osd-scrub-snaps.sh @@ -166,21 +166,35 @@ function TEST_scrub_snaps() { rados list-inconsistent-snapset $pgid > $dir/json || return 1 test $(jq '.inconsistents | length' $dir/json) = "20" || return 1 - jq -c -S '.inconsistents | sort' > $dir/checkcsjson << EOF -{"inconsistents":[{"headless":true,"snap":"0x00000001","locator":"","nspace":"","name":"obj1"},{"size_mismatch":true,"snap":"0x00000001","locator":"","nspace":"","name":"obj10"}, -{"headless":true,"snap":"0x00000001","locator":"","nspace":"","name":"obj11"},{"size_mismatch":true,"snap":"0x00000001","locator":"","nspace":"","name":"obj14"},{"headless":true, -"snap":"0x00000001","locator":"","nspace":"","name":"obj6"},{"headless":true,"snap":"0x00000001","locator":"","nspace":"","name":"obj7"},{"size_mismatch":true,"snap":"0x00000001", -"locator":"","nspace":"","name":"obj9"},{"headless":true,"snap":"0x00000004","locator":"","nspace":"","name":"obj2"},{"size_mismatch":true,"snap":"0x00000004","locator":"", -"nspace":"","name":"obj5"},{"headless":true,"snap":"0x00000007","locator":"","nspace":"","name":"obj2"},{"headless":true,"oi_attr_missing":true,"snap":"0x00000007","locator":"", -"nspace":"","name":"obj5"},{"extra clones":[1],"extra_clones":true,"snap":"head","locator":"","nspace":"","name":"obj11"},{"head_mismatch":true,"snap":"head","locator":"", -"nspace":"","name":"obj12"},{"size_mismatch":true,"snap":"head","locator":"","nspace":"","name":"obj3"},{"missing":[2,1],"clone_missing":true,"extra clones":[7],"extra_clones":true, -"snap":"head","locator":"","nspace":"","name":"obj5"},{"extra clones":[1],"extra_clones":true,"snap":"head","locator":"","nspace":"","name":"obj6"},{"extra clones":[1], -"extra_clones":true,"head_mismatch":true,"snap":"head","locator":"","nspace":"","name":"obj7"},{"snapset_mismatch":true,"snap":"head","locator":"","nspace":"","name":"obj8"}, -{"extra clones":[7,4],"extra_clones":true,"ss_attr_missing":true,"snap":"snapdir","locator":"","nspace":"","name":"obj2"},{"missing":[7],"clone_missing":true,"snap":"snapdir", -"locator":"","nspace":"","name":"obj4"}],"epoch":18} + jq -c '.inconsistents | sort' > $dir/checkcsjson << EOF +{"inconsistents":[{"name":"obj5","nspace":"","locator":"","snap":"head", +"extra_clones":true,"extra clones":[7],"clone_missing":true,"missing":[2,1]}, +{"name":"obj4","nspace":"","locator":"","snap":"snapdir","clone_missing":true, +"missing":[7]},{"name":"obj7","nspace":"","locator":"","snap":"head", +"head_mismatch":true,"extra_clones":true,"extra clones":[1]},{"name":"obj11", +"nspace":"","locator":"","snap":"head","extra_clones":true,"extra clones":[1]}, +{"name":"obj6","nspace":"","locator":"","snap":"head","extra_clones":true, +"extra clones":[1]},{"name":"obj2","nspace":"","locator":"","snap":"snapdir", +"ss_attr_missing":true,"extra_clones":true,"extra clones":[7,4]}, +{"name":"obj12","nspace":"","locator":"","snap":"head","head_mismatch":true}, +{"name":"obj5","nspace":"","locator":"","snap":"0x00000007", +"oi_attr_missing":true,"headless":true},{"name":"obj1","nspace":"","locator":"", +"snap":"0x00000001","headless":true},{"name":"obj11","nspace":"","locator":"", +"snap":"0x00000001","headless":true},{"name":"obj2","nspace":"","locator":"", +"snap":"0x00000004","headless":true},{"name":"obj2","nspace":"","locator":"", +"snap":"0x00000007","headless":true},{"name":"obj6","nspace":"","locator":"", +"snap":"0x00000001","headless":true},{"name":"obj7","nspace":"","locator":"", +"snap":"0x00000001","headless":true},{"name":"obj10","nspace":"","locator":"", +"snap":"0x00000001","size_mismatch":true},{"name":"obj14","nspace":"", +"locator":"","snap":"0x00000001","size_mismatch":true},{"name":"obj3", +"nspace":"","locator":"","snap":"head","size_mismatch":true},{"name":"obj5", +"nspace":"","locator":"","snap":"0x00000004","size_mismatch":true}, +{"name":"obj9","nspace":"","locator":"","snap":"0x00000001", +"size_mismatch":true},{"name":"obj8","nspace":"","locator":"","snap":"head", +"snapset_mismatch":true}],"epoch":18} EOF - jq -c -S '.inconsistents | sort' $dir/json > $dir/csjson + jq -c '.inconsistents | sort' $dir/json > $dir/csjson diff $dir/csjson $dir/checkcsjson || return 1 for i in `seq 1 7` |