#include "src/tracing/core/shared_memory_arbiter_impl.h"
#include <bitset>
#include "perfetto/ext/base/utils.h"
#include "perfetto/ext/tracing/core/basic_types.h"
#include "perfetto/ext/tracing/core/commit_data_request.h"
#include "perfetto/ext/tracing/core/shared_memory_abi.h"
#include "perfetto/ext/tracing/core/trace_packet.h"
#include "perfetto/ext/tracing/core/trace_writer.h"
#include "perfetto/ext/tracing/core/tracing_service.h"
#include "src/base/test/gtest_test_suite.h"
#include "src/base/test/test_task_runner.h"
#include "src/tracing/core/in_process_shared_memory.h"
#include "src/tracing/core/patch_list.h"
#include "src/tracing/test/aligned_buffer_test.h"
#include "src/tracing/test/mock_producer_endpoint.h"
#include "test/gtest_and_gmock.h"
#include "protos/perfetto/trace/test_event.pbzero.h"
#include "protos/perfetto/trace/trace_packet.pbzero.h"
namespace perfetto {
_;
Between;
Invoke;
Mock;
NiceMock;
UnorderedElementsAreArray;
ShmemMode;
class SharedMemoryArbiterImplTest : public AlignedBufferTest { … };
size_t const kPageSizes[] = …;
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(SharedMemoryArbiterImplTest, GetAndReturnChunks) { … }
TEST_P(SharedMemoryArbiterImplTest, BatchCommits) { … }
TEST_P(SharedMemoryArbiterImplTest, UseShmemEmulation) { … }
TEST_P(SharedMemoryArbiterImplTest, WriterIDsAllocation) { … }
TEST_P(SharedMemoryArbiterImplTest, Shutdown) { … }
TEST_P(SharedMemoryArbiterImplTest, BufferExhaustedPolicyDrop) { … }
TEST_P(SharedMemoryArbiterImplTest, CreateUnboundAndBind) { … }
enum class InitialBindingState { … };
class SharedMemoryArbiterImplStartupTracingTest
: public SharedMemoryArbiterImplTest { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(SharedMemoryArbiterImplStartupTracingTest, StartupTracingUnbound) { … }
TEST_P(SharedMemoryArbiterImplStartupTracingTest, StartupTracingBound) { … }
TEST_P(SharedMemoryArbiterImplStartupTracingTest,
AbortStartupTracingForReservationUnbound) { … }
TEST_P(SharedMemoryArbiterImplStartupTracingTest,
AbortStartupTracingForReservationBound) { … }
}