WebAssembly / WebAssembly/wasi-libc

Enhance testing of nondeterministic host functionality with component composition

Open
#766 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1k
Forks
251
Avg merge
7h 15m
Merged PRs (30d)
3

Description

In https://github.com/WebAssembly/wasi-libc/pull/764 I added a test for getaddrinfo, but given the flaky nature of DNS servers the test doesn't actually assert either success or failure. With components, however, what we could do is instead build a component which provides the associated WASI interface and make that part of the test. That way we'd still test libc but we wouldn't actually test any live DNS servers.

In general this is a pretty good way to expand the scope of testing in wasi-libc. This would enable testing precise behaviors of certain APIs and certain behaviors, which might be ever-yet-more-relevant with WASIp3 and async thrown into the mix.

This is a pretty large refactoring of the test suite, however, so I'm not bundling this as part of #764, but wanted to track this nonetheless as an idea of expanding the scope of testing.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the getaddrinfo test added in pull request #764 and examine how it currently avoids asserting DNS success or failure. Investigate component composition that provides the associated WASI interface, then define the test-suite refactoring needed to exercise libc without live DNS servers. Done means the approach supports precise API behavior tests without relying on nondeterministic hosts.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, wasm
Domain
testing-qa
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.