Skip to content

test/librbd: use GTEST_SKIP macro to skip tests - #51264

Merged
idryomov merged 1 commit into
ceph:mainfrom
idryomov:wip-rbd-gtest-skip
May 2, 2023
Merged

idryomov merged 1 commit into
ceph:mainfrom
idryomov:wip-rbd-gtest-skip

Conversation

@idryomov

Copy link
Copy Markdown
Contributor

The use of SUCCEED macro predates the introduction of GTEST_SKIP macro to GTest 1.10. Having skipped tests reported as passed is misleading!

Before:

[ RUN ] TestMockOperationSnapshotRemoveRequest.FlattenedCloneRemovesChild
SKIPPING
[ OK ] TestMockOperationSnapshotRemoveRequest.FlattenedCloneRemovesChild (9 ms)
...
[ RUN ] TestMockOperationSnapshotRemoveRequest.RemoveChildError
SKIPPING
[ OK ] TestMockOperationSnapshotRemoveRequest.RemoveChildError (112 ms)
...
[ PASSED ] 16 tests.

After:

[ RUN ] TestMockOperationSnapshotRemoveRequest.FlattenedCloneRemovesChild
../src/test/librbd/operation/test_mock_SnapshotRemoveRequest.cc:381: Skipped
Skipping due to unmet REQUIRE
[ SKIPPED ] TestMockOperationSnapshotRemoveRequest.FlattenedCloneRemovesChild (9 ms)
...
[ RUN ] TestMockOperationSnapshotRemoveRequest.RemoveChildError
../src/test/librbd/operation/test_mock_SnapshotRemoveRequest.cc:727: Skipped
Skipping due to enabled deep-flatten
[ SKIPPED ] TestMockOperationSnapshotRemoveRequest.RemoveChildError (111 ms)
...
[ PASSED ] 14 tests.
[ SKIPPED ] 2 tests, listed below:
[ SKIPPED ] TestMockOperationSnapshotRemoveRequest.FlattenedCloneRemovesChild
[ SKIPPED ] TestMockOperationSnapshotRemoveRequest.RemoveChildError

Contribution Guidelines

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

The use of SUCCEED macro predates the introduction of GTEST_SKIP macro
to GTest 1.10.  Having skipped tests reported as passed is misleading!

Before:

[ RUN      ] TestMockOperationSnapshotRemoveRequest.FlattenedCloneRemovesChild
SKIPPING
[       OK ] TestMockOperationSnapshotRemoveRequest.FlattenedCloneRemovesChild (9 ms)
...
[ RUN      ] TestMockOperationSnapshotRemoveRequest.RemoveChildError
SKIPPING
[       OK ] TestMockOperationSnapshotRemoveRequest.RemoveChildError (112 ms)
...
[  PASSED  ] 16 tests.

After:

[ RUN      ] TestMockOperationSnapshotRemoveRequest.FlattenedCloneRemovesChild
../src/test/librbd/operation/test_mock_SnapshotRemoveRequest.cc:381: Skipped
Skipping due to unmet REQUIRE
[  SKIPPED ] TestMockOperationSnapshotRemoveRequest.FlattenedCloneRemovesChild (9 ms)
...
[ RUN      ] TestMockOperationSnapshotRemoveRequest.RemoveChildError
../src/test/librbd/operation/test_mock_SnapshotRemoveRequest.cc:727: Skipped
Skipping due to enabled deep-flatten
[  SKIPPED ] TestMockOperationSnapshotRemoveRequest.RemoveChildError (111 ms)
...
[  PASSED  ] 14 tests.
[  SKIPPED ] 2 tests, listed below:
[  SKIPPED ] TestMockOperationSnapshotRemoveRequest.FlattenedCloneRemovesChild
[  SKIPPED ] TestMockOperationSnapshotRemoveRequest.RemoveChildError

Signed-off-by: Ilya Dryomov <[email protected]>

@pkalever pkalever left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@trociny trociny left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The only concern, the log output will be longer now. There seemed to be an issue in the past when the full librbd test log was not available when the test failed and we could not see the actual test failure. This is probably not the problem these days though.

@trociny

trociny commented Apr 27, 2023

Copy link
Copy Markdown
Contributor

This is the problem I mentioned. It seems to be fixed.
https://tracker.ceph.com/issues/43566

@idryomov

idryomov commented May 2, 2023

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@idryomov
idryomov merged commit 6bbd533 into ceph:main May 2, 2023
@idryomov
idryomov deleted the wip-rbd-gtest-skip branch May 2, 2023 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants