From 44b26b3b501968e3100525695402cbfe4470d1bc Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Sun, 6 Jul 2025 16:56:15 -0400 Subject: [PATCH] integration-test: use only readable interest --- test/integration-test/src/tests/ring_buf.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/integration-test/src/tests/ring_buf.rs b/test/integration-test/src/tests/ring_buf.rs index ba11e489..bddd633e 100644 --- a/test/integration-test/src/tests/ring_buf.rs +++ b/test/integration-test/src/tests/ring_buf.rs @@ -20,7 +20,7 @@ use aya_obj::generated::BPF_RINGBUF_HDR_SZ; use integration_common::ring_buf::Registers; use rand::Rng as _; use test_log::test; -use tokio::io::unix::AsyncFd; +use tokio::io::{Interest, unix::AsyncFd}; struct RingBufTest { _bpf: Ebpf, @@ -160,7 +160,7 @@ async fn ring_buf_async_with_drops() { data, ) = WithData::new(RING_BUF_MAX_ENTRIES * 8); - let mut async_fd = AsyncFd::new(ring_buf).unwrap(); + let mut async_fd = AsyncFd::with_interest(ring_buf, Interest::READABLE).unwrap(); // Spawn the writer which internally will spawn many parallel writers. // Construct an AsyncFd from the RingBuf in order to receive readiness notifications. @@ -278,7 +278,7 @@ async fn ring_buf_async_no_drop() { }; // Construct an AsyncFd from the RingBuf in order to receive readiness notifications. - let mut async_fd = AsyncFd::new(ring_buf).unwrap(); + let mut async_fd = AsyncFd::with_interest(ring_buf, Interest::READABLE).unwrap(); // Note that unlike in the synchronous case where all of the entries are written before any of // them are read, in this case we expect all of the entries to make their way to userspace // because entries are being consumed as they are produced. @@ -359,7 +359,7 @@ async fn ring_buf_asyncfd_events() { _bpf, } = RingBufTest::new(); - let mut async_fd = AsyncFd::new(ring_buf).unwrap(); + let mut async_fd = AsyncFd::with_interest(ring_buf, Interest::READABLE).unwrap(); let mut total_events = 0; let writer = WriterThread::spawn(); while total_events < WriterThread::NUM_MESSAGES {