Skip to content

uutests: gate by target support - #14252

Open
xtqqczze wants to merge 4 commits into
uutils:mainfrom
xtqqczze:targets-uutests
Open

xtqqczze wants to merge 4 commits into
uutils:mainfrom
xtqqczze:targets-uutests

Conversation

@xtqqczze

@xtqqczze xtqqczze commented Aug 29, 2026 •

Copy link
Copy Markdown
Collaborator
RUSTC_BOOTSTRAP=1 cargo clippy -q -Zbuild-std=std,panic_abort -p uutests --all-features --target=powerpc64-ibm-aix --target=x86_64-linux-android --target=x86_64-pc-cygwin --target=aarch64-apple-darwin --target=x86_64-unknown-freebsd --target=x86_64-unknown-haiku --target=x86_64-unknown-hermit --target=x86_64-unknown-hurd-gnu --target=aarch64-unknown-illumos --target=x86_64-unknown-linux-gnu --target=i686-unknown-netbsd --target=x86_64-unknown-openbsd --target=x86_64-unknown-redox --target=x86_64-pc-solaris --target=wasm32-wasip1 --target=x86_64-pc-windows-gnu

Closes #14935.

@github-actions

github-actions Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Binary size comparison:

Individual binary size comparison VS main (threshold: >=5% AND >=4 KB).

Total size of compared binaries: 153.09 MB (+904 KB, +0.58%)

Significant per-binary changes:
  expr     2.76 MB ->    3.65 MB  (+908 KB, +32.11%)

@codspeed

codspeed Bot commented Aug 30, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 7.88%

⚠️ 124 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.

❌ 2 regressed benchmarks
✅ 332 untouched benchmarks
⏩ 137 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Simulation factor_five_38_bit_primes 1.6 s 1.8 s -11.2%
❌ ⚠️ Simulation du_wide_tree[(5000, 500)] 15.3 ms 16 ms -4.44%

Tip

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


Comparing xtqqczze:targets-uutests (6f65a3b) with main (7654e67)

Open in CodSpeed

Footnotes

  1. 137 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. ↩

@github-actions

github-actions Bot commented Aug 30, 2026 •

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/date/resolution (fails in this run but passes in the 'main' branch)

@xtqqczze
xtqqczze force-pushed the targets-uutests branch 3 times, most recently from a620f78 to 1998905 Compare August 30, 2026 11:54
@xtqqczze

This comment was marked as outdated.

@xtqqczze
xtqqczze marked this pull request as ready for review August 30, 2026 16:10
@xtqqczze

This comment was marked as outdated.

@xtqqczze
xtqqczze force-pushed the targets-uutests branch 3 times, most recently from 1068f5e to b4a3d9a Compare August 30, 2026 21:45
@xtqqczze

This comment was marked as outdated.

@xtqqczze

This comment was marked as outdated.

YodonTan pushed a commit to YodonTan/coreutils that referenced this pull request Aug 31, 2026
Fixes required to build uutils/coreutils on HarmonyOS (aarch64-unknown-linux-ohos):

- uucore/fsext: statfs.f_type is u64 on OHOS; route it through the musl branch.
- hostid: implement gethostid locally (read /etc/hostid, else hash hostname)
  because the OHOS SDK libc dropped the symbol.
- date: pass through the system time zone ID from OH_TimeService_GetTimeZone
  and resolve it with embedded IANA tzdata (jiff-tzdb) via TimeZone::tzif,
  instead of relying on /etc/localtime or a POSIX-injected TZ. The OHOS-only
  helper is cfg-gated; non-OHOS code paths are byte-identical to upstream.

utmpx is intentionally left untouched: upstream uutils#14252 disables it on OHOS
(no utmp data source there), and this PR defers to that approach.

Also syncs fuzz/Cargo.lock after adding the jiff-tzdb dependency.

Verified on-device: date matches system time (+0800 CST; 1987-06-01 -> +0900 CDT),
hostid behaves, builds pass on the non-utmpx feature set.
sylvestre pushed a commit that referenced this pull request Sep 7, 2026
Fixes required to build uutils/coreutils on HarmonyOS (aarch64-unknown-linux-ohos):

- uucore/fsext: statfs.f_type is u64 on OHOS; route it through the musl branch.
- hostid: implement gethostid locally (read /etc/hostid, else hash hostname)
  because the OHOS SDK libc dropped the symbol.
- date: pass through the system time zone ID from OH_TimeService_GetTimeZone
  and resolve it with embedded IANA tzdata (jiff-tzdb) via TimeZone::tzif,
  instead of relying on /etc/localtime or a POSIX-injected TZ. The OHOS-only
  helper is cfg-gated; non-OHOS code paths are byte-identical to upstream.

utmpx is intentionally left untouched: upstream #14252 disables it on OHOS
(no utmp data source there), and this PR defers to that approach.

Also syncs fuzz/Cargo.lock after adding the jiff-tzdb dependency.

Verified on-device: date matches system time (+0800 CST; 1987-06-01 -> +0900 CDT),
hostid behaves, builds pass on the non-utmpx feature set.
@sylvestre
sylvestre enabled auto-merge (rebase) September 7, 2026 11:56
auto-merge was automatically disabled September 7, 2026 12:20

Head branch was pushed to by a user without write access

@xtqqczze
xtqqczze force-pushed the targets-uutests branch 4 times, most recently from 1984b63 to ce61c93 Compare September 7, 2026 12:39
@xtqqczze
xtqqczze marked this pull request as draft September 8, 2026 19:14
Devel08 pushed a commit to Devel08/coreutils that referenced this pull request Sep 28, 2026
Fixes required to build uutils/coreutils on HarmonyOS (aarch64-unknown-linux-ohos):

- uucore/fsext: statfs.f_type is u64 on OHOS; route it through the musl branch.
- hostid: implement gethostid locally (read /etc/hostid, else hash hostname)
  because the OHOS SDK libc dropped the symbol.
- date: pass through the system time zone ID from OH_TimeService_GetTimeZone
  and resolve it with embedded IANA tzdata (jiff-tzdb) via TimeZone::tzif,
  instead of relying on /etc/localtime or a POSIX-injected TZ. The OHOS-only
  helper is cfg-gated; non-OHOS code paths are byte-identical to upstream.

utmpx is intentionally left untouched: upstream uutils#14252 disables it on OHOS
(no utmp data source there), and this PR defers to that approach.

Also syncs fuzz/Cargo.lock after adding the jiff-tzdb dependency.

Verified on-device: date matches system time (+0800 CST; 1987-06-01 -> +0900 CDT),
hostid behaves, builds pass on the non-utmpx feature set.
@xtqqczze

This comment was marked as resolved.

@xtqqczze xtqqczze closed this Sep 28, 2026
@xtqqczze xtqqczze self-assigned this Sep 28, 2026
@xtqqczze xtqqczze reopened this Oct 13, 2026
@xtqqczze
xtqqczze force-pushed the targets-uutests branch 2 times, most recently from 439ceb5 to 8e79705 Compare October 13, 2026 13:45
@xtqqczze
xtqqczze marked this pull request as ready for review October 14, 2026 01:14
Comment thread Cargo.toml
rand_chacha = { version = "0.10.0" }
rayon = "1.10"
regex = "1.10.4"
rlimit = "0.11.0"

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.

why a new crate? rustix already gives us setrlimit, and we still need rustix process for the other tests

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Without the rlimit switch, uutests would fail to build on Redox, blocking progress toward getting Redox CI working. Since this only affects tests, I don't think the additional dependency is a concern.

Comment thread tests/uutests/Cargo.toml

[dependencies]
ctor = { workspace = true }
[target.'cfg(not(any(target_os = "aix", target_os = "horizon")))'.dependencies]

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.

please split the rlimit switch and the target gating into two PRs

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I have #14739, but that is blocked on Redox CI.

// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.

#![cfg(not(any(target_os = "aix", target_os = "horizon")))]

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.

why compile the whole crate to nothing on aix/horizon? what fails there?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

nix fails to compile on both:

$ RUSTC_BOOTSTRAP=1 cargo hack clippy -Zbuild-std=std,panic_abort --quiet -p uutests --all-features --lib --target powerpc64-ibm-aix
info: running `cargo clippy -Zbuild-std=std,panic_abort --quiet --all-features --lib --target powerpc64-ibm-aix` on uutests (1/1)
error[E0425]: cannot find type `Pid` in this scope
  --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/nix-0.31.3/src/pty.rs:38:16
   |
38 |         child: Pid,
   |                ^^^ not found in this scope
   |
help: consider importing this struct
   |
 3 + use crate::unistd::Pid;
   |
$ cargo +nightly hack clippy -Zbuild-std=std,panic_abort --quiet -p uutests --all-features --lib --target armv6k-nintendo-3ds
info: running `cargo clippy -Zbuild-std=std,panic_abort --quiet --all-features --lib --target armv6k-nintendo-3ds` on uutests (1/1)
error[E0432]: unresolved import `self::consts`
  --> /Users/matthew/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/nix-0.31.3/src/errno.rs:19:15
   |
19 | pub use self::consts::*;
   |               ^^^^^^ could not find `consts` in `self`

Comment thread tests/uutests/src/lib/util.rs Outdated
Comment thread tests/uutests/src/lib/util.rs
@xtqqczze
xtqqczze requested a review from sylvestre October 14, 2026 20:07
@xtqqczze
xtqqczze force-pushed the targets-uutests branch 2 times, most recently from 049992a to caba015 Compare October 14, 2026 22:32
```sh
RUSTC_BOOTSTRAP=1 cargo clippy -q -Zbuild-std=std,panic_abort -p uutests --all-features --target=powerpc64-ibm-aix --target=x86_64-linux-android --target=x86_64-pc-cygwin --target=aarch64-apple-darwin --target=x86_64-unknown-freebsd --target=x86_64-unknown-haiku --target=x86_64-unknown-hermit --target=x86_64-unknown-hurd-gnu --target=aarch64-unknown-illumos --target=x86_64-unknown-linux-gnu --target=i686-unknown-netbsd --target=x86_64-unknown-openbsd --target=x86_64-unknown-redox --target=x86_64-pc-solaris --target=wasm32-wasip1 --target=x86_64-pc-windows-gnu
```

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.

uutests: gate by target support

2 participants