Skip to content

stty: enable the BSD cfg alias in integration tests - #15425

Open
limadog9 wants to merge 1 commit into
uutils:mainfrom
limadog9:fix/stty-test-bsd-alias
Open

limadog9 wants to merge 1 commit into
uutils:mainfrom
limadog9:fix/stty-test-bsd-alias

Conversation

@limadog9

Copy link
Copy Markdown
Contributor

Define the BSD configuration alias for integration tests and use it in test_stty.rs instead of repeated platform lists.

Closes #15423.

Comment thread build.rs Outdated
const FEATURE_PREFIX: &str = "feat_";
const OVERRIDE_PREFIX: &str = "uu_";

// Configuration aliases are crate-local; integration tests need this too.

@xtqqczze xtqqczze Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// Configuration aliases are crate-local; integration tests need this too.

no need to narrate the diff in comments

Comment thread build.rs

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.

Is this applied for uu_*? Or coreutils and test only?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this applied for uu_*? Or coreutils and test only?

These changes affect coreutils package only (including tests/by-util).

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.

Sad...

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Unfortunately, we have to define cfg aliases in each package, at least based on my conclusions in #11016.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If we want the full buffet, could we put the alias definitions in a shared build helper that each package’s build.rs calls? Cargo would still need the hookup in each package, but at least we’d only cook the BSD list once

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

could we put the alias definitions in a shared build helper that each package’s build.rs calls?

We already tried and failed to make that work: #11016 (comment)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Could we reuse uucore_procs for a small platform_cfg_aliases!() macro called from each build script? It could supply the shared platform-only aliases and accept package-specific aliases as input. That would preserve the existing cfg checks without another helper crate or cross-package includes. Each package would still need to opt in, but perhaps we could try it just for root + stty first?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We found the right approach for a shared build helper: #15634.

@limadog9
limadog9 force-pushed the fix/stty-test-bsd-alias branch from 5875f0b to 9ee6a9d Compare October 16, 2026 16:50
@codspeed

codspeed Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 8.45%

⚠️ 123 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

ℹ️ 1 benchmark has no flame graph

The flamegraph could not be generated because too much time was spent in runtime internals, making the visualization not useful for performance analysis.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
❌ 1 regressed benchmark
✅ 399 untouched benchmarks
⏩ 70 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Simulation factor_three_39_bit_primes 593.6 ms 752.6 ms -21.12%
⚡ Simulation factor_five_38_bit_primes 1.9 s 1.8 s +6.25%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing limadog9:fix/stty-test-bsd-alias (9ee6a9d) with main (2e28cc3)

Open in CodSpeed

Footnotes

  1. 70 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@xtqqczze

Copy link
Copy Markdown
Collaborator

Superseded by #15634.

This branch has not been deployed

No deployments
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.

test_stty.rs: Support bsd cfg_aliases

3 participants