Skip to content

test(e2e): assert expected event and process counts per fixture#70

Open
izzet wants to merge 1 commit into
llnl:developfrom
izzet:test/assert-e2e-event-counts
Open

test(e2e): assert expected event and process counts per fixture#70
izzet wants to merge 1 commit into
llnl:developfrom
izzet:test/assert-e2e-event-counts

Conversation

@izzet

@izzet izzet commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

Why

Every assertion in _test_e2e is structural — view counts, layer counts, a checkpoint glob, client shutdown — and all of them hold on an empty result. A fixture that silently loads zero events keeps CI green while testing nothing.

That already happened. Before #63 the dftracer fixtures shipped uncompressed .pfw traces, which the dftracer-utils indexer cannot read, so dftracer-posix and dftracer-dlio-prev both analysed 0 events and the suite passed. #63 fixed the fixtures but nothing stops it recurring.

It is also live risk right now: #66 as currently pushed carries the pre-#63 (uncompressed) fixture forward under a new name, and #69 makes a multi-worker read silently drop events. Both are the same failure shape — a short or empty read that no test notices.

What

A per-fixture ground-truth table, asserted after analyze_trace():

fixture events processes
dftracer-dlio 125,669 1
dftracer-dlio-prev 18,039 8
dftracer-posix 2,056 1

dftracer-posix at 2,056 matches the figure in #63's commit message. Counts were measured with a single worker, which is what the e2e LocalCluster(processes=False, ...) gives, so they are not exposed to #69.

Fixtures absent from the table are skipped, so darshan and recorder are unconstrained — this does not collide with #67 dropping them.

Verification

  • pytest tests/test_e2e.py -m full -k dftracer — 6 passed
  • Negative check: perturbing one expected count to a wrong value fails both of that fixture's cases, so the assertion is live rather than vacuous

Note for #66

#66 touches tests/test_e2e.py too and will need a trivial rebase. When the fixtures are renamed, the table keys change with them — and the assertion is what would have caught the stale-fixture regression that PR currently carries.

The e2e assertions were all structural -- view counts, layer counts, a
checkpoint glob, client shutdown -- and every one of them holds on an
empty result. A fixture that silently loads zero events kept CI green
while testing nothing.

That is not hypothetical. Before llnl#63 the dftracer fixtures shipped
uncompressed .pfw traces the indexer cannot read, so dftracer-posix and
dftracer-dlio-prev both analysed 0 events and the suite passed.

Pin the ground truth per fixture, measured with a single worker:

  dftracer-dlio        125,669 events /  1 process
  dftracer-dlio-prev    18,039 events /  8 processes
  dftracer-posix         2,056 events /  1 process

Fixtures absent from the table are skipped, so this does not constrain
the darshan and recorder cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant