Require the portal proxy test's child to report one passed test

The test runs itself again under dbus-run-session and, on a zero exit, returned
without looking at what the child printed. A child that ran no test at all
(its --exact filter matching nothing, as after a rename of the test) also exits
0 and printed "running 0 tests ... 0 passed", so the wrapper passed having
checked nothing. A zero exit now has to come with libtest's "test result: ok.
1 passed;" in the child's output, else the wrapper fails with that output.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
faumarayandClaude Sonnet 5.5 committed 2026-10-25 02:20:03 +03:00
1 parent 7e63092bcd
commit 35408a3dfe
1 file changed
+5
+5
View File
@@ -85,6 +85,11 @@ fn on_a_bus_of_its_own() {
let text =
format!("{}{}", String::from_utf8_lossy(&run.stdout), String::from_utf8_lossy(&run.stderr));
if run.status.success() {
// A child that ran no test (its filter matched nothing) exits 0 as well.
assert!(
text.contains("test result: ok. 1 passed;"),
"the run on its own bus exited 0 without reporting `1 passed`:\n{text}"
);
return;
}
// The test ran and failed, or the bus never came up.