Skip to content

Commit

Permalink
Merge pull request ceph#60992 from MaxKellermann/test__includes
Browse files Browse the repository at this point in the history
test: add missing includes

Reviewed-by: Casey Bodley <[email protected]>
  • Loading branch information
cbodley authored Dec 10, 2024
2 parents d03901b + 1bd5571 commit 41ebce3
Show file tree
Hide file tree
Showing 60 changed files with 103 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/test/bench_log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "common/config.h"
#include "common/ceph_argparse.h"
#include "global/global_init.h"
#include "log/Log.h"

#define dout_context g_ceph_context

Expand Down
1 change: 1 addition & 0 deletions src/test/client/TestClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "msg/Messenger.h"
#include "mon/MonClient.h"
#include "osdc/ObjectCacher.h"
#include "osdc/Objecter.h"
#include "client/MetaRequest.h"
#include "client/Client.h"
#include "messages/MClientReclaim.h"
Expand Down
1 change: 1 addition & 0 deletions src/test/cls_rgw/test_cls_rgw_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "common/dout.h"
#include "common/errno.h"
#include "common/random_string.h"
#include "include/random.h" // for ceph::util::generate_random_number()
#include "global/global_context.h"
#include "test/librados/test_cxx.h"

Expand Down
1 change: 1 addition & 0 deletions src/test/common/test_async_shared_mutex.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "common/async/shared_mutex.h"
#include <future>
#include <optional>
#include <shared_mutex> // for std::shared_lock
#include <boost/asio/bind_executor.hpp>
#include <boost/asio/io_context.hpp>
#include <gtest/gtest.h>
Expand Down
2 changes: 2 additions & 0 deletions src/test/crimson/test_messenger_thrash.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "crimson/net/Messenger.h"
#include "test/crimson/ctest_utils.h"

#include <boost/random/uniform_int.hpp>

using namespace std::chrono_literals;
namespace bpo = boost::program_options;
using crimson::common::local_conf;
Expand Down
1 change: 1 addition & 0 deletions src/test/crimson/test_monc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "common/ceph_argparse.h"
#include "crimson/common/auth_handler.h"
#include "crimson/common/config_proxy.h"
#include "crimson/common/perf_counters_collection.h"
#include "crimson/mon/MonClient.h"
#include "crimson/net/Connection.h"
#include "crimson/net/Messenger.h"
Expand Down
7 changes: 7 additions & 0 deletions src/test/fio/fio_ceph_objectstore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#include "os/ObjectStore.h"
#include "global/global_init.h"
#include "common/debug.h"
#include "common/errno.h"
#include "include/intarith.h"
#include "include/stringify.h"
Expand All @@ -29,6 +30,12 @@
#include "include/ceph_assert.h" // fio.h clobbers our assert.h
#include <algorithm>

#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN)
#include "crimson/common/perf_counters_collection.h"
#else
#include "common/perf_counters_collection.h"
#endif

#define dout_context g_ceph_context
#define dout_subsys ceph_subsys_

Expand Down
2 changes: 2 additions & 0 deletions src/test/immutable_object_cache/test_DomainSocket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@

#include "gtest/gtest.h"
#include "include/Context.h"
#include "include/unordered_set.h"
#include "global/global_init.h"
#include "global/global_context.h"

#include "test/immutable_object_cache/test_common.h"
#include "tools/immutable_object_cache/CacheClient.h"
#include "tools/immutable_object_cache/CacheServer.h"

using ceph::unordered_set;
using namespace ceph::immutable_obj_cache;

class TestCommunication :public ::testing::Test {
Expand Down
1 change: 1 addition & 0 deletions src/test/librados/aio_cxx.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <errno.h>
#include <fcntl.h>
#include <deque>
#include <sstream>
#include <string>
#include <utility>
Expand Down
2 changes: 2 additions & 0 deletions src/test/librados/misc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#include "include/scope_guard.h"
#include "include/stringify.h"
#include "common/Checksummer.h"
#include "common/Clock.h" // for ceph_clock_now()
#include "common/config_proxy.h" // for class ConfigProxy
#include "global/global_context.h"
#include "test/librados/test.h"
#include "test/librados/TestCase.h"
Expand Down
1 change: 1 addition & 0 deletions src/test/librados/misc_cxx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "include/scope_guard.h"
#include "include/stringify.h"
#include "common/Checksummer.h"
#include "common/config_proxy.h" // for class ConfigProxy
#include "mds/mdstypes.h"
#include "global/global_context.h"
#include "test/librados/testcase_cxx.h"
Expand Down
1 change: 1 addition & 0 deletions src/test/librados/test_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// vim: ts=8 sw=2 smarttab

#include "common/Formatter.h"
#include "include/ceph_assert.h"
#include "include/stringify.h"
#include "json_spirit/json_spirit.h"
#include "test_common.h"
Expand Down
1 change: 1 addition & 0 deletions src/test/librados_test_stub/TestMemIoCtxImpl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "common/Clock.h"
#include "include/err.h"
#include <functional>
#include <shared_mutex> // for std::shared_lock
#include <boost/algorithm/string/predicate.hpp>
#include <errno.h>
#include <include/compat.h>
Expand Down
1 change: 1 addition & 0 deletions src/test/librados_test_stub/TestMemRadosClient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "test/librados_test_stub/TestMemCluster.h"
#include "test/librados_test_stub/TestMemIoCtxImpl.h"
#include <errno.h>
#include <shared_mutex> // for std::shared_lock
#include <sstream>

namespace librados {
Expand Down
1 change: 1 addition & 0 deletions src/test/librbd/fsx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
#include "include/rados/librados.hpp"
#include "include/rbd/librbd.h"
#include "include/rbd/librbd.hpp"
#include "include/rbd_types.h" // for RBD_DATA_PREFIX
#include "common/Cond.h"
#include "common/SubProcess.h"
#include "common/safe_io.h"
Expand Down
2 changes: 2 additions & 0 deletions src/test/librbd/io/test_mock_ImageRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include "librbd/io/ObjectDispatchSpec.h"
#include "librbd/io/Utils.h"

#include <shared_mutex> // for std::shared_lock

namespace librbd {
namespace {

Expand Down
2 changes: 2 additions & 0 deletions src/test/librbd/journal/test_Replay.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "librbd/io/ReadResult.h"
#include "librbd/journal/Types.h"

#include <shared_mutex> // for std::shared_lock

void register_test_journal_replay() {
}

Expand Down
2 changes: 2 additions & 0 deletions src/test/librbd/mock/MockObjectMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include "librbd/Utils.h"
#include "gmock/gmock.h"

#include <boost/optional/optional_io.hpp>

namespace librbd {

struct MockObjectMap {
Expand Down
2 changes: 2 additions & 0 deletions src/test/librbd/object_map/test_mock_InvalidateRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"

#include <shared_mutex> // for std::shared_lock

namespace librbd {
namespace object_map {

Expand Down
2 changes: 2 additions & 0 deletions src/test/librbd/object_map/test_mock_SnapshotCreateRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"

#include <shared_mutex> // for std::shared_lock

namespace librbd {
namespace object_map {

Expand Down
2 changes: 2 additions & 0 deletions src/test/librbd/object_map/test_mock_SnapshotRemoveRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"

#include <shared_mutex> // for std::shared_lock

namespace librbd {
namespace object_map {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"

#include <shared_mutex> // for std::shared_lock

namespace librbd {
namespace object_map {

Expand Down
2 changes: 2 additions & 0 deletions src/test/librbd/object_map/test_mock_UpdateRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"

#include <shared_mutex> // for std::shared_lock

namespace librbd {
namespace object_map {

Expand Down
2 changes: 2 additions & 0 deletions src/test/librbd/operation/test_mock_DisableFeaturesRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"

#include <shared_mutex> // for std::shared_lock

namespace librbd {

namespace {
Expand Down
2 changes: 2 additions & 0 deletions src/test/librbd/operation/test_mock_EnableFeaturesRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"

#include <shared_mutex> // for std::shared_lock

namespace librbd {

namespace {
Expand Down
2 changes: 2 additions & 0 deletions src/test/librbd/operation/test_mock_Request.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include "librbd/AsyncRequest.h"
#include "librbd/operation/Request.h"

#include <shared_mutex> // for std::shared_lock

namespace librbd {
namespace {

Expand Down
2 changes: 2 additions & 0 deletions src/test/librbd/operation/test_mock_ResizeRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"

#include <shared_mutex> // for std::shared_lock

namespace librbd {

namespace util {
Expand Down
2 changes: 2 additions & 0 deletions src/test/librbd/operation/test_mock_SnapshotCreateRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"

#include <shared_mutex> // for std::shared_lock

namespace librbd {
namespace mirror {
namespace snapshot {
Expand Down
2 changes: 2 additions & 0 deletions src/test/librbd/operation/test_mock_SnapshotProtectRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
// template definitions
#include "librbd/operation/SnapshotProtectRequest.cc"

#include <shared_mutex> // for std::shared_lock

namespace librbd {
namespace operation {

Expand Down
2 changes: 2 additions & 0 deletions src/test/librbd/operation/test_mock_SnapshotRemoveRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"

#include <shared_mutex> // for std::shared_lock

namespace librbd {
namespace image {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"

#include <shared_mutex> // for std::shared_lock

namespace librbd {

namespace {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
// template definitions
#include "librbd/operation/SnapshotUnprotectRequest.cc"

#include <shared_mutex> // for std::shared_lock

namespace librbd {
namespace operation {

Expand Down
2 changes: 2 additions & 0 deletions src/test/librbd/operation/test_mock_TrimRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#include "gtest/gtest.h"
#include <boost/variant.hpp>

#include <shared_mutex> // for std::shared_lock

namespace librbd {
namespace {

Expand Down
2 changes: 2 additions & 0 deletions src/test/librbd/test_DeepCopy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include "librbd/io/ReadResult.h"
#include "test/librados/crimson_utils.h"

#include <shared_mutex> // for std::shared_lock

void register_test_deep_copy() {
}

Expand Down
1 change: 1 addition & 0 deletions src/test/librbd/test_ImageWatcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <iostream>
#include <map>
#include <set>
#include <shared_mutex> // for std::shared_lock
#include <sstream>
#include <vector>

Expand Down
2 changes: 2 additions & 0 deletions src/test/librbd/test_Migration.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include "common/Cond.h"
#include <boost/scope_exit.hpp>

#include <shared_mutex> // for std::shared_lock

void register_test_migration() {
}

Expand Down
2 changes: 2 additions & 0 deletions src/test/librbd/test_ObjectMap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#include <boost/accumulators/statistics/stats.hpp>
#include <boost/accumulators/statistics/rolling_sum.hpp>

#include <shared_mutex> // for std::shared_lock

void register_test_object_map() {
}

Expand Down
1 change: 1 addition & 0 deletions src/test/librbd/test_fixture.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "test/librados/test.h"
#include "test/librados/test_cxx.h"
#include <iostream>
#include <shared_mutex> // for std::shared_lock
#include <sstream>
#include <stdlib.h>

Expand Down
1 change: 1 addition & 0 deletions src/test/librbd/test_internal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <boost/scope_exit.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/assign/list_of.hpp>
#include <shared_mutex> // for std::shared_lock
#include <utility>
#include <vector>
#include "test/librados/crimson_utils.h"
Expand Down
1 change: 1 addition & 0 deletions src/test/librbd/test_mock_ExclusiveLock.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <list>
#include <shared_mutex> // for std::shared_lock
#include <boost/scope_exit.hpp>

namespace librbd {
Expand Down
2 changes: 2 additions & 0 deletions src/test/librbd/test_mock_Journal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "test/librbd/mock/io/MockObjectDispatch.h"
#include "common/Cond.h"
#include "common/ceph_mutex.h"
#include "common/debug.h"
#include "common/WorkQueue.h"
#include "cls/journal/cls_journal_types.h"
#include "journal/Journaler.h"
Expand All @@ -28,6 +29,7 @@
#include "gtest/gtest.h"
#include <functional>
#include <list>
#include <shared_mutex> // for std::shared_lock
#include <boost/scope_exit.hpp>

#define dout_context g_ceph_context
Expand Down
2 changes: 2 additions & 0 deletions src/test/librbd/test_mock_ObjectMap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include "librbd/object_map/UpdateRequest.h"
#include <boost/scope_exit.hpp>

#include <shared_mutex> // for std::shared_lock

namespace librbd {

namespace {
Expand Down
1 change: 1 addition & 0 deletions src/test/mon/PGMap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "mon/PGMap.h"
#include "gtest/gtest.h"

#include "common/TextTable.h"
#include "include/stringify.h"

using namespace std;
Expand Down
Loading

0 comments on commit 41ebce3

Please sign in to comment.