]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
librbd: Do not instantiate TrimRequest template class
authorBoris Ranto <branto@redhat.com>
Thu, 7 Dec 2017 23:21:38 +0000 (00:21 +0100)
committerBoris Ranto <branto@redhat.com>
Tue, 12 Dec 2017 00:08:04 +0000 (01:08 +0100)
We include TrimRequest.cc in librbd tests at two places:
 - operation/test_mock_TrimRequest.cc
 - operation/test_mock_ResizeRequest.cc

That causes linking errors when doing the builds because some of the
instantiated classes are defined twice.

We can fix this by not instantiating the template class in the
TrimReqeust.cc file when including it in the tests.

Signed-off-by: Boris Ranto <branto@redhat.com>
src/test/librbd/operation/test_mock_ResizeRequest.cc

index e67f8a2a8321aefd5832a41acdf626509b0062b3..7b70a50e8f48f9a314cb6380094fd6e89a62a2f7 100644 (file)
@@ -44,7 +44,6 @@ TrimRequest<MockImageCtx> *TrimRequest<MockImageCtx>::s_instance = nullptr;
 
 // template definitions
 #include "librbd/operation/ResizeRequest.cc"
-#include "librbd/operation/TrimRequest.cc"
 
 namespace librbd {
 namespace operation {