All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH nft 0/6] add infrastructure for unit tests
@ 2023-11-03 11:05 Thomas Haller
  2023-11-03 11:05 ` [PATCH nft 1/6] gitignore: ignore build artifacts from top level file Thomas Haller
                   ` (7 more replies)
  0 siblings, 8 replies; 14+ messages in thread
From: Thomas Haller @ 2023-11-03 11:05 UTC (permalink / raw)
  To: NetFilter; +Cc: Thomas Haller

There are new new make targets:

  - "build-all"
  - "check" (runs "normal" tests, like unit tests and "tools/check-tree.sh").
  - "check-more" (runs extra tests, like "tests/build")
  - "check-all" (runs "check" + "check-more")
  - "check-local" (a subset of "check")
  - "check-TESTS" (the unit tests)

The unit tests have a test runner "tools/test-runner.sh". See
`tools/test-runner.sh -h` for options, like valgrind, GDB, or make.
It also runs the test in a separate namespace (rootless).

To run unit tests only, `make check-TESTS` or `tools/test-runner.sh
tests/unit/test-libnftables-static -m`.

The unit tests are of course still empty. "tests/unit" is the place
where tests shall be added.

Thomas Haller (6):
  gitignore: ignore build artifacts from top level file
  build: add basic "check-{local,more,all}" and "build-all" make targets
  build: add `make check-tests-build` to add build test
  build: add check for consistency of source tree
  build: cleanup if blocks for conditional compilation
  tests/unit: add unit tests for libnftables

 .gitignore                           |  15 +-
 Makefile.am                          | 128 ++++++++++++---
 src/.gitignore                       |   5 -
 tests/unit/nft-test.h                |  14 ++
 tests/unit/test-libnftables-static.c |  16 ++
 tests/unit/test-libnftables.c        |  21 +++
 tools/test-runner.sh                 | 228 +++++++++++++++++++++++++++
 7 files changed, 399 insertions(+), 28 deletions(-)
 create mode 100644 tests/unit/nft-test.h
 create mode 100644 tests/unit/test-libnftables-static.c
 create mode 100644 tests/unit/test-libnftables.c
 create mode 100755 tools/test-runner.sh

-- 
2.41.0


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

end of thread, other threads:[~2023-11-03 15:58 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-03 11:05 [PATCH nft 0/6] add infrastructure for unit tests Thomas Haller
2023-11-03 11:05 ` [PATCH nft 1/6] gitignore: ignore build artifacts from top level file Thomas Haller
2023-11-03 11:30   ` Pablo Neira Ayuso
2023-11-03 12:57     ` Thomas Haller
2023-11-03 11:05 ` [PATCH nft 2/6] build: add basic "check-{local,more,all}" and "build-all" make targets Thomas Haller
2023-11-03 11:05 ` [PATCH nft 3/6] build: add `make check-tests-build` to add build test Thomas Haller
2023-11-03 11:05 ` [PATCH nft 4/6] build: add check for consistency of source tree Thomas Haller
2023-11-03 11:05 ` [PATCH nft 5/6] build: cleanup if blocks for conditional compilation Thomas Haller
2023-11-03 11:05 ` [PATCH nft 6/6] tests/unit: add unit tests for libnftables Thomas Haller
2023-11-03 11:43 ` [PATCH nft 0/6] add infrastructure for unit tests Pablo Neira Ayuso
2023-11-03 12:26 ` Florian Westphal
2023-11-03 13:08   ` Thomas Haller
2023-11-03 15:33   ` Pablo Neira Ayuso
2023-11-03 15:57     ` Thomas Haller

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.