]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librbd: print difference if deep-copy or migration test fails 38395/head
authorMykola Golub <mgolub@suse.com>
Wed, 2 Dec 2020 09:41:13 +0000 (09:41 +0000)
committerMykola Golub <mgolub@suse.com>
Wed, 2 Dec 2020 09:41:13 +0000 (09:41 +0000)
It may appear to be useful to track the sporadic test failures
observed on jenkins, not reproducible locally.

Previously it was disabled because the output could be too
large. But after the hexdump was improved to skip repeating bytes
the output will hopefully be much smaller.

Signed-off-by: Mykola Golub <mgolub@suse.com>
src/test/librbd/test_DeepCopy.cc
src/test/librbd/test_Migration.cc

index 9f75089598a188e5c6d64e07110da93b6f268902..741a5d54485800514181bf06eafa7dd33c9a612d 100644 (file)
@@ -122,8 +122,8 @@ struct TestDeepCopy : public TestFixture {
           std::cout << "snap: " << (src_snap_name ? src_snap_name : "null")
                     << ", block " << offset << "~" << read_size << " differs"
                     << std::endl;
-          // std::cout << "src block: " << std::endl; src_bl.hexdump(std::cout);
-          // std::cout << "dst block: " << std::endl; dst_bl.hexdump(std::cout);
+          std::cout << "src block: " << std::endl; src_bl.hexdump(std::cout);
+          std::cout << "dst block: " << std::endl; dst_bl.hexdump(std::cout);
         }
         EXPECT_TRUE(src_bl.contents_equal(dst_bl));
         offset += read_size;
index 5410eab553e08c25beb0790a957f4530cac3eaaf..5f96d620e26048ee96e77bf1f6ae58a048cc2d9b 100644 (file)
@@ -144,11 +144,8 @@ struct TestMigration : public TestFixture {
         std::cout << description
                   << ", block " << offset << "~" << read_size << " differs"
                   << std::endl;
-        char *c = getenv("TEST_RBD_MIGRATION_VERBOSE");
-        if (c != NULL && *c != '\0') {
-          std::cout << "src block: " << src_ictx->id << ": " << std::endl; src_bl.hexdump(std::cout);
-          std::cout << "dst block: " << dst_ictx->id << ": " << std::endl; dst_bl.hexdump(std::cout);
-        }
+        std::cout << "src block: " << src_ictx->id << ": " << std::endl; src_bl.hexdump(std::cout);
+        std::cout << "dst block: " << dst_ictx->id << ": " << std::endl; dst_bl.hexdump(std::cout);
       }
       EXPECT_TRUE(src_bl.contents_equal(dst_bl));
       offset += read_size;