linux-stable/tools/testing/selftests
Hangbin Liu 429b55b441 selftests: fib_test: add a test case for IPv6 source address delete
Add a test case for IPv6 source address delete.

As David suggested, add tests:
- Single device using src address
- Two devices with the same source address
- VRF with single device using src address
- VRF with two devices using src address

As Ido points out, in IPv6, the preferred source address is looked up in
the same VRF as the first nexthop device. This will give us similar results
to IPv4 if the route is installed in the same VRF as the nexthop device, but
not when the nexthop device is enslaved to a different VRF. So add tests:
- src address and nexthop dev in same VR
- src address and nexthop device in different VRF

The link local address delete logic is different from the global address.
It should only affect the associate device it bonds to. So add tests cases
for link local address testing.

Here is the test result:

IPv6 delete address route tests
    Single device using src address
    TEST: Prefsrc removed when src address removed on other device      [ OK ]
    Two devices with the same source address
    TEST: Prefsrc not removed when src address exist on other device    [ OK ]
    TEST: Prefsrc removed when src address removed on all devices       [ OK ]
    VRF with single device using src address
    TEST: Prefsrc removed when src address removed on other device      [ OK ]
    VRF with two devices using src address
    TEST: Prefsrc not removed when src address exist on other device    [ OK ]
    TEST: Prefsrc removed when src address removed on all devices       [ OK ]
    src address and nexthop dev in same VRF
    TEST: Prefsrc removed from VRF when source address deleted          [ OK ]
    TEST: Prefsrc in default VRF not removed                            [ OK ]
    TEST: Prefsrc not removed from VRF when source address exist        [ OK ]
    TEST: Prefsrc in default VRF removed                                [ OK ]
    src address and nexthop device in different VRF
    TEST: Prefsrc not removed from VRF when nexthop dev in diff VRF     [ OK ]
    TEST: Prefsrc not removed in default VRF                            [ OK ]
    TEST: Prefsrc removed from VRF when nexthop dev in diff VRF         [ OK ]
    TEST: Prefsrc removed in default VRF                                [ OK ]
    Table ID 0
    TEST: Prefsrc removed from default VRF when source address deleted  [ OK ]
    Link local source route
    TEST: Prefsrc not removed when delete ll addr from other dev        [ OK ]
    TEST: Prefsrc removed when delete ll addr                           [ OK ]
    TEST: Prefsrc not removed when delete ll addr from other dev        [ OK ]
    TEST: Prefsrc removed even ll addr still exist on other dev         [ OK ]

Tests passed:  19
Tests failed:   0

Suggested-by: Ido Schimmel <idosch@idosch.org>
Suggested-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-08-20 15:27:22 +01:00
..
alsa selftests: ALSA: Add test-pcmtest-driver to .gitignore 2023-07-19 15:25:03 +02:00
amd-pstate linux-kselftest-next-6.4-rc1 2023-04-24 12:28:34 -07:00
arm64 selftests/arm64: fix build failure during the "emit_tests" step 2023-07-14 12:33:35 -06:00
bpf selftests/bpf: Add mptcpify test 2023-08-16 11:42:33 -07:00
breakpoints
cachestat selftests: add selftests for cachestat 2023-06-09 16:25:17 -07:00
capabilities
cgroup selftests: cgroup: fix test_kmem_basic false positives 2023-08-04 13:03:42 -07:00
clone3 selftests/clone3: test clone3 with exit signal in flags 2023-06-12 16:39:11 -06:00
connector selftests: connector: Fix input argument error paths to skip 2023-07-31 20:11:42 -07:00
core
cpu-hotplug
cpufreq selftests/cpufreq: Don't enable generic lock debugging options 2023-06-12 16:39:11 -06:00
damon selftests: damon: add config file 2023-06-19 16:19:11 -07:00
dma
dmabuf-heaps
drivers selftests: bonding: remove redundant delete action of device link1_1 2023-08-16 07:07:16 +01:00
efivarfs
exec
filesystems
firmware
fpu
ftrace selftests/ftrace: Fix to check fprobe event eneblement 2023-07-26 12:54:17 +09:00
futex
gpio gpio updates for v6.5 2023-06-29 10:11:10 -07:00
hid for-netdev 2023-07-13 19:13:24 -07:00
ia64
intel_pstate
iommu iommufd/selftest: Cover domain unmap with huge pages and access 2023-04-04 13:11:24 -03:00
ipc
ir
kcmp
kexec
kmod
kselftest selftests: allow runners to override the timeout 2023-06-12 16:39:11 -06:00
kvm KVM: selftests: Expand x86's sregs test to cover illegal CR0 values 2023-07-29 11:05:32 -04:00
landlock selftests/landlock: Add hostfs tests 2023-06-12 21:26:23 +02:00
lib
livepatch
lkdtm
locking
media_tests selftests: media_tests: Add new subtest to video_device_test 2023-06-12 16:39:10 -06:00
membarrier
memfd selftests/memfd: fix test_sysctl 2023-04-18 16:53:52 -07:00
memory-hotplug
mincore selftests/mincore: fix skip condition for check_huge_pages test 2023-07-13 12:51:13 -06:00
mm selftests: mm: ksm: fix incorrect evaluation of parameter 2023-08-04 13:03:41 -07:00
mount
mount_setattr selftests mount: Fix mount_setattr_test builds failed 2023-03-31 09:18:45 -06:00
move_mount_set_group
mqueue
nci
net selftests: fib_test: add a test case for IPv6 source address delete 2023-08-20 15:27:22 +01:00
netfilter selftests: nft_flowtable.sh: check ingress/egress chain too 2023-05-10 09:31:07 +02:00
nolibc selftests/nolibc: make sure gcc always use little endian on MIPS 2023-06-09 11:46:10 -07:00
nsfs
ntb
openat2
perf_events
pid_namespace
pidfd selftest: pidfd: Omit long and repeating outputs 2023-06-12 16:39:11 -06:00
powerpc selftests/powerpc/dexcr: Add DEXCR status utility lsdexcr 2023-06-19 17:36:28 +10:00
prctl selftests: prctl: Fix spelling mistake "anonynous" -> "anonymous" 2023-06-12 16:39:10 -06:00
proc selftests/proc: Assert clock_gettime(CLOCK_BOOTTIME) VS /proc/uptime monotonicity 2023-04-18 16:35:13 +02:00
pstore
ptp selftests/ptp: Add -X option for testing PTP_SYS_OFFSET_PRECISE 2023-07-28 10:59:40 +01:00
ptrace Update for entry and ptrace: 2023-04-25 11:05:04 -07:00
rcutorture A half-dozen late arriving docs patches. They are mostly fixes, but we 2023-07-06 22:15:38 -07:00
resctrl selftests/resctrl: Fix incorrect error return on test complete 2023-04-14 11:13:18 -06:00
riscv selftests: riscv: Fix compilation error with vstate_exec_nolibc.c 2023-08-02 13:48:10 -07:00
rlimits
rseq selftests/rseq: Fix build with undefined __weak 2023-08-04 18:10:29 -04:00
rtc
safesetid
sched selftests: sched: Add more core schedule prctl calls 2023-03-28 10:27:07 -06:00
seccomp
sgx selftests/sgx: Add "test_encl.elf" to TEST_FILES 2023-05-08 11:01:03 -06:00
sigaltstack
size
sparc64
splice
static_keys
sync
syscall_user_dispatch
sysctl test_sysclt: Test for registering a mount point 2023-06-18 02:32:54 -07:00
tc-testing selftests/tc-testing: verify that a qdisc can be grafted onto a taprio class 2023-08-09 15:59:21 -07:00
tdx
timens
timers tools: timers: fix freq average calculation 2023-07-13 13:32:36 -06:00
tmpfs
tpm2
tty selftests: tty: add selftest for tty timestamp updates 2023-06-15 13:45:42 +02:00
uevent
user
user_events selftests/user_events: Test struct size match cases 2023-07-12 12:04:47 -04:00
vDSO kselftest: vDSO: Fix accumulation of uninitialized ret when CLOCK_REALTIME is undefined 2023-06-12 16:39:10 -06:00
watchdog
wireguard wireguard: netlink: send staged packets when setting initial private key 2023-07-03 09:17:52 +01:00
x86 Add support for new Linear Address Masking CPU feature. This is similar 2023-04-28 09:43:49 -07:00
zram
.gitignore
Makefile connector/cn_proc: Selftest for proc connector 2023-07-23 11:34:22 +01:00
gen_kselftest_tar.sh
kselftest.h kselftest: Support nolibc 2023-04-11 14:10:47 -06:00
kselftest_deps.sh
kselftest_harness.h selftests/harness: allow tests to be skipped during setup 2023-06-15 22:24:01 -07:00
kselftest_install.sh
kselftest_module.h
lib.mk selftests: error out if kernel header files are not yet built 2023-06-19 16:19:03 -07:00
run_kselftest.sh kselftests: Sort the collections list to avoid duplicate tests 2023-06-12 16:39:11 -06:00