]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tools: ynl: convert rt-route sample to selftest
authorJakub Kicinski <kuba@kernel.org>
Sat, 7 Mar 2026 03:36:30 +0000 (19:36 -0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 10 Mar 2026 00:02:27 +0000 (17:02 -0700)
commitaa234faa5a4d0f213697c4b9012c75b80b9d2c20
tree8f2584bc705f58bee10d6dbdeefd28711090fbdd
parente7a39b8f5fcf076b88925d0e24bdba69d988cf9e
tools: ynl: convert rt-route sample to selftest

Convert rt-route.c to use kselftest_harness.h with FIXTURE/TEST_F.
This is the last test to convert so clean up the Makefile.

Validate that the connected routes for 192.168.1.0/24 and
2001:db8::/64 appear in the dump.

Output:

  TAP version 13
  1..1
  # Starting 1 tests from 1 test cases.
  #  RUN           rt_route.dump ...
  # oif: nsim0            dst: 192.168.1.0/24
  # oif: lo               dst: ::1/128
  # oif: nsim0            dst: 2001:db8::1/128
  # oif: nsim0            dst: 2001:db8::/64
  # oif: nsim0            dst: fe80::/64
  # oif: nsim0            dst: ff00::/8
  #            OK  rt_route.dump
  ok 1 rt_route.dump
  # PASSED: 1 / 1 tests passed.
  # Totals: pass:1 fail:0 xfail:0 xpass:0 skip:0 error:0

Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Tested-by: Donald Hunter <donald.hunter@gmail.com>
Link: https://patch.msgid.link/20260307033630.1396085-11-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/net/ynl/tests/Makefile
tools/net/ynl/tests/rt-route.c
tools/net/ynl/tests/rt-route.sh [new file with mode: 0755]