Skip to content

Commit

Permalink
test.os: removed io_uring_submit & io_uring_wait_cqe and using
Browse files Browse the repository at this point in the history
`io_uring_submit_and_wait_timeout`. Was submitting `2 `entries but only
waiting for `1` to complete! now it waits for both to finish.
  • Loading branch information
YoSTEALTH committed Mar 6, 2024
1 parent 16d8dcd commit 721c4ac
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/os/unlink_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ def test_unlink(tmp_dir, ring, cqe):
liburing.io_uring_prep_unlink(sqe, dir_path, liburing.AT_REMOVEDIR)
sqe.user_data = 2

assert liburing.io_uring_submit(ring) == 2
assert liburing.io_uring_wait_cqe(ring, cqe) == 0
assert liburing.io_uring_submit_and_wait_timeout(ring, cqe, 2) == 2

for i in range(2):
assert liburing.trap_error(cqe[i].res) == 0
Expand Down Expand Up @@ -60,8 +59,7 @@ def test_unlinkat(tmp_dir, ring, cqe):
liburing.io_uring_prep_unlinkat(sqe, dir_path, liburing.AT_REMOVEDIR)
sqe.user_data = 2

assert liburing.io_uring_submit(ring) == 2
assert liburing.io_uring_wait_cqe(ring, cqe) == 0
assert liburing.io_uring_submit_and_wait_timeout(ring, cqe, 2) == 2

for i in range(2):
assert liburing.trap_error(cqe[i].res) == 0
Expand Down

0 comments on commit 721c4ac

Please sign in to comment.