]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: krbd_exclusive_option.sh: fixup for json.tool ordering change 32358/head
authorIlya Dryomov <idryomov@gmail.com>
Thu, 19 Dec 2019 18:02:18 +0000 (19:02 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 6 Jan 2020 14:12:25 +0000 (15:12 +0100)
In Python 3.5 json.tool was changed to produce unsorted output and
--sort-keys option was added to compensate.  This wasn't caught by
4fe245cc2f2d ("qa: update krbd tests for python3") because it raced
with 50933b863a1d ("qa: krbd_exclusive_option.sh: update for recent
kernel changes").

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
qa/workunits/rbd/krbd_exclusive_option.sh

index 1ddd089d410f8b76d622d08a34ffdcf43bc043f9..09edc138654384b048fa7cb7c7c415abb9f50228 100755 (executable)
@@ -24,10 +24,10 @@ function assert_locked() {
 
     local actual
     actual="$(rados -p rbd --format=json lock info rbd_header.$IMAGE_ID rbd_lock |
-        python3 -m json.tool)"
+        python3 -m json.tool --sort-keys)"
 
     local expected
-    expected="$(cat <<EOF | python3 -m json.tool
+    expected="$(cat <<EOF | python3 -m json.tool --sort-keys
 {
     "lockers": [
         {