test: prove captured action stdin isolation
This commit is contained in:
@@ -242,14 +242,22 @@ creates a separate process using the dependency directory. Equivalent direct,
|
||||
recursive, redundant, absolute, and root-symlink spellings converge before
|
||||
this runtime field is assigned.
|
||||
|
||||
Every such product also receives an independently opened null device as fd 0.
|
||||
Caller terminal, pipe, and file bytes remain with the coordinator; serial and
|
||||
parallel products observe immediate EOF rather than consuming a shared input
|
||||
offset. Production and test-only dependency initialization, filters, list mode,
|
||||
no-match execution, failure, and timeout use that same process boundary.
|
||||
|
||||
The physical directory remains distinct from exact dotted package identity and
|
||||
from production, internal, external, recompiled, support, and generated-main
|
||||
action identity. Only product execution uses it. Compiler, assembler, archiver,
|
||||
linker, support, and generated-main commands retain their build-plan cwd and
|
||||
environment. `ww build`, `ww test -c`, `-c -o`, and no-selected-test products
|
||||
start no test child. A published test binary run directly and the raw
|
||||
single-file compatibility path inherit the user's cwd/environment and contain
|
||||
no forced package-directory behavior.
|
||||
environment. Captured directory build plans begin with null stdin, which their
|
||||
inherited-stdio tool descendants retain. `ww build`, `ww test -c`, `-c -o`, and
|
||||
no-selected-test products start no test child. A published test binary run
|
||||
directly and the raw single-file compatibility path inherit the user's
|
||||
cwd/environment/stdin and contain no forced package-directory or input
|
||||
behavior.
|
||||
|
||||
Before package grouping, both directory drivers and the shared recursive
|
||||
coordinator apply Go 1.26.5's filename OS/architecture rule for WW's fixed
|
||||
@@ -319,15 +327,18 @@ independent temporary directories from an unrelated caller cwd and compares
|
||||
Cstage/WWstage output for production/internal/external/combined and every
|
||||
test-only shape; production and test-only dependency initialization;
|
||||
recompiled external self-import; duplicate inherited `PWD`; ordinary data,
|
||||
`testdata`, and relative writes; direct/recursive/redundant/absolute/symlink
|
||||
roots; reversed request and creation order; serial and parallel products;
|
||||
filters, list, and no-match execution; failure and timeout; build/no-test and
|
||||
compile-only paths; direct published binaries and raw single-file execution;
|
||||
build-tool cwd/argv/environment; persistent data-only reuse and artifact bytes;
|
||||
and deterministic post-build child-`chdir` failure isolated from a successful
|
||||
sibling. It pads the inherited environment beyond former fixed observer sizes,
|
||||
requires one appended product `PWD`, and sweeps the persistent workdir for
|
||||
staged residue. Command-global bounded-memory failure remains independently
|
||||
`testdata`, relative writes, and deliberately nonempty caller stdin;
|
||||
direct/recursive/redundant/absolute/symlink roots; reversed request and creation
|
||||
order; serial and parallel products; filters, list, and no-match execution;
|
||||
failure and timeout; build/no-test and compile-only paths; direct published
|
||||
binaries and raw single-file execution; build-tool cwd/argv/environment/stdin;
|
||||
persistent data-only reuse and artifact bytes; input-open failure before capture
|
||||
creation; source-class rejection with empty workdirs; and deterministic
|
||||
post-build child-`chdir` failure isolated from a successful sibling. It pads the
|
||||
inherited environment beyond former fixed observer sizes, requires one appended
|
||||
product `PWD`, requires EOF for captured actions and caller data for inherited-
|
||||
stdio routes, and sweeps the persistent workdir for staged residue.
|
||||
Command-global bounded-memory failure remains independently
|
||||
owned by `allocation_failure_is_command_global`.
|
||||
|
||||
The same package owner contains the focused
|
||||
@@ -499,12 +510,14 @@ target once within one invocation, but two independent `make bootstrap`
|
||||
invocations are not safe to run concurrently and remain mutually exclusive.
|
||||
|
||||
`lib/os/exec` is the sole reusable WW subprocess mechanism. Fixture and package
|
||||
coordinators use its captured asynchronous path. The WW driver directly uses
|
||||
`os.exec.runstdio` for inherited-stdio, inherited-environment, leader-only
|
||||
compiler, assembler, linker, cleanup, run, and single-file-test calls. The
|
||||
local WW `procrun` implementation is deleted. The C bootstrap retains its C
|
||||
process implementation because it cannot consume a WW standard-library
|
||||
module.
|
||||
coordinators use its captured asynchronous path. An empty captured-command
|
||||
`stdinpath` opens the null device; an explicit path supplies controlled input,
|
||||
and either descriptor is installed before exec with checked setup reporting.
|
||||
The WW driver directly uses `os.exec.runstdio` for inherited-stdio,
|
||||
inherited-environment, leader-only compiler, assembler, linker, cleanup, run,
|
||||
and single-file-test calls. The local WW `procrun` implementation is deleted.
|
||||
The C bootstrap retains its C process implementation because it cannot consume
|
||||
a WW standard-library module.
|
||||
|
||||
WW has tokens and an opaque type for future CSP/channel work, but no mature
|
||||
production channel operations, task runtime, or scheduler. No channel,
|
||||
|
||||
Reference in New Issue
Block a user