Skip to content

Timeout completion event implementation #37

@mxxo

Description

@mxxo

I am having some trouble with timeout completion events. We've been checking against the event user data, but I don't think that captures all possible timeouts. Timeouts that expire will return -ETIME, which resultify! maps to an error and exit before we can check is_timeout (source).

For the timeout test in #17 (after setting user_data appropriately), I get

running 1 test
test timeout_test ... FAILED

failures:

---- timeout_test stdout ----
Error: Os { code: 62, kind: Other, message: "Timer expired" }
thread 'timeout_test' panicked at 'assertion failed: `(left == right)`
  left: `1`,
 right: `0`: the test returned a termination value with a non-zero status code (1) which indicates a failure', src/libtest/lib.rs:196:5

Should we perhaps construct a new CompletionQueueEvent using the ETIME information? This seems somewhat linked to #22, as when I tried to change resultify! to handle this case, I started getting segmentation faults, possibly from assume_init on Ok events?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions