test(portable): fix native stack and process-fixture assumptions
ci/woodpecker/push/woodpecker Pipeline was successful
Linux strict security lane (G-C) / strict isolation escape matrix (push) Canceled after 0s
CI / fmt + clippy + test (Linux x86_64) (push) Canceled after 0s
CI / schema instance validation + consumers (push) Canceled after 0s
CI / runtime contract (macos-latest) (push) Canceled after 0s
CI / runtime contract (windows-latest) (push) Canceled after 0s
CI / release evidence manifest (push) Canceled after 0s
CI / release candidate artifact (macos-latest) (push) Canceled after 0s
CI / release candidate artifact (ubuntu-latest) (push) Canceled after 0s
ci/woodpecker/push/woodpecker Pipeline was successful
Linux strict security lane (G-C) / strict isolation escape matrix (push) Canceled after 0s
CI / fmt + clippy + test (Linux x86_64) (push) Canceled after 0s
CI / schema instance validation + consumers (push) Canceled after 0s
CI / runtime contract (macos-latest) (push) Canceled after 0s
CI / runtime contract (windows-latest) (push) Canceled after 0s
CI / release evidence manifest (push) Canceled after 0s
CI / release candidate artifact (macos-latest) (push) Canceled after 0s
CI / release candidate artifact (ubuntu-latest) (push) Canceled after 0s
macOS arm64 aborted in nesting_depth_limit_is_enforced because the test-harness thread stack is smaller than a production main thread. Run that contract test on an explicit 8 MiB stack; the 128-level parser bound itself is unchanged. The stdlib process product test hard-coded /bin/echo, which does not exist on Windows. Use the test CLI itself as the granted program: the fixture reads MARQDO_TEST_PROCESS_PROGRAM from the granted env, runs it with --version, and the harness compares against the same invocation. process.run now forwards SYSTEMROOT/WINDIR on Windows (process creation/DLL loading, not a capability), and the bundled stdlib digest is regenerated for the changed test fixture.
This commit is contained in:
1 parent
3a29fce061
commit
b898c419fe
5 files changed
+102
-39
No files matched your search
@@ -27,14 +27,25 @@ pub(crate) fn run_process(
|
||||
ctx: &ExecutionContext,
|
||||
) -> Result<Value, RuntimeError> {
|
||||
const LIMIT: usize = 1024 * 1024;
|
||||
let child = Command::new(program)
|
||||
let mut command = Command::new(program);
|
||||
command
|
||||
.args(args)
|
||||
.current_dir(root)
|
||||
.env_clear()
|
||||
.stdin(Stdio::null())
|
||||
.stdout(Stdio::piped())
|
||||
.stderr(Stdio::piped())
|
||||
.spawn();
|
||||
.stderr(Stdio::piped());
|
||||
#[cfg(windows)]
|
||||
{
|
||||
// Windows process creation and DLL loading require the system root;
|
||||
// this is not a package-resolution path or a capability grant.
|
||||
for name in ["SYSTEMROOT", "WINDIR"] {
|
||||
if let Some(value) = std::env::var_os(name) {
|
||||
command.env(name, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
let child = command.spawn();
|
||||
let child = match child {
|
||||
Ok(child) => child,
|
||||
Err(error) if error.kind() == std::io::ErrorKind::NotFound => {
|
||||
|
||||
Reference in new issue
Block a user