Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Re-enable testing of WASI on CI #3869

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

alexcrichton
Copy link
Member

This commit updates CI to resume testing WASI. This updates the container and testing scripts from historical processes to more modern ones, e.g. downloading wasi-sdk instead of compiling a custom toolchain. This should make it easier to update in the future and keep it in sync with rust-lang/rust as well.

This also required a few minor fixes such as:

  • The S_IFIFO and S_IFMT constants had incorrect values.
  • The CLOCK_* definitions cause ctest2's parsing to panic to they're skipped with a new #[cfg].
  • A new langinfo.h header was added to the list to include.
  • Some historically skipped checks were removed since they're no longer necessary.
  • Checks for __errno_location are disabled since that doesn't actually exist in headers.
  • Checks for select are disabled because the Rust definition got the const-ness swapped for the final timeval argument.

It's intended that this is not a breaking change for existing users. I also wanted to ask, is there a reasonable location that I can record my name for being cc'd for any WASI-related issues? Happy to help out!

This commit updates CI to resume testing WASI. This updates the
container and testing scripts from historical processes to more modern
ones, e.g. downloading wasi-sdk instead of compiling a custom toolchain.
This should make it easier to update in the future and keep it in sync
with rust-lang/rust as well.

This also required a few minor fixes such as:

* The `S_IFIFO` and `S_IFMT` constants had incorrect values.
* The `CLOCK_*` definitions cause `ctest2`'s parsing to panic to they're
  skipped with a new `#[cfg]`.
* A new `langinfo.h` header was added to the list to include.
* Some historically skipped checks were removed since they're no longer
  necessary.
* Checks for `__errno_location` are disabled since that doesn't actually
  exist in headers.
* Checks for `select` are disabled because the Rust definition got the
  `const`-ness swapped for the final `timeval` argument.
@rustbot
Copy link
Collaborator

rustbot commented Aug 27, 2024

r? @tgross35

rustbot has assigned @tgross35.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@tgross35 tgross35 added stable-nominated This PR should be considered for cherry-pick to libc's stable release branch O-wasi labels Aug 27, 2024
@tgross35
Copy link
Contributor

Yay! Thanks, everything looks reasonable to me. Do you have a link to the headers that define the changed S_* and CLOCK_* constants? Trying to get these linked in the PRs so there is always a reference when digging through the history.

I also wanted to ask, is there a reasonable location that I can record my name for being cc'd for any WASI-related issues? Happy to help out!

Great to have you back :) There is the O-wasi label, github lets you watch specific labels in this setting (check Issues then it lets you select)

image

Or maybe this can be set up through triagebot too? https://github.com/rust-lang/libc/blob/72cb7aaf50bf70b5d360b1a64b0d52d3ed3fbf15/triagebot.toml you should at least set up a ping for yourself in src/wasi there.

@tgross35 tgross35 added this pull request to the merge queue Aug 27, 2024
@alexcrichton
Copy link
Member Author

For the headers https://github.com/WebAssembly/wasi-libc/blob/230d4be6c54bec93181050f9e25c87150506bdd0/libc-top-half/musl/include/sys/stat.h is the source of S_* and https://github.com/WebAssembly/wasi-libc/blob/230d4be6c54bec93181050f9e25c87150506bdd0/libc-bottom-half/headers/public/__header_time.h#L17-L20 is the CLOCK_* bits.

Also holy cow I had no idea you could subscribe to just labels, I didn't know that github added that! I've subscribed myself to O-wasi/O-wasm in this repo. I'll do the same for rust-lang/rust too.

Looks like the same setting isn't applied for PRs though (it looks to be all-or-nothing?), so if I don't appear on wasm-related PRs feel free to cc me

@tgross35
Copy link
Contributor

For the headers https://github.com/WebAssembly/wasi-libc/blob/230d4be6c54bec93181050f9e25c87150506bdd0/libc-top-half/musl/include/sys/stat.h is the source of S_* and https://github.com/WebAssembly/wasi-libc/blob/230d4be6c54bec93181050f9e25c87150506bdd0/libc-bottom-half/headers/public/__header_time.h#L17-L20 is the CLOCK_* bits.

Awesome, thanks!

Also holy cow I had no idea you could subscribe to just labels, I didn't know that github added that! I've subscribed myself to O-wasi/O-wasm in this repo. I'll do the same for rust-lang/rust too.

Looks like the same setting isn't applied for PRs though (it looks to be all-or-nothing?), so if I don't appear on wasm-related PRs feel free to cc me

Ah yeah it is pretty new and ime somewhat buggy, so don't rely on it :) better than nothing though. You should definitely make yourself a mention entry for the wasi directory once you create it for wasip2.

Merged via the queue into rust-lang:main with commit 571e5be Aug 27, 2024
40 checks passed
@alexcrichton alexcrichton deleted the update-wasi-agan branch August 27, 2024 20:32
alexcrichton added a commit to alexcrichton/libc that referenced this pull request Aug 28, 2024
This is similar to rust-lang#3869 except that it adds tests for `wasm32-wasip2`
in addition to `wasm32-wasip1`. This is intended to eventually empower
definitions from rust-lang/rust#129638 to move into this repository.
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Aug 29, 2024
This commit updates CI to resume testing WASI. This updates the
container and testing scripts from historical processes to more modern
ones, e.g. downloading wasi-sdk instead of compiling a custom toolchain.
This should make it easier to update in the future and keep it in sync
with rust-lang/rust as well.

This also required a few minor fixes such as:

* The `S_IFIFO` and `S_IFMT` constants had incorrect values.
* The `CLOCK_*` definitions cause `ctest2`'s parsing to panic to they're
  skipped with a new `#[cfg]`.
* A new `langinfo.h` header was added to the list to include.
* Some historically skipped checks were removed since they're no longer
  necessary.
* Checks for `__errno_location` are disabled since that doesn't actually
  exist in headers.
* Checks for `select` are disabled because the Rust definition got the
  `const`-ness swapped for the final `timeval` argument.

(backport <rust-lang#3869>)
[ resolve conflicts - Trevor ]
(cherry picked from commit 7c10562)
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Aug 29, 2024
This is similar to rust-lang#3869 except that it adds tests for `wasm32-wasip2`
in addition to `wasm32-wasip1`. This is intended to eventually empower
definitions from rust-lang/rust#129638 to move into this repository.

(backport <rust-lang#3870>)
(cherry picked from commit 15f8c44)
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Aug 29, 2024
This commit updates CI to resume testing WASI. This updates the
container and testing scripts from historical processes to more modern
ones, e.g. downloading wasi-sdk instead of compiling a custom toolchain.
This should make it easier to update in the future and keep it in sync
with rust-lang/rust as well.

This also required a few minor fixes such as:

* The `S_IFIFO` and `S_IFMT` constants had incorrect values.
* The `CLOCK_*` definitions cause `ctest2`'s parsing to panic to they're
  skipped with a new `#[cfg]`.
* A new `langinfo.h` header was added to the list to include.
* Some historically skipped checks were removed since they're no longer
  necessary.
* Checks for `__errno_location` are disabled since that doesn't actually
  exist in headers.
* Checks for `select` are disabled because the Rust definition got the
  `const`-ness swapped for the final `timeval` argument.

(backport <rust-lang#3869>)
[ resolve conflicts - Trevor ]
(cherry picked from commit 7c10562)
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Aug 29, 2024
This is similar to rust-lang#3869 except that it adds tests for `wasm32-wasip2`
in addition to `wasm32-wasip1`. This is intended to eventually empower
definitions from rust-lang/rust#129638 to move into this repository.

(backport <rust-lang#3870>)
(cherry picked from commit 15f8c44)
@tgross35 tgross35 added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Aug 29, 2024
@tgross35 tgross35 mentioned this pull request Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-wasi S-waiting-on-review stable-applied This PR has been cherry-picked to libc's stable release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants