MCPcopy Create free account
hub / github.com/axboe/liburing / test_bad_reg

Function test_bad_reg

test/buf-ring.c:185–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183}
184
185static int test_bad_reg(int bgid)
186{
187 struct io_uring ring;
188 int ret;
189 struct io_uring_buf_reg reg = { };
190
191 ret = t_create_ring(1, &ring, 0);
192 if (ret == T_SETUP_SKIP)
193 return 0;
194 else if (ret != T_SETUP_OK)
195 return 1;
196
197 reg.ring_addr = 4096;
198 reg.ring_entries = 32;
199 reg.bgid = bgid;
200
201 ret = io_uring_register_buf_ring(&ring, &reg, 0);
202 if (!ret)
203 fprintf(stderr, "Buffer ring register worked unexpectedly\n");
204
205 io_uring_queue_exit(&ring);
206 return !ret;
207}
208
209static int test_full_page_reg(int bgid)
210{

Callers 1

mainFunction · 0.85

Calls 3

t_create_ringFunction · 0.85
io_uring_queue_exitFunction · 0.85

Tested by

no test coverage detected