]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librbd/test_librbd.cc: set *features even if RBD_FEATURES is unset 14965/head
authorDan Mick <dan.mick@redhat.com>
Fri, 5 May 2017 03:15:58 +0000 (20:15 -0700)
committerDan Mick <dan.mick@redhat.com>
Fri, 5 May 2017 03:15:58 +0000 (20:15 -0700)
If RBD_FEATURES is not in the environment, set *features to 0 in
get_features(); callers rely on a valid return value.  (This was
breaking on arm64.)

Fixes: http://tracker.ceph.com/issues/19865
Signed-off-by: Dan Mick <dan.mick@redhat.com>
src/test/librbd/test_librbd.cc

index edda51c77b4a97330753ca28e487af82664fb3c7..f16fbcca2a9a0b89158e758bb963e10208e3d488 100644 (file)
@@ -84,6 +84,7 @@ static int get_features(bool *old_format, uint64_t *features)
     cout << "using new format!" << std::endl;
   } else {
     *old_format = true;
+    *features = 0;
     cout << "using old format" << std::endl;
   }