Skip to content

test_epoll fails on Solaris #154379

Description

@serhiy-storchaka

Bug report

test_epoll fails on Solaris with 4 failures, caused by two non-portable assumptions.

  1. A non-blocking connect() is assumed to fail. _connected_pair() requires EINPROGRESS, but it is only returned if the connection cannot be established immediately, and over the loopback Solaris establishes it at once. This affects test_add, test_control_and_wait, test_fromfd and test_unregister_closed:

    AssertionError: Connect should have raised EINPROGRESS
    
  2. Unregistering a closed file descriptor is assumed to fail with EBADF. On Solaris it succeeds, so test_unregister_closed fails with AssertionError: OSError not raised. The descriptor is really closed (the peer reads EOF), but removing it from the epoll set still succeeds. On Linux closing a descriptor removes it from the set, so the later removal fails.

The assertion cannot be relaxed: it is the point of gh-83420, select.epoll.unregister() no longer ignores EBADF since 3.9. Solaris has no error to report, so the test can only be skipped there.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixes3.15pre-release feature fixes, bugs and security fixes3.16new features, bugs and security fixesOS-unsupportedtestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions