Repository navigation
openbsd: add uvmexp structure and related constants - #5658
Conversation
|
Some changes occurred in an OpenBSD module cc @semarie |
f034c94 to
55e8696
Compare
55e8696 to
aad6011
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Reminder, once the PR becomes ready for a review, use |
aad6011 to
b62df85
Compare
|
@rustbot ready |
There was a problem hiding this comment.
CI on openbsd is failing:
cargo:warning= 675 | static enum uvm_exp_counters ctest_const_flt_pgrele_val_static = flt_pgrele;
cargo:warning= | ^~~~~~~~~~
cargo:warning=/data/semarie/repos/rust/build-libc/build/x86_64-unknown-openbsd/debug/build/libc-test-561e8326f74d569e/out/ctest_output.c:675:30: error: variable has incomplete type 'enum uvm_exp_counters'
cargo:warning= 675 | static enum uvm_exp_counters ctest_const_flt_pgrele_val_static = flt_pgrele;
cargo:warning= | ^
cargo:warning=/data/semarie/repos/rust/build-libc/build/x86_64-unknown-openbsd/debug/build/libc-test-561e8326f74d569e/out/ctest_output.c:639:13: note: forward declaration of 'enum uvm_exp_counters'
cargo:warning= 639 | static enum uvm_exp_counters ctest_const_faults_val_static = faults;
cargo:warning= | ^
cargo:warning=/data/semarie/repos/rust/build-libc/build/x86_64-unknown-openbsd/debug/build/libc-test-561e8326f74d569e/out/ctest_output.c:681:65: error: use of undeclared identifier 'flt_relck'
cargo:warning= 681 | static enum uvm_exp_counters ctest_const_flt_relck_val_static = flt_relck;
cargo:warning= | ^~~~~~~~~
cargo:warning=/data/semarie/repos/rust/build-libc/build/x86_64-unknown-openbsd/debug/build/libc-test-561e8326f74d569e/out/ctest_output.c:681:30: error: variable has incomplete type 'enum uvm_exp_counters'
cargo:warning= 681 | static enum uvm_exp_counters ctest_const_flt_relck_val_static = flt_relck;
cargo:warning= | ^
cargo:warning=/data/semarie/repos/rust/build-libc/build/x86_64-unknown-openbsd/debug/build/libc-test-561e8326f74d569e/out/ctest_output.c:639:13: note: forward declaration of 'enum uvm_exp_counters'
cargo:warning= 639 | static enum uvm_exp_counters ctest_const_faults_val_static = faults;
cargo:warning= | ^
cargo:warning=/data/semarie/repos/rust/build-libc/build/x86_64-unknown-openbsd/debug/build/libc-test-561e8326f74d569e/out/ctest_output.c:687:67: error: use of undeclared identifier 'flt_norelck'
cargo:warning= 687 | static enum uvm_exp_counters ctest_const_flt_norelck_val_static = flt_norelck;
cargo:warning= | ^~~~~~~~~~~
cargo:warning=/data/semarie/repos/rust/build-libc/build/x86_64-unknown-openbsd/debug/build/libc-test-561e8326f74d569e/out/ctest_output.c:687:30: error: variable has incomplete type 'enum uvm_exp_counters'
cargo:warning= 687 | static enum uvm_exp_counters ctest_const_flt_norelck_val_static = flt_norelck;
cargo:warning= | ^
cargo:warning=/data/semarie/repos/rust/build-libc/build/x86_64-unknown-openbsd/debug/build/libc-test-561e8326f74d569e/out/ctest_output.c:639:13: note: forward declaration of 'enum uvm_exp_counters'
cargo:warning= 639 | static enum uvm_exp_counters ctest_const_faults_val_static = faults;
cargo:warning= | ^
cargo:warning=/data/semarie/repos/rust/build-libc/build/x86_64-unknown-openbsd/debug/build/libc-test-561e8326f74d569e/out/ctest_output.c:693:65: error: use of undeclared identifier 'flt_anget'
cargo:warning= 693 | static enum uvm_exp_counters ctest_const_flt_anget_val_static = flt_anget;
cargo:warning= | ^~~~~~~~~
cargo:warning=fatal error: too many errors emitted, stopping now [-ferror-limit=]
cargo:warning=20 errors generated.
--- stderr
thread 'main' (328062) panicked at ctest/src/generator.rs:1197:23:
building the test failed: unable to compile C tests ToolExecError: command did not execute successfully (status code exit status: 1): "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-gdwarf-2" "-fno-omit-frame-pointer" "-mno-omit-leaf-frame-pointer" "-m64" "--target=x86_64-unknown-openbsd" "-Wall" "-Wextra" "-Wall" "-Wextra" "-Werror" "-Wno-unused-parameter" "-Wno-type-limits" "-Wno-deprecated-declarations" "-Wno-address-of-packed-member" "-Wno-unknown-warning-option" "-Wno-deprecated-declarations" "-o" "/data/semarie/repos/rust/build-libc/build/x86_64-unknown-openbsd/debug/build/libc-test-561e8326f74d569e/out/574d5a55758aae73-ctest_output.o" "-c" "/data/semarie/repos/rust/build-libc/build/x86_64-unknown-openbsd/debug/build/libc-test-561e8326f74d569e/out/ctest_output.c"
stack backtrace:
0: __rustc::rust_begin_unwind
1: core::panicking::panic_fmt
2: <ctest::generator::TestGenerator>::build_test::<&str>
at /data/semarie/repos/rust/libc-rs/ctest/src/generator.rs:1197:23
3: build_script_main::test_openbsd
at ./build/main.rs:563:9
4: build_script_main::do_ctest
at ./build/main.rs:66:29
5: build_script_main::main
at ./build/main.rs:112:5
6: <fn() as core::ops::function::FnOnce<()>>::call_once
at /rustc/58cf8f9c35b355199727627d07ae34a4e2846d67/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Mon Oct 26 19:01:11 CET 2026: run_test: task done: status=101
The uvm/uvmexp.rs file has been created with some constants, the structures uvmexp and _ps_strings, and the enum uvm_exp_counters. Ref: https://github.com/openbsd/src/blob/c5e675778264c6dad5fdb11cb84f6e30837609a3/sys/uvm/uvmexp.h
b62df85 to
683237b
Compare
|
I've fixed the error, the enumeration wasn't available in user space. How do you run the tests locally? On OpenBSD I can run |
|
I am running the tests with the CI script: |
|
Thank you for the information. Unfortunately it works only from OpenBSD 8.0, since the tests use getexecpath. I'll try when I'll have upgraded. About the errors, I don't understand. All the CI pass on Github, it should also pass on your machine.
|
|
This may cover the missing function #5670 Those errors are bizarre, is this ctest's expansion doing something wrong? E.g. There are only 116 lines to the file. The errors are as if the file is being repeated |
thanks for the hint. It looks like my script for applying the PR didn't properly clean the repository state and lead to include the file twice (file in an untracked directory was not removed). I am rerunning the CI here |
|
Thank you for your reviews guys! |
Description
The uvm/uvmexp.rs file has been created with some constants, the structures uvmexp and _ps_strings, and the enum uvm_exp_counters.
Source
https://github.com/openbsd/src/blob/c5e675778264c6dad5fdb11cb84f6e30837609a3/sys/uvm/uvmexp.h
@rustbot label stable-nominated