Draft
Conversation
Guard Linux-specific compiler/linker assumptions in CMake and add platform-compatible fallbacks in Unix probes and common utilities. Add Darwin handling for sysctl collection, memory usage, and MAC address resolution. Add unsupported-path behavior for runlevel on platforms where runlevels are not applicable. Handle missing fgetpwent environments in password/shadow probe paths so builds complete and offline evaluation remains functional.
Extend test registration helpers to accept LABELS and auto-derive suite labels for easier selective execution across platforms. Introduce a helper for direct CTest command registration so non-shell tests follow the same labeling conventions as shell-driven tests.
Add memusage platform tests and password offline fallback coverage to protect recent cross-platform fixes. Update sysctl probe tests for Darwin-specific behavior and portable stderr handling so test outcomes are consistent on macOS.
Update developer documentation with label-driven CTest usage, helper semantics, and practical guidance for building and testing on macOS and FreeBSD. Summarize recent portability updates and point to targeted regression tests.
Apply the same label-based registration pattern to nested RPM probe test CMake files so selection behavior is consistent with the rest of the probe tree.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
This PR improves OpenSCAP portability for macOS and FreeBSD, expands targeted regression coverage, and tightens the CTest/test-documentation workflow while preserving Linux behavior.
What Changed
Build and configure
PERL_INCLUDE_PATHandPERL_LIBRARYentries during CMake configure when cached paths no longer exist. This makes reused build trees more resilient after Perl upgrades or dependency path changes.fgetpwent(3)at configure time and use that signal for portable password-probe behavior.asciidoctoras a docs backend in addition toasciidoc.Portability and probe behavior
memusage.fgetpwent(3).sysctlprobe path to parsesysctl -aeoutput safely, including multiline values, by treating only validname=valueheaders as new items.environwhere needed and guardingIFF_NOGROUPusage when that flag is not defined.Test infrastructure and regression coverage
add_oscap_ctest()and complete a broader CTest label rollout so shell and direct CTest/pytest tests can be filtered consistently by suite and platform.api,probes,unix,linux_only,macos, andfreebsd.sysctlparity test so BSD/macOS comparisons are based on value-bearingsysctl -aeentries and stable sorted output.Documentation
postfixanddbus-run-session).sysctl, shadow, runlevel, and targeted-regression behavior.Validation
FreeBSD 14
ctest --output-on-failure -L freebsdpassed5/5.Linux
298/299tests with18skips.tests/curl/test_curl_encoding.sh, which depends on live remote behavior fromgithub.comand is not in the code paths changed by this branch.probes/sysctl/test_sysctl_probe.shprobes/sysctl/test_sysctl_probe_all.shprobes/password/test_probes_password.shprobes/shadow/test_probes_shadow.shprobes/runlevel/test_probes_runlevel.shResult
This branch makes the portability work substantially more robust on macOS and FreeBSD, improves the reproducibility and discoverability of regression testing, and does so without introducing a Linux regression in the affected subsystems.