Skip to content

Commit a986c3c

Browse files
committed
updated documentation with macos/freebsd build info
1 parent c977fa6 commit a986c3c

2 files changed

Lines changed: 42 additions & 2 deletions

File tree

docs/contribute/testing.adoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,23 @@ library and then install additional packages required for testing. See the
2525
*Building OpenSCAP on Linux* section in the link:../developer/developer.adoc[OpenSCAP Developer Manual]
2626
for more details.
2727

28+
For platform-focused validation, prefer CTest labels over ad-hoc test lists.
29+
For example, after a successful non-Linux build you can run:
30+
31+
----
32+
$ ctest -L macos
33+
$ ctest -L freebsd
34+
----
35+
36+
For a containerized Linux full-suite run, make sure a local SMTP listener and a
37+
session D-Bus are available before invoking CTest, otherwise MITRE, `fwupd`,
38+
and `systemd` coverage may be skipped or fail for environmental reasons:
39+
40+
----
41+
$ postfix start
42+
$ dbus-run-session -- ctest --output-on-failure
43+
----
44+
2845

2946
== Writing a new test
3047
In this guide we will use an example to describe the process of writing a test

docs/developer/developer.adoc

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ $ cmake ../
9797
$ make
9898
----
9999

100+
If you reuse an existing build tree after a Perl upgrade or package-manager
101+
change, CMake may retain stale `PERL_INCLUDE_PATH` or `PERL_LIBRARY` cache
102+
entries. The top-level build now clears cached Perl paths that no longer exist,
103+
so rerunning `cmake ../` in the same build directory is usually sufficient.
104+
If Perl detection still looks wrong, remove `CMakeCache.txt` and reconfigure.
105+
100106
On Ubuntu 18.04 and potentially other distro, the python3 dist-packages path is wrong.
101107
If the following command:
102108

@@ -168,6 +174,15 @@ Now you can execute the following command to run library self-checks:
168174
$ ctest
169175
----
170176

177+
For containerized Linux validation, start a local MTA and provide a session
178+
D-Bus before invoking the full suite so MITRE, `fwupd`, and `systemd`-related
179+
coverage stays active:
180+
181+
----
182+
$ postfix start
183+
$ dbus-run-session -- ctest --output-on-failure
184+
----
185+
171186
The test suite supports filtering by labels. This is useful for platform-specific
172187
or subsystem-specific runs:
173188

@@ -255,26 +270,35 @@ Notes:
255270
systems unless you are explicitly cross-compiling for Linux.
256271
* Some tests are intentionally labeled `linux_only` and should be filtered out
257272
using CTest labels.
273+
* After a successful non-Linux build, `ctest -L macos` or `ctest -L freebsd`
274+
provides a quick portability smoke test without pulling in Linux-only cases.
258275
* On macOS, `SCE` is disabled by default in the main CMake configuration.
259276

260277
=== Recent portability updates
261278

262279
The codebase contains recent portability work for macOS/FreeBSD, including:
263280

264281
* `sysctl` probe support for macOS (`/usr/sbin/sysctl -ae`) and FreeBSD/macOS
265-
branching,
282+
branching, including parsing of multiline BSD `sysctl -ae` values by treating
283+
only valid `name=value` headers as new items,
266284
* `memusage` support on macOS via Mach APIs,
267285
* `XCCDF` target MAC collection on macOS via `AF_LINK`,
268286
* fallback parser for password probe offline mode on systems without
269287
`fgetpwent(3)`,
288+
* shadow probe offline mode explicitly marked unsupported on platforms where
289+
the Linux-style shadow path does not apply,
270290
* runlevel probe behavior explicitly marked unsupported on macOS/FreeBSD
271291
(SysV runlevels are Linux/Solaris specific).
272292

273293
Targeted regression tests for these portability areas are located in:
274294

295+
* `tests/API/XCCDF/unittests/test_xccdf_result_sysinfo_platform.sh`
275296
* `tests/API/probes/test_memusage_platform.sh`
276297
* `tests/probes/password/test_probes_password_offline_fallback.sh`
298+
* `tests/probes/runlevel/test_probes_runlevel_unsupported.sh`
299+
* `tests/probes/shadow/test_probes_shadow_offline_unsupported.sh`
277300
* `tests/probes/sysctl/test_sysctl_probe.sh`
301+
* `tests/probes/sysctl/test_sysctl_probe_all.sh`
278302

279303
. *Install*
280304
+
@@ -437,4 +461,3 @@ For more information about OpenSCAP library, you can refer to this online
437461
reference manual: http://static.open-scap.org/openscap-1.2/[OpenSCAP
438462
reference manual]. This manual is included in a release tarball and can be
439463
regenerated from project sources by Doxygen documentation system.
440-

0 commit comments

Comments
 (0)