Skip to content

test(rccl): add host microtests for the param subsystem - #13211

Merged
aduforest merged 23 commits into
developfrom
users/aduforest/aicomrccl-2820-param-parsers-host-microtests
Oct 20, 2026
Merged

aduforest merged 23 commits into
developfrom
users/aduforest/aicomrccl-2820-param-parsers-host-microtests

Conversation

@aduforest

@aduforest aduforest commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

JIRA ID: AICOMRCCL-2820

What

Host-only microtests for the param subsystem: the parser headers (src/include/param/parser_{default,enum,bitset,list}.h), src/param/param_registry.cc, ncclParam<T> (src/include/param/param.h), src/param/param.cc, src/param/c_api.cc and the env loading in src/misc/param.cc.
Host-only counterparts of test/ParameterApiTests.cpp / ParamTests.cpp.

How

  • param-parsers-test.cc (header-only) and param-registry-test.cc go in rccl-UnitTestsMicro. A small FakeParam stands in for ncclParam<T>, and locking is checked by holding the registry mutex while a concurrent add/find/remove blocks.
  • The rest is in a new rccl-UnitTestsMicroParam, because misc/param.cc defines ncclGetEnv, initEnv and ncclLoadParam, which the shared fakes also define. The env plugin, ncclOsSetEnv, fopen and logging are seamed in the test TU; initEnv() and NCCL_NO_CACHE latch behind std::call_once, so those cases run in isolated processes.
  • Pins 4 production bugs as KnownBug_ tests: a negative number parses as a huge unsigned value, a narrower integer type truncates silently, and setEnvFile passes an empty name to setenv and cuts names and values to 1023 chars (AICOMRCCL-2962).

Coverage

Every function and line of each unit except one parser line, an EINVAL arm glibc never raises for base 10.

Mutation Testing

80 mutations on the hipified sources, all killed.

Test Plan

Standalone build: ParamParsersMicrotest.* 52/52 and ParamRegistryMicrotest.* 11/11 in rccl-UnitTestsMicro, rccl-UnitTestsMicroParam 54/54, each × 20 shuffled.

@aduforest

Copy link
Copy Markdown
Member Author

@argus review

@amd-argus amd-argus Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARGUS

Findings

1 finding(s) that could not be posted as inline comments
  • projects/rccl/src/include/param/parser_bitset.h:109 (Low) ncclParamBitsetOf's desc hardcodes a comma while honouring an arbitrary delimiter (follow-up) Follow-up rather than something to fix here, since it predates this PR: ncclParamBitsetOf hardcodes "Comma-separated list of:" at parser_bitset.h:109 while honouring the delimiter argument at parser_bitset.h:104, so a non-comma bitset param advertises the wrong separator in its help text. parser_list.h:64 already has the pattern, it interpolates the delimiter. Worth knowing before pinning that string in the bitset desc test.

Bottom line: Looks approval ready. The inline notes are small coverage gaps, mostly one added assertion each.

Comment @argus review to re-run, or @argus re-review after pushing.

Comment thread projects/rccl/test/host/param-parsers-test.cc
Comment thread projects/rccl/test/host/param-parsers-test.cc
Comment thread projects/rccl/test/host/param-parsers-test.cc
Comment thread projects/rccl/test/host/param-parsers-test.cc
Comment thread projects/rccl/test/host/param-parsers-test.cc Outdated
Comment thread projects/rccl/test/host/param-parsers-test.cc Outdated
Comment thread projects/rccl/test/host/MICROTEST_README.md Outdated
@aduforest

Copy link
Copy Markdown
Member Author

Pushed fixes for all five findings above. @argus re-review

@aduforest

Copy link
Copy Markdown
Member Author

@argus re-review

@amd-argus amd-argus Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARGUS

Bottom line: Looks approval ready; all seven findings from the last round are fixed. The rest are optional coverage gaps, the main one being that the ';' delimited ListOf parser never reaches resolve().

Comment @argus review to re-run, or @argus re-review after pushing.

Comment thread projects/rccl/test/host/param-parsers-test.cc
Comment thread projects/rccl/test/host/param-parsers-test.cc
@aduforest

Copy link
Copy Markdown
Member Author

@argus re-review

@amd-argus amd-argus Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARGUS

Bottom line: Looks approval ready; both findings from the last round are fixed. The two inline notes are optional coverage gaps, one added assertion each.

Comment @argus review to re-run, or @argus re-review after pushing.

Comment thread projects/rccl/test/host/param-parsers-test.cc
Comment thread projects/rccl/test/host/param-parsers-test.cc
@aduforest

Copy link
Copy Markdown
Member Author

@argus review

@amd-argus

amd-argus Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

@aduforest the current head (58f9f5e6) already has a review from me above; nothing has changed since then for me to look at again. Push a change and I'll pick it up, or ask again once you have.

@aduforest

Copy link
Copy Markdown
Member Author

@argus review

1 similar comment
@aduforest

Copy link
Copy Markdown
Member Author

@argus review

@amd-argus amd-argus Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARGUS

Bottom line: LGTM once Integer_RejectsNullEmptyAndTrailingGarbage repeats its two garbage cases for uint32_t: the unsigned arm's guards at parser_default.h:102 are never taken today.

Comment @argus review to re-run, or @argus re-review after pushing.

Comment thread projects/rccl/test/host/param-parsers-test.cc
@aduforest

Copy link
Copy Markdown
Member Author

@argus review

2 similar comments
@aduforest

Copy link
Copy Markdown
Member Author

@argus review

@aduforest

Copy link
Copy Markdown
Member Author

@argus review

@amd-argus amd-argus Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARGUS

Bottom line: LGTM.

Comment @argus review to re-run, or @argus re-review after pushing.

@aduforest
aduforest marked this pull request as ready for review October 12, 2026 22:24
@aduforest
aduforest requested review from a team as code owners October 12, 2026 22:25
Comment thread projects/rccl/test/host/param-parsers-test.cc
Comment thread projects/rccl/test/host/param-parsers-test.cc
Comment thread projects/rccl/test/host/param-parsers-test.cc
Comment thread projects/rccl/test/host/param-parsers-test.cc
@aduforest
aduforest force-pushed the users/aduforest/aicomrccl-2820-param-utils-host-microtests branch from a13a778 to 5f834a3 Compare October 13, 2026 17:53
@aduforest
aduforest force-pushed the users/aduforest/aicomrccl-2820-param-parsers-host-microtests branch from aeabfda to 5843190 Compare October 13, 2026 17:54
@aduforest

Copy link
Copy Markdown
Member Author

@argus review

@amd-argus amd-argus Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARGUS

Bottom line: LGTM.

Comment @argus review to re-run, or @argus re-review after pushing.

@aduforest
aduforest force-pushed the users/aduforest/aicomrccl-2820-param-utils-host-microtests branch from 5f834a3 to a724e4e Compare October 13, 2026 18:32
@aduforest
aduforest force-pushed the users/aduforest/aicomrccl-2820-param-parsers-host-microtests branch from 5843190 to dea81a5 Compare October 13, 2026 18:32
@aduforest

Copy link
Copy Markdown
Member Author

@argus review

@amd-argus amd-argus Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARGUS

Bottom line: LGTM.

Comment @argus review to re-run, or @argus re-review after pushing.

New rccl-UnitTestsMicroParam covers ncclParam<T> (include/param/param.h),
src/param/param.cc, src/param/c_api.cc and the legacy env loading in
src/misc/param.cc. It is its own binary because misc/param.cc defines
ncclGetEnv, initEnv and ncclLoadParam, which the shared fakes in
rccl-UnitTestsMicro also define; the env plugin, ncclOsSetEnv and logging
are seamed in the test TU. initEnv() and NCCL_NO_CACHE latch behind
std::call_once, so those cases run in isolated processes.

Co-Authored-By: Claude <noreply@anthropic.com>
@aduforest aduforest changed the title test(rccl): add host microtests for the param parsers and registry test(rccl): add host microtests for the param subsystem Oct 15, 2026
@aduforest

Copy link
Copy Markdown
Member Author

@argus review

@amd-argus amd-argus Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARGUS

This PR changes 1,590 lines across 10 files. A change this size is hard to review
well, for a person and for this bot alike: reviewers lose the thread, defects hide in the
volume, and the feedback arrives too late to be cheap to act on. Splitting it into a
stacked pull request
gives each piece a reviewable diff and keeps the history. This review covers the whole change
regardless.

Bottom line: LGTM.

Comment @argus review to re-run, or @argus re-review after pushing.

…comrccl-2820-param-parsers-host-microtests

# Conflicts:
#	projects/rccl/test/host/MICROTEST_README.md
#	projects/rccl/test/host/run_host_tests.sh
#	projects/rccl/tools/scripts/test_runner/configs/ci-precheckin.json
#	projects/rccl/tools/scripts/test_runner/lib/test_executor.py
@aduforest

Copy link
Copy Markdown
Member Author

@argus review

@amd-argus amd-argus Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARGUS

This PR changes 1,588 lines across 10 files. A change this size is hard to review
well, for a person and for this bot alike: reviewers lose the thread, defects hide in the
volume, and the feedback arrives too late to be cheap to act on. Splitting it into a
stacked pull request
gives each piece a reviewable diff and keeps the history. This review covers the whole change
regardless.

Bottom line: LGTM.

Comment @argus review to re-run, or @argus re-review after pushing.

Co-Authored-By: Claude <noreply@anthropic.com>
@aduforest

Copy link
Copy Markdown
Member Author

@argus review

@amd-argus amd-argus Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARGUS

This PR changes 1,601 lines across 10 files. A change this size is hard to review
well, for a person and for this bot alike: reviewers lose the thread, defects hide in the
volume, and the feedback arrives too late to be cheap to act on. Splitting it into a
stacked pull request
gives each piece a reviewable diff and keeps the history. This review covers the whole change
regardless.

Bottom line: LGTM.

Comment @argus review to re-run, or @argus re-review after pushing.

…comrccl-2820-param-parsers-host-microtests

# Conflicts:
#	projects/rccl/test/host/CMakeLists.txt
@aduforest

Copy link
Copy Markdown
Member Author

@argus review

@amd-argus amd-argus Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARGUS

This PR changes 1,601 lines across 10 files. A change this size is hard to review
well, for a person and for this bot alike: reviewers lose the thread, defects hide in the
volume, and the feedback arrives too late to be cheap to act on. Splitting it into a
stacked pull request
gives each piece a reviewable diff and keeps the history. This review covers the whole change
regardless.

Bottom line: LGTM.

Comment @argus review to re-run, or @argus re-review after pushing.

…comrccl-2820-param-parsers-host-microtests

# Conflicts:
#	projects/rccl/test/host/MICROTEST_README.md
#	projects/rccl/test/host/run_host_tests.sh
#	projects/rccl/tools/scripts/test_runner/configs/ci-precheckin.json
@aduforest

Copy link
Copy Markdown
Member Author

@argus review

@amd-argus amd-argus Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARGUS

This PR changes 1,641 lines across 10 files. A change this size is hard to review
well, for a person and for this bot alike: reviewers lose the thread, defects hide in the
volume, and the feedback arrives too late to be cheap to act on. Splitting it into a
stacked pull request
gives each piece a reviewable diff and keeps the history. This review covers the whole change
regardless.

Bottom line: LGTM.

Comment @argus review to re-run, or @argus re-review after pushing.

…comrccl-2820-param-parsers-host-microtests

# Conflicts:
#	projects/rccl/test/host/MICROTEST_README.md
#	projects/rccl/tools/scripts/test_runner/lib/test_executor.py
@aduforest

Copy link
Copy Markdown
Member Author

@argus review

@amd-argus amd-argus Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARGUS

This PR changes 1,631 lines across 10 files. A change this size is hard to review
well, for a person and for this bot alike: reviewers lose the thread, defects hide in the
volume, and the feedback arrives too late to be cheap to act on. Splitting it into a
stacked pull request
gives each piece a reviewable diff and keeps the history. This review covers the whole change
regardless.

Bottom line: LGTM.

Comment @argus review to re-run, or @argus re-review after pushing.

aduforest and others added 2 commits October 19, 2026 18:23
develop's #13328 added a third config source after /etc/rccl.conf.

Co-Authored-By: Claude <noreply@anthropic.com>
@aduforest

Copy link
Copy Markdown
Member Author

@argus review

@amd-argus amd-argus Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARGUS

This PR changes 1,603 lines across 9 files. A change this size is hard to review
well, for a person and for this bot alike: reviewers lose the thread, defects hide in the
volume, and the feedback arrives too late to be cheap to act on. Splitting it into a
stacked pull request
gives each piece a reviewable diff and keeps the history. This review covers the whole change
regardless.

Bottom line: LGTM.

Comment @argus review to re-run, or @argus re-review after pushing.

@aduforest
aduforest merged commit 9da5b71 into develop Oct 20, 2026
71 of 78 checks passed
@aduforest
aduforest deleted the users/aduforest/aicomrccl-2820-param-parsers-host-microtests branch October 20, 2026 11:46
@systems-assistant

Copy link
Copy Markdown
Contributor

TheRock Submodule Bump Activity

Newest first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants