Add mocks for blockstore integration tests: timerfd, ring_loop_mock_t and disk_mock_t

This commit is contained in:
Vitaliy Filippov
2025-11-23 19:08:23 +03:00
parent c5c332cb9a
commit 92a0942cd6
10 changed files with 401 additions and 36 deletions
+3 -1
View File
@@ -19,11 +19,12 @@ struct timerfd_timer_t
class __attribute__((visibility("default"))) timerfd_manager_t
{
int wait_state = 0;
int timerfd;
int timerfd = -1;
int nearest = -1;
int id = 1;
int onstack = 0;
std::vector<timerfd_timer_t> timers;
timespec cur = {};
void inc_timer(timerfd_timer_t & t);
void set_nearest(bool trigger_inline);
@@ -37,4 +38,5 @@ public:
int set_timer(uint64_t millis, bool repeat, std::function<void(int)> callback);
int set_timer_us(uint64_t micros, bool repeat, std::function<void(int)> callback);
void clear_timer(int timer_id);
void tick(timespec passed);
};