]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test/librbd/crypto: Fixup include order to prevent implicit definitions
authorWillem Jan Withagen <wjw@digiware.nl>
Sat, 14 Nov 2020 17:11:05 +0000 (18:11 +0100)
committerWillem Jan Withagen <wjw@digiware.nl>
Sat, 14 Nov 2020 17:11:05 +0000 (18:11 +0100)
Clang complains a lot, part of it:
```
/home/jenkins/workspace/ceph-master-compile/src/test/librbd/crypto/test_mock_CryptoObjectDispatch.cc:35:8: error: explicit specialization of 'librbd::io::CopyupRequest<librbd::MockImageCtx>' after instantiation
struct CopyupRequest<librbd::MockImageCtx> {
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jenkins/workspace/ceph-master-compile/src/librbd/io/ObjectRequest.cc:560:10: note: implicit instantiation first required here
  if (it == image_ctx->copyup_list.end()) {
         ^
/home/jenkins/workspace/ceph-master-compile/src/test/librbd/crypto/test_mock_CryptoObjectDispatch.cc:54:32: error: template specialization requires 'template<>'
        librbd::MockImageCtx>::s_instance = nullptr;
```

fixes: https://github.com/ceph/ceph/pull/37916
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/test/librbd/crypto/test_mock_CryptoObjectDispatch.cc

index 805a83d75bda1ebd1494c44e8dace4014a871aea..cfcd92e518482ec3b3178246bda3d0610a017813 100644 (file)
@@ -15,9 +15,9 @@ template bool librbd::io::util::trigger_copyup(
         MockImageCtx *image_ctx, uint64_t object_no, IOContext io_context,
         Context* on_finish);
 
-#include "librbd/io/ObjectRequest.cc"
 template class librbd::io::ObjectWriteRequest<librbd::MockImageCtx>;
 template class librbd::io::AbstractObjectWriteRequest<librbd::MockImageCtx>;
+#include "librbd/io/ObjectRequest.cc"
 
 namespace librbd {