Skip to content

Scheduler tests fail on DragonFly BSD #154441

Description

@serhiy-storchaka

Bug report

5 tests in test_os.test_posix fail on DragonFly BSD, because the scheduler API requires privileges there, even for the calling process:

ERROR: test_get_and_set_scheduler_and_param (test.test_os.test_posix.PosixTester)
    mine = posix.sched_getscheduler(0)
PermissionError: [Errno 1] Operation not permitted

The tests are already skipped when the API is present but does not work, but only for ENOSYS, added in gh-78831 for musl:

    try:
        posix.sched_getscheduler(0)
    except OSError as e:
        if e.errno == errno.ENOSYS:
            return False
    return True

EPERM should be handled the same way. Note that other errors are silently ignored here and the API is reported as supported.

test_sched_rr_get_interval fails likewise, and it is the only scheduler test which is not decorated with @requires_sched.

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