Commit 02c80c5d authored by Dan Melnic's avatar Dan Melnic Committed by Facebook GitHub Bot

Add io_uring SQ/CQ poll tests

Summary: Add io_uring SQ/CQ poll tests

Reviewed By: yfeldblum

Differential Revision: D26387632

fbshipit-source-id: 2b68fa4f9af41b76b90183a010f81a92537a6e3f
parent 3a5deaca
......@@ -1100,6 +1100,25 @@ struct IoUringPollCQBackendProvider {
}
};
// SQ/CQ polling
struct IoUringPollSQCQBackendProvider {
static std::unique_ptr<folly::EventBaseBackendBase> getBackend() {
try {
folly::PollIoBackend::Options options;
options.setCapacity(kCapacity)
.setMaxSubmit(kMaxSubmit)
.setMaxGet(kMaxGet)
.setUseRegisteredFds(false)
.setFlags(
folly::PollIoBackend::Options::Flags::POLL_SQ |
folly::PollIoBackend::Options::Flags::POLL_CQ);
return std::make_unique<folly::IoUringBackend>(options);
} catch (const IoUringBackend::NotAvailable&) {
return nullptr;
}
}
};
// Instantiate the non registered fd tests
INSTANTIATE_TYPED_TEST_CASE_P(IoUring, EventBaseTest, IoUringBackendProvider);
INSTANTIATE_TYPED_TEST_CASE_P(IoUring, EventBaseTest1, IoUringBackendProvider);
......@@ -1115,5 +1134,11 @@ INSTANTIATE_TYPED_TEST_CASE_P(
IoUringPollCQ, EventBaseTest, IoUringPollCQBackendProvider);
INSTANTIATE_TYPED_TEST_CASE_P(
IoUringPollCQ, EventBaseTest1, IoUringPollCQBackendProvider);
// Instantiate the poll SQ/CQ tests
INSTANTIATE_TYPED_TEST_CASE_P(
IoUringPollSQCQ, EventBaseTest, IoUringPollCQBackendProvider);
INSTANTIATE_TYPED_TEST_CASE_P(
IoUringPollSQCQ, EventBaseTest1, IoUringPollCQBackendProvider);
} // namespace test
} // namespace folly
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment