Skip to content

-j should also set --test-threads #17357

Open

Description

@joshtriplett

In 2018, someone asked for cargo test -jN to also set the number of threads used to run tests. In 2023, we closed that issue. #6265 .

We may have discussed this, but I can't seem to find any record of the discussion. I'd like to re-raise that item for consideration.

Activity

  1. epage commented on Aug 13, 2026

    @epage
    Contributor

    This has a similar problem as #1983 where forwarding config as arguments may be a breaking change. This could be resolved by switching arguments from conflicting with themself to overriding. The main risks are user confusion if we aren't consistent and later changing an override to an append would be a breaking change.

  2. joshtriplett commented on Aug 14, 2026

    @joshtriplett
    MemberAuthor

    @epage Is there a way we can pass this as an environment variable, such that an explicit argument would override it?

  3. epage commented on Aug 14, 2026

    @epage
    Contributor
  4. joshtriplett commented on Aug 18, 2026

    @joshtriplett
    MemberAuthor

    @epage Fair enough. I think switching the arguments to be overriding rather than conflicting seems fine, then.

  5. removed
    I-nominated-to-discussTo be discussed during issue triage on the next Cargo team meeting
    on Aug 20, 2026
  6. weihanglo commented on Aug 22, 2026

    @weihanglo
    Member

    This requires rust-lang/rust changes. See rust-lang/rust#161312. The Cargo side is blocked on libtest harness change.

    See also the raw meeting note https://github.com/rust-lang/cargo-team/blob/3e93e0d4a3435c100c3fc497815f8c2e8150807b/meetings/sync-meeting/2026-08-18.md?plain=1#L125-L195.

    @rustbot label +S-blocked-external

  7. added
    S-blocked-externalStatus: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix
    on Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: enhancementCommand-testS-blocked-externalStatus: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions