New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rbd: fix template specialization of PromoteRequest class #12815

Merged
merged 1 commit into from Jan 10, 2017

Conversation

Projects
None yet
2 participants
@rjfd
Contributor

rjfd commented Jan 6, 2017

I was getting build failures due to the linker not finding the template specialization of PromoteRequest class in the test_mock_journal.cc unit test.

Signed-off-by: Ricardo Dias rdias@suse.com

@rjfd rjfd added bug fix rbd labels Jan 6, 2017

@@ -186,6 +186,10 @@ OpenRequest<MockJournalImageCtx> *OpenRequest<MockJournalImageCtx>::s_instance =
} // namespace librbd
// template definitions
#include "librbd/journal/PromoteRequest.cc"
template class librbd::journal::PromoteRequest<librbd::MockJournalImageCtx>;

This comment has been minimized.

@dillaman

dillaman Jan 6, 2017

Contributor

Nit: this shouldn't be required (I have another PR to remove all of these) since it just leads to annoying compiler warnings about unused functions

This comment has been minimized.

@dillaman

dillaman Jan 6, 2017

Contributor

... actually, never mind -- you should just provide a dummy (specialized) version above like the other classes since we only want to include the code definitions for the unit under test

@rjfd

This comment has been minimized.

Contributor

rjfd commented Jan 9, 2017

@dillaman pushed new changes

@dillaman

This comment has been minimized.

Contributor

dillaman commented Jan 9, 2017

@rjfd Can you merge those two classes -- there shouldn't be the need for the indirection

rbd: fix template specialization of PromoteRequest class
Signed-off-by: Ricardo Dias <rdias@suse.com>
@rjfd

This comment has been minimized.

Contributor

rjfd commented Jan 9, 2017

@dillaman done

@dillaman

lgtm

@dillaman dillaman merged commit 0dd25f2 into ceph:master Jan 10, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details

@rjfd rjfd deleted the rjfd:wip-journal-unittest-build-error branch Jan 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment