Add a regression test for the last 2 fixed bugs

This commit is contained in:
Vitaliy Filippov
2026-06-20 11:18:09 +03:00
parent b6eb8f2055
commit fbffec5abb
3 changed files with 91 additions and 3 deletions
+6 -1
View File
@@ -72,7 +72,7 @@ int ring_loop_mock_t::register_eventfd()
io_uring_sqe* ring_loop_mock_t::get_sqe()
{
if (free_ring_datas.size() == 0)
if (free_ring_datas.size() == 0 || is_full && is_full())
{
return NULL;
}
@@ -399,3 +399,8 @@ bool disk_mock_t::submit(io_uring_sqe *sqe)
// 3) when fsync is enabled, write cache should be sometimes lost during a simulated power outage
return true;
}
void ring_loop_mock_t::set_fake_full(std::function<bool()> is_full)
{
this->is_full = is_full;
}