35 operator new(std::size_t
size)
38 throw std::bad_alloc();
44 operator delete(
void *ptr, std::size_t
size)
throw()
51 operator delete(
void *ptr)
throw()
53 operator delete(ptr, std::size_t(0));
59 for (
auto i = 0U; i < num; i++)
66 debug_ring_ut::test_get_drr_invalid_drr()
72 debug_ring_ut::test_get_drr_invalid_vcpuid()
78 debug_ring_ut::test_constructor_out_of_memory()
86 debug_ring_ut::test_write_out_of_memory()
95 debug_ring_ut::test_read_with_invalid_drr()
101 debug_ring_ut::test_read_with_null_string()
110 debug_ring_ut::test_read_with_zero_length()
119 debug_ring_ut::test_write_with_zero_length()
124 auto zero_len_wb =
"";
130 debug_ring_ut::test_write_string_to_dr_that_is_larger_than_dr()
141 debug_ring_ut::test_write_string_to_dr_that_is_much_larger_than_dr()
152 debug_ring_ut::test_write_one_small_string_to_dr()
157 auto small_wb =
"01234";
164 debug_ring_ut::test_fill_dr()
177 debug_ring_ut::test_overcommit_dr()
193 debug_ring_ut::test_overcommit_dr_more_than_once()
212 debug_ring_ut::test_read_with_empty_dr()
221 debug_ring_ut::acceptance_test_stress()
226 auto small_wb =
"012";
229 dr.
write(static_cast<const char *>(small_wb));
235 auto num = DEBUG_RING_SIZE / (strlen(static_cast<const char *>(small_wb)) + 1);
236 auto total = num * strlen(static_cast<const char *>(small_wb));
char wb[DEBUG_RING_SIZE+100]
int64_t get_drr(uint64_t vcpuid, struct debug_ring_resources_t **drr)
#define expect_no_exception(f)
void * malloc(size_t size)
virtual void write(const std::string &str) noexcept
void init_wb(uint64_t num, char val='A')
uint64_t debug_ring_read(struct debug_ring_resources_t *drr, char *str, uint64_t len)
debug_ring_resources_t * drr
constexpr const auto size