Skip to content

feat: add musl libc-test conformance suite, rename posix-* to os-test-*#56

Merged
NathanFlurry merged 1 commit intomainfrom
ralph/libc-test-conformance
Mar 28, 2026
Merged

feat: add musl libc-test conformance suite, rename posix-* to os-test-*#56
NathanFlurry merged 1 commit intomainfrom
ralph/libc-test-conformance

Conversation

@NathanFlurry
Copy link
Copy Markdown
Member

Summary

  • Rename posix- → os-test-**: All POSIX conformance infrastructure renamed to reflect the actual test suite name (Sortix os-test), including test runner, exclusions, CI workflow, report generator, and validator
  • Add musl libc-test integration: Complete parallel infrastructure for the musl libc-test suite (MIT, Bytecode Alliance mirror) — tests kernel-level behavior (file locking, stat edge cases, socket ops) not just libc function correctness
  • Shared schema: posix-exclusion-schema.tsconformance-exclusion-schema.ts, used by both suites

libc-test results

  • 75 tests compile for WASM (out of 144 total; 69 require fork/pthreads/dlopen)
  • 69 pass (92.0%), 6 expected failures:
    • 4 wasm-limitation (dlopen/TLS DSOs — impossible in WASM)
    • 1 wasi-gap (statvfs)
    • 1 implementation-gap (strptime timezone)

New files

  • scripts/import-libc-test.ts — fetch from Bytecode Alliance mirror
  • native/wasmvm/c/Makefilelibc-test and libc-test-native targets
  • packages/wasmvm/test/libc-test-conformance.test.ts — test runner
  • packages/wasmvm/test/libc-test-exclusions.json — 6 exclusions
  • scripts/generate-libc-test-report.ts / validate-libc-test-exclusions.ts
  • .github/workflows/libc-test-conformance.yml
  • docs/libc-test-conformance-report.mdx (auto-generated)

Test plan

  • libc-test WASM build: 75/144 compile (fork/pthread tests expected to fail)
  • libc-test conformance: 69/75 pass, 6 expected-fail with exclusions → suite green
  • libc-test report generation: MDX + JSON produced correctly
  • libc-test exclusion validation: all checks pass
  • os-test validation: renamed scripts still work (3 exclusions, all checks pass)
  • os-test report generation: works with renamed paths (3347/3350, 99.9%)
  • TypeScript typecheck: clean

🤖 Generated with Claude Code

…est-*

Rename existing POSIX conformance infrastructure to os-test-* to reflect
the actual test suite name (Sortix os-test). Add musl libc-test as a
second conformance suite that tests kernel-level behavior (file locking,
stat edge cases, socket operations) rather than just libc function
correctness.

- Rename posix-conformance → os-test-conformance across all files
- Rename posix-exclusion-schema → conformance-exclusion-schema (shared)
- Add import, build, test, validate, and report infrastructure for libc-test
- 75 libc-test programs compile for WASM, 69 pass (92.0%)
- 6 exclusions: 4 wasm-limitation (dlopen/TLS), 1 wasi-gap (statvfs), 1 implementation-gap (strptime)
@NathanFlurry NathanFlurry merged commit 33e549e into main Mar 28, 2026
1 of 5 checks passed
@NathanFlurry NathanFlurry deleted the ralph/libc-test-conformance branch March 28, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant