Unplug the bwrap namespace-support probe from -t/--test

detect_bwrap_unshare_args()'s output was diagnostic/capability info,
not an actual test; run_self_tests() reverts to an empty placeholder
for real tests to land in later.
This commit is contained in:
2026-08-30 09:23:55 +00:00
parent c70abb56a9
commit bcae8bbcd4
3 changed files with 8 additions and 15 deletions
+6 -5
View File
@@ -147,9 +147,10 @@ Source layout (all under `src/`):
- `self_test.{h,cpp}``run_self_tests()` implements `-t/--test`, this
project's own built-in self-test mode (distinct from the Meson-driven
fixture smoke test under `tests/`, described in "Build & test commands"
below). Currently just reports `detect_bwrap_unshare_args()`'s output
(`bwrap.{h,cpp}`); deliberately its own small file since real tests are
expected here soon.
below). Currently an empty placeholder (previously reported
`detect_bwrap_unshare_args()`'s output — `bwrap.{h,cpp}` — unplugged since
that's kernel-capability diagnostics, not a test); deliberately its own
small file since real tests are expected here soon.
- `env_spec.{h,cpp}``resolve_env_specs()` turns an ordered list of
`EnvSpec {is_file, value}` (see `cli_args.{h,cpp}` above) into a flat, ordered list of
`(key, value)` pairs. A literal (`--env`) is split at its *first* `=` (the
@@ -217,8 +218,8 @@ Source layout (all under `src/`):
access at all, until `slirp4netns` integration (the next task on this same
branch) actually sets one up; `global.unshare-net: off` restores the prior
no-isolation behavior in the meantime. `detect_bwrap_unshare_args()` itself is
untouched by any of this — still an unfiltered kernel-capability probe, so
`-t/--test`'s diagnostic report continues to reflect raw kernel support, not policy.
untouched by any of this — still an unfiltered kernel-capability probe, unrelated
to policy (no longer surfaced via `-t/--test`, see `self_test.{h,cpp}` below).
`build_bwrap_args()`/`run_bwrap()` also take an optional `hostname` (from
`--hostname`, long-option only): passed through as bwrap's own `--hostname` only
when `--unshare-uts` is actually among the flags `bwrap` is being given (bwrap
-7
View File
@@ -16,13 +16,6 @@
#include "self_test.h"
#include <fmt/core.h>
#include "bwrap.h"
int run_self_tests() {
for (const auto& arg : detect_bwrap_unshare_args()) {
fmt::print("{}\n", arg);
}
return 0;
}
+2 -3
View File
@@ -17,7 +17,6 @@
#pragma once
// Implements -t/--test, this project's own built-in self-test mode (distinct
// from the Meson-driven fixture smoke test under tests/). Currently just
// reports which bwrap --unshare-xxx flags the running kernel supports (see
// detect_bwrap_unshare_args(), bwrap.h) -- a placeholder for real tests.
// from the Meson-driven fixture smoke test under tests/). Currently an empty
// placeholder -- real tests are expected here soon.
int run_self_tests();