MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / test_io_uring_register_with

Function test_io_uring_register_with

tests/io_uring/register.rs:107–122  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105
106#[test]
107fn test_io_uring_register_with() {
108 let mut params = io_uring_params::default();
109 let ring_fd = unsafe { io_uring_setup(4, &mut params).unwrap() };
110 assert_eq!(params.sq_entries, 4);
111 assert_eq!(params.cq_entries, 8);
112
113 if !params.features.contains(IoringFeatureFlags::REG_REG_RING) {
114 // Kernel does not support `io_uring_register` with a registered ring fd
115 return;
116 }
117
118 let ring_fd = register_ring(ring_fd.as_fd()).unwrap();
119 let register_result = register_iowq_max_workers(ring_fd);
120 unregister_ring(ring_fd).unwrap();
121 register_result.unwrap();
122}
123
124#[cfg(feature = "mm")]
125#[test]

Callers

nothing calls this directly

Calls 6

register_ringFunction · 0.85
unregister_ringFunction · 0.85
containsMethod · 0.80
io_uring_setupFunction · 0.50
as_fdMethod · 0.45

Tested by

no test coverage detected