Skip to content

Commit b16df97

Browse files
committed
smoke: the published stage's console survives both of its exits - a bad() exit leaves the lap dir in place and skips the tail's copy, the clean end deletes the dir itself, and the sweep's epilogue copy never runs because this stage returns before it; ci's readers (ci.yml's install and hibernate jobs, published.yml's three) tail vm-smoke/console-published.log, which nothing ever wrote, so every red published lap shipped without its console (2026-10-10's nightly hibernate red: the tail read No such file or directory and the upload warned). The copy now happens in the stage's own tail before the rm, and after a bad() exit the caller copies whatever the lap left, with the stale-copy hygiene the sweep keeps.
1 parent c0ff2d2 commit b16df97

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎scripts/smoke.sh‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2682,6 +2682,14 @@ smoke_published() {
26822682
kill $qemu 2>/dev/null || true
26832683
wait $qemu 2>/dev/null || true
26842684
trap - EXIT
2685+
# The console outlives its directory (issue #34's shape): the rm
2686+
# below is the sweep's cleanup arriving early, and the sweep's
2687+
# epilogue copy never runs on this stage -- it returns here. Copy
2688+
# what the lap left before deleting it; the caller's copy after a
2689+
# bad() exit covers the path that skips this one.
2690+
if [ -f "$log" ]; then
2691+
cp "$log" "vm-smoke/console-$name.log"
2692+
fi
26852693
[ $KEEP -eq 1 ] || sudo rm -rf "$dir"
26862694
}
26872695

@@ -3650,11 +3658,21 @@ fi
36503658

36513659
if [ -n "$PUBLISHED" ]; then
36523660
note "published: $PUBLISHED"
3661+
# A stale surviving copy must not impersonate this run's evidence
3662+
# (the same hygiene the example sweep keeps), and after a bad() exit
3663+
# this copy is the only one made: bad() leaves the lap dir in place
3664+
# and skips the copy in smoke_published's own tail, and this stage
3665+
# exits before the sweep's epilogue. ci's readers (ci.yml,
3666+
# published.yml) tail the copy, not the dir.
3667+
rm -f "vm-smoke/console-published.log"
36533668
if (smoke_published "$PUBLISHED" published "$port"); then
36543669
PASS+=("published")
36553670
else
36563671
FAIL+=("published")
36573672
fi
3673+
if [ -f "vm-smoke/published/console.log" ]; then
3674+
cp "vm-smoke/published/console.log" "vm-smoke/console-published.log"
3675+
fi
36583676
note "summary"
36593677
[ ${#PASS[@]} -gt 0 ] && printf ' pass: %s\n' "${PASS[*]}"
36603678
show_warnings

0 commit comments

Comments
 (0)