]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librbd: treat empty features environment variable as old format
authorJason Dillaman <dillaman@redhat.com>
Wed, 17 Jan 2018 18:44:24 +0000 (13:44 -0500)
committerJason Dillaman <dillaman@redhat.com>
Fri, 26 Jan 2018 15:32:40 +0000 (10:32 -0500)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/test/librbd/test_librbd.cc

index 7d019b4333f411f0f988149dd187c4e15cd463a6..f9dd645a9427fad1382a5ee54b8239c303b88a8c 100644 (file)
@@ -70,7 +70,7 @@ void register_test_librbd() {
 static int get_features(bool *old_format, uint64_t *features)
 {
   const char *c = getenv("RBD_FEATURES");
-  if (c) {
+  if (c && strlen(c) > 0) {
     stringstream ss;
     ss << c;
     ss >> *features;