diff options
| author | Mickaël Salaün <mic@digikod.net> | 2026-08-11 11:43:30 +0200 |
|---|---|---|
| committer | Mickaël Salaün <mic@digikod.net> | 2026-08-17 10:17:18 +0200 |
| commit | 6e2df0117b6b23f88755d7397270cdaa2ac99a92 (patch) | |
| tree | 51c0e679c5ce64b793734c9a2190d0d183bcdd72 /scripts | |
| parent | 30478db56cf03db2f6ecd0e0d133b12c3fe83a57 (diff) | |
| download | linux-6e2df0117b6b23f88755d7397270cdaa2ac99a92.tar.gz linux-6e2df0117b6b23f88755d7397270cdaa2ac99a92.zip | |
selftests/landlock: Add network tracepoint tests
Add network-specific trace tests, co-located with the existing audit
fixture so each subsystem's functional, audit, and trace tests live
together.
Parameterized fixtures verify the landlock_deny_access_net event: a bind
or connect denied outside the ruleset emits exactly one event with the
expected sport/dport, an allowed bind or connect emits none, and the
unsandboxed baseline emits none. A separate fixture verifies the
landlock_check_rule_net event on an allowed bind, anchoring its domain,
access_request, port, and grants to exact values; only check_rule_fs had
a dedicated field test before.
Port fields are read in host endianness, matching the
landlock_net_port_attr.port UAPI convention, so the decimal comparisons
also catch byte-order regressions in the tracepoint plumbing. IPv6
trace tests are intentionally elided: IPv6 hook dispatch shares the
current_check_access_socket() path with IPv4 (covered by the audit
tests), and the trace fields do not depend on address family.
Cc: Günther Noack <gnoack@google.com>
Cc: Tingmao Wang <m@maowtm.org>
Link: https://patch.msgid.link/20260811094338.288094-17-mic@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
