Convert pipe tests deterministic part2#616
Conversation
…inistic assert-based tests - Replace non-deterministic printf statements with assert() calls - Remove printing of PIDs, FD numbers, return values, and message contents - Add required assertions for pipe(), fork(), write(), read(), memcmp(), close(), and waitpid() - Ensure tests fail via assert() on incorrect behavior - Use fixed messages with explicit length checks - Child processes read until full message length is received - Parent processes verify child exit status via waitpid() Addresses issue #603: Deprecate non-deterministic tests
End-to-End Test ReportTest PreviewTest Report Deterministic TestsSummary
Test Results by Category
Non Deterministic TestsSummary
Test Results by Category
Fail TestsSummary
Test Results by Category
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
These should be moved from the non-deterministic folder to the deterministic folder. I missed that for the last PR so if you could move the other two files as well that would be great. |
End-to-End Test ReportTest PreviewTest Report Deterministic TestsSummary
Test Results by Category
Non Deterministic TestsSummary
Test Results by Category
Fail TestsSummary
Test Results by Category
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
a708adc to
b752aae
Compare
End-to-End Test ReportTest PreviewTest Report Deterministic TestsSummary
Test Results by Category
Non Deterministic TestsSummary
Test Results by Category
Fail TestsSummary
Test Results by Category
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
End-to-End Test ReportTest PreviewTest Report Deterministic TestsSummary
Test Results by Category
Non Deterministic TestsSummary
Test Results by Category
Fail TestsSummary
Test Results by Category
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
End-to-End Test ReportTest PreviewTest Report Deterministic TestsSummary
Test Results by Category
Non Deterministic TestsSummary
Test Results by Category
Fail TestsSummary
Test Results by Category
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
* Convert pipeinput, pipeinput2, pipeonestring, and pipewrite to deterministic assert-based tests - Replace non-deterministic printf statements with assert() calls - Remove printing of PIDs, FD numbers, return values, and message contents - Add required assertions for pipe(), fork(), write(), read(), memcmp(), close(), and waitpid() - Ensure tests fail via assert() on incorrect behavior - Use fixed messages with explicit length checks - Child processes read until full message length is received - Parent processes verify child exit status via waitpid() Addresses issue #603: Deprecate non-deterministic tests * fix: assert * moved non deterministic to deterministic folder * updated skip test
Purpose
This PR converts five non-deterministic fork tests (
fork.c,fork_simple.c,forkandopen.c,forkfiles.c, andforknodup.c) to deterministic, assertion-based tests as part of addressing issue #603 (Deprecate non-deterministic tests).Changes
Modified Files
tests/unit-tests/process_tests/non-deterministic/fork.c→tests/unit-tests/process_tests/deterministic/fork.ctests/unit-tests/process_tests/non-deterministic/fork_simple.c→tests/unit-tests/process_tests/deterministic/fork_simple.ctests/unit-tests/process_tests/non-deterministic/forkandopen.c→tests/unit-tests/process_tests/deterministic/forkandopen.ctests/unit-tests/process_tests/non-deterministic/forkfiles.c→tests/unit-tests/process_tests/deterministic/forkfiles.ctests/unit-tests/process_tests/non-deterministic/forknodup.c→tests/unit-tests/process_tests/deterministic/forknodup.cTesting
Tests can be run individually:
./scripts/wasmtestreport.py --testfiles tests/unit-tests/process_tests/deterministic/fork.c
./scripts/wasmtestreport.py --testfiles tests/unit-tests/process_tests/deterministic/fork_simple.c
./scripts/wasmtestreport.py --testfiles tests/unit-tests/process_tests/deterministic/forkandopen.c
./scripts/wasmtestreport.py --testfiles tests/unit-tests/process_tests/deterministic/forkfiles.c
./scripts/wasmtestreport.py --testfiles tests/unit-tests/process_tests/deterministic/forknodup.c