Skip to content

Commit 5849967

Browse files
committed
[None][test] CBTS coverage: log immediate-save failures instead of swallowing
The poller's post-context-switch save is the only persistence chance for a short-lived worker that exits before the next periodic save, so a silent `except: pass` turned lost subprocess coverage into an undebuggable false negative. Print to stderr like the periodic/final save handlers do. Signed-off-by: Ivy Zhang <25222398+crazydemo@users.noreply.github.com>
1 parent 48198e0 commit 5849967

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

jenkins/scripts/cbts/coverage_utils/sitecustomize.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,11 @@ def _poll_marker():
155155
try:
156156
# Save now so short-lived workers persist context before the periodic save.
157157
cov.save()
158-
except Exception:
159-
pass
158+
except Exception as e:
159+
print(
160+
f"[cbts] immediate save failed in pid {os.getpid()}: {e!r}",
161+
file=sys.stderr,
162+
)
160163
last_seen = nodeid
161164
except (FileNotFoundError, OSError):
162165
pass

0 commit comments

Comments
 (0)