From a135bf81b156f77299e9683d4c1b88a3fa8eee8e Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 22 Jan 2020 10:49:00 +0800 Subject: [PATCH] test/librados: use GTEST_SKIP() to skip test the output would look like ``` [ SKIPPED ] SkipTest.DoesSkip (0 ms) ``` easier for tester/developer to review the test result. Signed-off-by: Kefu Chai --- src/test/librados/tier_cxx.cc | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/test/librados/tier_cxx.cc b/src/test/librados/tier_cxx.cc index a9f4e490c654e..42c03c278e92e 100644 --- a/src/test/librados/tier_cxx.cc +++ b/src/test/librados/tier_cxx.cc @@ -2979,8 +2979,7 @@ TEST_F(LibRadosTwoPoolsPP, SetRedirectRead) { TEST_F(LibRadosTwoPoolsPP, SetChunkRead) { // skip test if not yet mimic if (_get_required_osd_release(cluster) < "mimic") { - cout << "cluster is not yet mimic, skipping test" << std::endl; - return; + GTEST_SKIP() << "cluster is not yet mimic, skipping test"; } // create object @@ -3050,8 +3049,7 @@ TEST_F(LibRadosTwoPoolsPP, SetChunkRead) { TEST_F(LibRadosTwoPoolsPP, ManifestPromoteRead) { // skip test if not yet mimic if (_get_required_osd_release(cluster) < "mimic") { - cout << "cluster is not yet mimic, skipping test" << std::endl; - return; + GTEST_SKIP() << "cluster is not yet mimic, skipping test"; } // create object @@ -3247,8 +3245,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestRefRead) { TEST_F(LibRadosTwoPoolsPP, ManifestUnset) { // skip test if not yet nautilus if (_get_required_osd_release(cluster) < "nautilus") { - cout << "cluster is not yet nautilus, skipping test" << std::endl; - return; + GTEST_SKIP() << "cluster is not yet nautilus, skipping test"; } // create object @@ -3391,8 +3388,7 @@ using ceph::crypto::SHA1; TEST_F(LibRadosTwoPoolsPP, ManifestDedupRefRead) { // skip test if not yet nautilus if (_get_required_osd_release(cluster) < "nautilus") { - cout << "cluster is not yet nautilus, skipping test" << std::endl; - return; + GTEST_SKIP() << "cluster is not yet nautilus, skipping test"; } bufferlist inbl; @@ -3519,8 +3515,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestDedupRefRead) { TEST_F(LibRadosTwoPoolsPP, ManifestFlushRead) { // skip test if not yet octopus if (_get_required_osd_release(cluster) < "octopus") { - cout << "cluster is not yet octopus, skipping test" << std::endl; - return; + GTEST_SKIP() << "cluster is not yet octopus, skipping test"; } // create object -- 2.39.5