Skip to content

Fix build and tests for uptime on OpenBSD - #9158

Merged
sylvestre merged 2 commits into
uutils:mainfrom
lcheylus:openbsd-uptime
Nov 7, 2025
Merged

Fix build and tests for uptime on OpenBSD#9158
sylvestre merged 2 commits into
uutils:mainfrom
lcheylus:openbsd-uptime

Conversation

@lcheylus

@lcheylus lcheylus commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

Fix #9157

Build for uptime OK on OpenBSD current/amd64 with Rust 1.90.0

$ cargo build -v --no-default-features --features uptime
(...)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.11s

$ ./target/debug/coreutils uptime
 10:58:57  up  7 days 22:44,  1 user,  load average: 0.21, 0.49, 0.75
$ ./target/debug/coreutils uptime -s
2025-10-29 12:14:06
$ ./target/debug/coreutils uptime && guptime
 10:59:30  up  7 days 22:45,  1 user,  load average: 0.25, 0.47, 0.73
 10:59:30  up 7 days 22:45,  1 user,  load average: 0.25, 0.47, 0.73

Tests for uptime OK on OpenBSD current/amd64 with Rust 1.90.0

$ cargo test -v --no-default-features --features uptime
(...)
running 7 tests
test test_uptime::test_invalid_arg ... ok
test test_uptime::test_uptime_check_users_openbsd ... ok
test test_uptime::test_uptime ... ok
test test_uptime::test_uptime_with_dir ... ok
test test_uptime::test_uptime_with_extra_argument ... ok
test test_uptime::test_uptime_with_non_existent_file ... ok
test test_uptime::test_uptime_since ... ok

test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s

@oech3

oech3 commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

@cakebaker Conflics with your #7256 ?

@cakebaker

Copy link
Copy Markdown
Contributor

@oech3 it's possible, though my PR is work in progress anyway.

Signed-off-by: Laurent Cheylus <foxy@free.fr>
Signed-off-by: Laurent Cheylus <foxy@free.fr>
@codspeed-hq

codspeed-hq Bot commented Nov 7, 2025

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #9158 will degrade performances by 2.55%

Comparing lcheylus:openbsd-uptime (7b1fbc0) with main (5b79ae4)

Summary

❌ 1 regression
✅ 124 untouched

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
du_human_balanced_tree[(5, 4, 10)] 10.1 ms 10.4 ms -2.55%

@github-actions

github-actions Bot commented Nov 7, 2025

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)

@sylvestre
sylvestre merged commit ad1bac4 into uutils:main Nov 7, 2025
120 of 121 checks passed
@sylvestre

Copy link
Copy Markdown
Contributor

Merci Laurent ! :)

@oech3

oech3 commented Nov 8, 2025

Copy link
Copy Markdown
Contributor

Can this repo bump rust used at CI to 1.90+ from 1.85?

@cakebaker

Copy link
Copy Markdown
Contributor

@oech3 in the CI we already use Rust stable for most jobs. What you probably mean is the MSRV (minimum supported Rust version), which currently is 1.85.0. Increasing this value is more "difficult" because other projects depend on this project. For example, ubuntu is switching to uutils coreutils and they use Rust 1.85.0 afaik. What's the reason you want to see a bump?

@oech3

oech3 commented Nov 8, 2025 via email

Copy link
Copy Markdown
Contributor

@lcheylus
lcheylus deleted the openbsd-uptime branch November 8, 2025 07:38
@lcheylus

lcheylus commented Nov 8, 2025

Copy link
Copy Markdown
Contributor Author

Because this issue(PR) and an issue is 1.90 specific and not detected by CI. (and newer ver uses fast linker by default.)

This error is not detected by CI because there is no CI for OpenBSD (work that's been in progress for a long time that I need to finish...).

@oech3

oech3 commented Nov 8, 2025

Copy link
Copy Markdown
Contributor

Oops... Maybe, we can start CI from make UTILS="uptime true false"

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.

Build errors for uptime on OpenBSD

4 participants