Skip to content

CI: Collect logs of failed unit tests #2348

Closed
eduard-bagdasaryan wants to merge 6 commits intosquid-cache:masterfrom
measurement-factory:SQUID-1139-ci-collect-unit-test-logs
Closed

CI: Collect logs of failed unit tests #2348
eduard-bagdasaryan wants to merge 6 commits intosquid-cache:masterfrom
measurement-factory:SQUID-1139-ci-collect-unit-test-logs

Conversation

@eduard-bagdasaryan
Copy link
Copy Markdown
Contributor

When a unit test fails during CI checks, the corresponding GitHub
Actions reports and collected btlayer-*.log files do not contain
any failure details. For example, we see

FAIL: tests/testRock
# FAIL: 1

but are missing critical details like

stub time| FATAL: Ipc::Mem::Segment::create failed to
shm_open(/squid-0-tr_rebuild_versions.shm): (63) File name too long

Now, GitHub Actions collect all log files, including unit test logs. For
the ubuntu-24.04,gcc,default build target, adding more logs increases
artifacts zip archive size by about 100 KB (from ~200KB to ~300KB).

If test-builds.sh succeeds, there are no unit test logs to collect
because all unit test logs are erased when make distcheck (initiated
by test-builds.sh) reaches its make distclean step. If a unit test
fails, then that cleaning step is not reached, (successful and failed)
unit test logs are preserved and are now added to CI artifacts.

eduard-bagdasaryan and others added 6 commits December 29, 2025 17:10
When a unit test fails during CI checks, the corresponding GitHub
Actions reports and collected btlayer-*.log files do not contain
any failure details, for example:

    FAIL: tests/testRock
    # FAIL: 1

Critical details are missing:

    stub time| FATAL: Ipc::Mem::Segment::create failed to
    shm_open(/squid-0-tr_rebuild_versions.shm): (63) File name too long

Now GitHub Actions reports collect all log files, including
unit test logs.
The downloaded log archive did not contain
unit test logs. Added temporary logging to
check this.
To check the theory that the downloaded log archive contains
unit test logs only if some of them fail.
@yadij yadij added M-cleared-for-merge https://github.com/measurement-factory/anubis#pull-request-labels S-could-use-an-approval An approval may speed this PR merger (but is not required) labels Jan 11, 2026
squid-anubis pushed a commit that referenced this pull request Jan 11, 2026
When a unit test fails during CI checks, the corresponding GitHub
Actions reports and collected btlayer-*.log files do not contain
any failure details. For example, we see

    FAIL: tests/testRock
    # FAIL: 1

but are missing critical details like

    stub time| FATAL: Ipc::Mem::Segment::create failed to
    shm_open(/squid-0-tr_rebuild_versions.shm): (63) File name too long

Now, GitHub Actions collect all log files, including unit test logs. For
the `ubuntu-24.04,gcc,default` build target, adding more logs increases
artifacts zip archive size by about 100 KB (from ~200KB to ~300KB).

If `test-builds.sh` succeeds, there are no unit test logs to collect
because all unit test logs are erased when `make distcheck` (initiated
by `test-builds.sh`) reaches its `make distclean` step. If a unit test
fails, then that cleaning step is not reached, (successful and failed)
unit test logs are preserved and are now added to CI artifacts.
@squid-anubis squid-anubis added M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels M-failed-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels M-abandoned-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels and removed M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels labels Jan 11, 2026
@rousskov rousskov removed S-could-use-an-approval An approval may speed this PR merger (but is not required) M-failed-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels labels Jan 12, 2026
squid-anubis pushed a commit that referenced this pull request Jan 13, 2026
When a unit test fails during CI checks, the corresponding GitHub
Actions reports and collected btlayer-*.log files do not contain
any failure details. For example, we see

    FAIL: tests/testRock
    # FAIL: 1

but are missing critical details like

    stub time| FATAL: Ipc::Mem::Segment::create failed to
    shm_open(/squid-0-tr_rebuild_versions.shm): (63) File name too long

Now, GitHub Actions collect all log files, including unit test logs. For
the `ubuntu-24.04,gcc,default` build target, adding more logs increases
artifacts zip archive size by about 100 KB (from ~200KB to ~300KB).

If `test-builds.sh` succeeds, there are no unit test logs to collect
because all unit test logs are erased when `make distcheck` (initiated
by `test-builds.sh`) reaches its `make distclean` step. If a unit test
fails, then that cleaning step is not reached, (successful and failed)
unit test logs are preserved and are now added to CI artifacts.
@squid-anubis squid-anubis added M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels and removed M-abandoned-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels labels Jan 13, 2026
@squid-anubis squid-anubis added M-merged https://github.com/measurement-factory/anubis#pull-request-labels and removed M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels M-cleared-for-merge https://github.com/measurement-factory/anubis#pull-request-labels labels Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

M-merged https://github.com/measurement-factory/anubis#pull-request-labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants