History log of /freebsd/tests/sys/pmc/Makefile (Results 1 – 10 of 10)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/14.5.0
# 22e27e30 03-Sep-2026 Mitchell Horne <mhorne@FreeBSD.org>

pmc_exterr_test: add MACHINE_ARCH check

The tests manipulate MD structure fields directly. Build these tests for
amd64 only.

Fixes: e555692d1bb ("hwpmc: Add ATF regression tests for hwpmc EXTERROR

pmc_exterr_test: add MACHINE_ARCH check

The tests manipulate MD structure fields directly. Build these tests for
amd64 only.

Fixes: e555692d1bb ("hwpmc: Add ATF regression tests for hwpmc EXTERROR diagnostics")

show more ...


Revision tags: release/15.1.0-p3, release/15.0.0-p13, release/14.4.0-p9, release/15.1.0-p2, release/15.0.0-p12, release/14.4.0-p8, release/15.0.0-p11, release/14.3.0-p16, release/14.4.0-p7, release/15.1.0-p1
# e555692d 12-Jun-2026 Andre Silva <andasilv@amd.com>

hwpmc: Add ATF regression tests for hwpmc EXTERROR diagnostics

Root-only ATF program hitting negative allocate/attach/read-write paths
and asserting the exterr(3) text. AMD/IBS cases skip without th

hwpmc: Add ATF regression tests for hwpmc EXTERROR diagnostics

Root-only ATF program hitting negative allocate/attach/read-write paths
and asserting the exterr(3) text. AMD/IBS cases skip without the PMC
class; program skips without hwpmc.

Additional changes by mhorne@:
- Move and rename to the established test directory tests/sys/pmc
- Remove broken test amd_missing_pmu_flag; fixed by recent change
6c4d9b9af1a3
- Add ATF_REQUIRE_FEATURE("exterr_strings") to skip the tests on kernels
compiled without the strings
- Remove arch-conditional compilation; tests are properly gated by PMC
class check
- Fix copyright formatting

Reviewed by: Ali Mashtizadeh <ali@mashtizadeh.com>
Signed-off-by: Andre Silva <andasilv@amd.com>
Co-authored-by: mhorne
Sponsored by: AMD
Pull Request: https://github.com/freebsd/freebsd-src/pull/2180

show more ...


# 8f0789be 25-Aug-2026 Alexander Leidinger <netchild@FreeBSD.org>

hwpmc tests: the sampling log file

Nine ATF cases covering PMC_OP_CONFIGURELOG and the descriptor-less
log operations: which descriptors are accepted, when a log is required
in the first place, and

hwpmc tests: the sampling log file

Nine ATF cases covering PMC_OP_CONFIGURELOG and the descriptor-less
log operations: which descriptors are accepted, when a log is required
in the first place, and what the log operations do without one.

MFC after: 1 month
MFC to: stable/15
MFC to: stable/14
Assisted-by: Claude Code (Opus 5)

show more ...


# bea7b932 25-Aug-2026 Alexander Leidinger <netchild@FreeBSD.org>

hwpmc: add credential-transition exec tests (keep and drop)

The companion to pmc_exec_test.c, which covers only the drop side of a
credential-changing exec. Three cases cover what the drop must not

hwpmc: add credential-transition exec tests (keep and drop)

The companion to pmc_exec_test.c, which covers only the drop side of a
credential-changing exec. Three cases cover what the drop must not
overreach into: an exec that changes no credentials keeps the PMC, a
set-id exec whose credential change the kernel suppresses for a traced
target keeps it too, and a set-id fexecve(2) drops it. They exercise
the permission logic FreeBSD-SA-26:56.hwpmc reworked, not the defect
it fixed.

All three pass on a debug (INVARIANTS+WITNESS) kernel. The two
keep-cases were each observed to fail on a kernel mutated to detach
unconditionally.

MFC after: 1 month
MFC to: stable/15
MFC to: stable/14
Assisted-by: Claude Code (Opus 4.8)

show more ...


# d00da145 25-Aug-2026 Alexander Leidinger <netchild@FreeBSD.org>

hwpmc tests: process-attachment lifecycle and ownership cases

Seven ATF cases covering process-attachment teardown orderings: a
target that exits before it is detached, the owner that exits before
i

hwpmc tests: process-attachment lifecycle and ownership cases

Seven ATF cases covering process-attachment teardown orderings: a
target that exits before it is detached, the owner that exits before
its target (hwpmc's other unlink path), releasing a still-running
attached PMC, row exhaustion with out-of-order release, and
PMC_F_DESCENDANTS inheritance including a fork storm.

All pass on a debug (INVARIANTS+WITNESS) and a KASAN kernel.

MFC after: 1 month
MFC to: stable/15
MFC to: stable/14
Assisted-by: Claude Code (Opus 5)

show more ...


# 17fca802 25-Aug-2026 Alexander Leidinger <netchild@FreeBSD.org>

hwpmc: add tests for handle validation and the privilege boundaries

A pmc_id_t is a packed integer that the driver hands to userland and
accepts back on eleven operations, and nothing tested what ha

hwpmc: add tests for handle validation and the privilege boundaries

A pmc_id_t is a packed integer that the driver hands to userland and
accepts back on eleven operations, and nothing tested what happens when
one comes back forged, stale, or belonging to another process. Neither
was there a test that an unprivileged caller is refused the operations
that need a privilege.

The cases use a SOFT-class PMC wherever the counter itself does not
matter, so they run on a machine with no PMU.

MFC after: 1 month
MFC to: stable/15
MFC to: stable/14
Assisted-by: Claude Code (Opus 5)

show more ...


# 068957e0 25-Aug-2026 Alexander Leidinger <netchild@FreeBSD.org>

hwpmc: add regression tests for a credential-changing exec

This tests what FreeBSD-SA-26:56.hwpmc fixed.

exec_setgid_drops_pmc asserts the kernel takes a process-mode PMC away
when its target execs

hwpmc: add regression tests for a credential-changing exec

This tests what FreeBSD-SA-26:56.hwpmc fixed.

exec_setgid_drops_pmc asserts the kernel takes a process-mode PMC away
when its target execs a set-gid program its owner is not entitled to
trace.

exec_setuid_no_double_unlink lets the target exec a set-uid program;
the teardown must unlink the process descriptor exactly once, and
completing at all is the assertion.

Both need an unprivileged owner and must not drop privileges themselves,
since p_candebug() would then refuse the target to its own owner; they
ask for require.user instead.

MFC after: 1 month
MFC to: stable/15
MFC to: stable/14
Assisted-by: Claude Code (Opus 5)

show more ...


# df537ff1 26-Aug-2026 Alexander Leidinger <netchild@FreeBSD.org>

hwpmc tests: sort the list of test programs

MFC after: 1 month
MFC to: stable/15
MFC to: stable/14


# 3c3f886e 19-Jul-2026 Alexander Leidinger <netchild@FreeBSD.org>

hwpmc: add regression tests for detaching a live process-mode PMC

Attach a process-mode counting PMC to the current process, start it,
then detach and release it while it is still loaded on the hard

hwpmc: add regression tests for detaching a live process-mode PMC

Attach a process-mode counting PMC to the current process, start it,
then detach and release it while it is still loaded on the hardware -
the case that previously leaked the PMC's runcount reference and
wedged pmc_wait_for_pmc_idle() at release. A second case does the same
from a multi-threaded process so the sibling threads' references have
to be drained too.

The tests need an allocatable process-mode counting event and skip
where none is available (hwpmc(4) not loaded, or a VM without a vPMU).

Reviewed by: adrian
MFC after: 2 weeks
Assisted-by: Claude Code (Fable 5)
Differential Revision: https://reviews.freebsd.org/D58343

show more ...


# 2cfd82f7 19-Jul-2026 Alexander Leidinger <netchild@FreeBSD.org>

hwpmc: add regression tests for counting-PMC counter wraparound

Exercise a process-mode counting PMC whose accumulated count crosses,
or already exceeds, the range of the underlying hardware counter

hwpmc: add regression tests for counting-PMC counter wraparound

Exercise a process-mode counting PMC whose accumulated count crosses,
or already exceeds, the range of the underlying hardware counter.
Before the previous commit, the first context switch after the
hardware counter wrapped panicked INVARIANTS kernels with "negative
increment" and silently corrupted the accumulated count on other
kernels.

The tests need a hardware counting event backed by a counter narrower
than 64 bits and skip where none is available (hwpmc(4) not loaded,
or a VM without a vPMU).

Reviewed by: adrian
MFC after: 2 weeks
Assisted-by: Claude Code (Fable 5)
Differential Revision: https://reviews.freebsd.org/D58341

show more ...