laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/36266?usp=email )
Change subject: io_uring: more verbose error messages if io_uring setup fails ......................................................................
io_uring: more verbose error messages if io_uring setup fails
"Assert failed 0 osmo_io_uring.c:94" is rather useless in terms of an error message. Let's improve upon that.
Change-Id: I0ac9ae59e99c3704b3ce33919c9e7d11024476e3 --- M src/core/osmo_io_uring.c 1 file changed, 14 insertions(+), 2 deletions(-)
Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified
diff --git a/src/core/osmo_io_uring.c b/src/core/osmo_io_uring.c index b174b22..7c9593e 100644 --- a/src/core/osmo_io_uring.c +++ b/src/core/osmo_io_uring.c @@ -91,12 +91,12 @@ int rc; rc = io_uring_queue_init(IOFD_URING_ENTRIES, &g_ring.ring, 0); if (rc < 0) - OSMO_ASSERT(0); + osmo_panic("failure during io_uring_queue_init(): %s\n", strerror(-rc));
rc = eventfd(0, 0); if (rc < 0) { io_uring_queue_exit(&g_ring.ring); - OSMO_ASSERT(0); + osmo_panic("failure creating eventfd(0, 0) for io_uring: %s\n", strerror(-rc)); }
osmo_fd_setup(&g_ring.event_ofd, rc, OSMO_FD_READ, iofd_uring_poll_cb, &g_ring.ring, 0);