Skip to content

Conditionalize pipe(2) usage for WASI #698

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
kateinoigakukun opened this issue Sep 17, 2024 · 0 comments · Fixed by #699
Closed

Conditionalize pipe(2) usage for WASI #698

kateinoigakukun opened this issue Sep 17, 2024 · 0 comments · Fixed by #699
Assignees
Labels
bug 🪲 Something isn't working wasi/wasm 🧭 WebAssembly support

Comments

@kateinoigakukun
Copy link
Member

Description

WASI does not have pipe system call, and wasi-libc doesn't provide any stub for it. So WASI build started failing after #694.

/home/build-user/swift-testing/Sources/Testing/Support/FileHandle.swift:449:20: error: cannot find 'pipe' in scope
447 |         }
448 | #else
449 |         guard 0 == pipe(fds.baseAddress) else {
    |                    `- error: cannot find 'pipe' in scope
450 |           throw CError(rawValue: swt_errno())
451 |         }

https://ci.swift.org/job/oss-swift-pr-test-crosscompile-wasm-ubuntu-20_04/1525/console

Expected behavior

Conditionalize the use of pipe(2) by something like SWT_NO_PIPE in swift-testing side.

Actual behavior

No response

Steps to reproduce

No response

swift-testing version/commit hash

No response

Swift & OS version (output of swift --version ; uname -a)

No response

@kateinoigakukun kateinoigakukun added the bug 🪲 Something isn't working label Sep 17, 2024
@kateinoigakukun kateinoigakukun mentioned this issue Sep 17, 2024
2 tasks
grynspan added a commit that referenced this issue Sep 17, 2024
WASI does not support pipes.

Resolves #698.
@grynspan grynspan added the wasi/wasm 🧭 WebAssembly support label Sep 17, 2024
@grynspan grynspan self-assigned this Sep 17, 2024
grynspan added a commit that referenced this issue Sep 17, 2024
WASI does not support pipes.

Resolves #698.

### Checklist:

- [x] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [x] If public symbols are renamed or modified, DocC references should
be updated.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug 🪲 Something isn't working wasi/wasm 🧭 WebAssembly support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants