All of lore.kernel.org
 help / color / mirror / Atom feed
* [nft PATCH 0/4] Inspect and improve test suite code coverage
@ 2026-01-27 22:29 Phil Sutter
  2026-01-27 22:29 ` [nft PATCH 1/4] configure: Implement --enable-profiling option Phil Sutter
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Phil Sutter @ 2026-01-27 22:29 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: netfilter-devel

While inspecting the test suites' code coverage using --coverage gcc
option and gcov(r) for analysis, I noticed that 'nft monitor' processes
did not influence the stats at all. It appears that a process receiving
SIGTERM or SIGINT (via kill or ctrl-c) does not dump profiling data at
exit. Installing a signal handler for those signals which calls exit()
resolves this, so patch 1 of this series implements --enable-profiling
into configure which also conditionally enables said signal handler.

Patches 2 and 4 fix for zero test coverage of src/nftrace.c and
src/xt.c, bumping stats to ~90% for both.

Patch 3 fixes for ignored comment matches in translated iptables-nft
rules. This is required for patch 4 which uses a comment match to check
whether nft is built with translation support.

Phil Sutter (4):
  configure: Implement --enable-profiling option
  tests: shell: Add a simple test for nftrace
  xt: Print comment match data as well
  tests: shell: Add a basic test for src/xt.c

 .gitignore                                 |   5 +
 Makefile.am                                |  16 +++
 configure.ac                               |   7 ++
 src/main.c                                 |  30 +++++
 src/xt.c                                   |   6 +-
 tests/shell/features/xtables_xlate.sh      |  21 ++++
 tests/shell/testcases/parsing/compat_xlate | 135 +++++++++++++++++++++
 tests/shell/testcases/trace/0001simple     |  85 +++++++++++++
 8 files changed, 304 insertions(+), 1 deletion(-)
 create mode 100755 tests/shell/features/xtables_xlate.sh
 create mode 100755 tests/shell/testcases/parsing/compat_xlate
 create mode 100755 tests/shell/testcases/trace/0001simple

-- 
2.51.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-02-05 15:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-27 22:29 [nft PATCH 0/4] Inspect and improve test suite code coverage Phil Sutter
2026-01-27 22:29 ` [nft PATCH 1/4] configure: Implement --enable-profiling option Phil Sutter
2026-02-05  1:29   ` Pablo Neira Ayuso
2026-01-27 22:29 ` [nft PATCH 2/4] tests: shell: Add a simple test for nftrace Phil Sutter
2026-01-27 22:29 ` [nft PATCH 3/4] xt: Print comment match data as well Phil Sutter
2026-02-05  1:35   ` Pablo Neira Ayuso
2026-02-05 13:29     ` Phil Sutter
2026-01-27 22:29 ` [nft PATCH 4/4] tests: shell: Add a basic test for src/xt.c Phil Sutter
2026-02-05  1:35 ` [nft PATCH 0/4] Inspect and improve test suite code coverage Pablo Neira Ayuso
2026-02-05 13:30   ` Phil Sutter
2026-02-05 15:21 ` Phil Sutter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.