Skip to content

Invalid CHMOD in tests/async/tioselectors #12119

@euantorano

Description

@euantorano

The test async/tioselectors contains the following code:

# chmod testDirectory to 0777
chmodPath(testDirectory, 0x1FF)

0x1FF is 511 decimal and it seems that's what's passed in to posix.chmod, resulting in the following test failure on OpenBSD:

FAIL: tests/async/tioselectors.nim C
Test "tests/async/tioselectors.nim" in category "async"
Failure: reExitcodesDiffer
Expected:
exitcode: 0
Gotten:
mexitcode: 1

Output:
tioselectors.nim(471)    tioselectors
tioselectors.nim(324)    vnode_test
tioselectors.nim(264)    chmodPath
fatal.nim(48)            sysFatal
Error: unhandled exception: value out of range: 511 [RangeError]

I'm not sure if I should just change the code to pass 777? If so, there's at least one other place in the same tets that seems suspicious: https://github.com/nim-lang/Nim/blob/devel/tests/async/tioselectors.nim#L381

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