linux-stable/tools/testing/selftests
Matthieu Baerts 6254ad4088 selftests: mptcp: avoid calling pm_nl_ctl with bad IDs
IDs are supposed to be between 0 and 255.

In pm_nl_ctl, for both the 'add' and 'get' instruction, the ID is casted
in a u_int8_t. So if we give 256, we will delete ID 0. Obviously, the
goal is not to delete this ID by giving 256.

We could modify pm_nl_ctl and stop if the ID is negative or higher than
255 but probably better not to increase the number of lines for such
things in this tool which is only used in selftests. Instead, we use it
within the limits.

This modification also means that we will no longer add a new ID for the
2nd entry. That's why we removed an expected entry from the dump and
introduced with
commit dc8eb10e95 ("selftests: mptcp: add testcases for setting the address ID").

So now we delete ID 9 like before and we add entries for IDs 10 to 255
that are deleted just after.

Note that this could be seen as a fix but it was not really an issue so
far: we were simply playing with ID 0/1 once again. With the following
commit ("selftests: mptcp: add addr argument for del_addr"), it will be
different because ID 0 is going to required an address. We don't want
errors when trying to delete ID 0 without the address argument.

Acked-and-tested-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-03-30 17:42:23 -07:00
..
arm64 kselftest/arm64: sve: Do not use non-canonical FFR register value 2021-03-22 12:49:57 +00:00
bpf Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2021-03-25 16:30:46 -07:00
breakpoints selftests: breakpoints: Use correct error messages in breakpoint_test_arm64.c 2021-02-08 17:04:41 -07:00
capabilities
cgroup selftests/cgroup: Fix build on older distros 2020-11-10 15:13:25 -07:00
clone3 selftests/clone3: Fix build error 2020-12-07 14:34:55 -07:00
core selftests/core: add regression test for CLOSE_RANGE_UNSHARE | CLOSE_RANGE_CLOEXEC 2020-12-19 16:23:19 +01:00
cpu-hotplug
cpufreq
dma dma-mapping: benchmark: pretend DMA is transmitting 2021-02-05 12:48:46 +01:00
dmabuf-heaps kselftests: dmabuf-heaps: Add extra checking that allocated buffers are zeroed 2021-02-08 16:25:53 -07:00
drivers selftests: mlxsw: Test vetoing of double sampling 2021-03-29 13:37:26 -07:00
efivarfs
exec
filesystems selftests/filesystems: expand epoll with epoll_pwait2 2020-12-19 11:18:38 -08:00
firmware
fpu
ftrace selftests/ftrace: Add '!event' synthetic event syntax check 2021-02-11 16:22:32 -05:00
futex
gpio selftests: gpio: update .gitignore 2021-03-08 11:59:16 +01:00
ia64
intel_pstate selftests: intel_pstate: ftime() is deprecated 2020-11-10 14:41:32 -07:00
ipc selftests/ipc: remove unneeded semicolon 2021-02-08 16:32:43 -07:00
ir
kcmp
kexec
kmod
kselftest tweewide: Fix most Shebang lines 2020-12-08 23:30:04 +09:00
kvm selftests: kvm: add set_boot_cpu_id test 2021-03-18 13:55:14 -04:00
lib
livepatch
lkdtm powerpc updates for 5.11 2020-12-17 13:34:25 -08:00
locking
media_tests
membarrier
memfd selftests/memfd: Fix implicit declaration warnings 2020-11-10 14:42:04 -07:00
memory-hotplug
mincore
mount
mount_setattr tests: add mount_setattr() selftests 2021-01-24 14:43:45 +01:00
mqueue
nci selftests: Add nci suite 2021-01-29 18:03:33 -08:00
net selftests: mptcp: avoid calling pm_nl_ctl with bad IDs 2021-03-30 17:42:23 -07:00
netfilter selftests: netfilter: flowtable bridge and vlan support 2021-03-24 12:48:39 -07:00
nsfs
ntb
openat2 selftests: openat2: add RESOLVE_ conflict test 2020-12-03 10:16:28 +01:00
pid_namespace
pidfd selftests: pidfd: drop needless linux/kcmp.h inclusion in pidfd_setns_test.c 2020-10-27 17:04:01 -06:00
powerpc powerpc updates for 5.12 2021-02-22 14:34:00 -08:00
prctl
proc selftests: proc: fix warning: _GNU_SOURCE redefined 2020-11-05 10:08:14 -07:00
pstore
ptp
ptrace
rcutorture Merge branch 'for-mingo-nolibc' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu 2021-02-12 12:59:14 +01:00
resctrl
rseq rseq/selftests: Fix MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ build error under other arch. 2020-12-07 14:09:45 -07:00
rtc
safesetid
seccomp kconfig for kcmp syscall 2021-02-22 17:15:30 -08:00
sgx selftests/sgx: Use a statically generated 3072-bit RSA key 2020-11-18 18:26:00 +01:00
sigaltstack
size
sparc64
splice
static_keys
sync
syscall_user_dispatch entry: Use different define for selector variable in SUD 2021-02-06 00:21:42 +01:00
sysctl
tc-testing tc-testing: add simple action change test 2021-03-30 17:11:20 -07:00
timens selftests/timens: add futex binary to .gitignore 2021-02-08 17:29:58 -07:00
timers
tmpfs
tpm2
uevent
user
vDSO selftests/vDSO: fix ABI selftest on riscv 2021-02-08 16:38:34 -07:00
vm selftests/vm: fix out-of-tree build 2021-03-25 09:22:55 -07:00
watchdog
wireguard wireguard: selftests: test multiple parallel streams 2021-02-23 15:54:07 -08:00
x86 linux-kselftest-next-5.12-rc1 2021-02-22 11:01:53 -08:00
zram
.gitignore
gen_kselftest_tar.sh
kselftest.h
kselftest_deps.sh selftests: remove obsolete gpio references from kselftest_deps.sh 2021-02-15 11:43:28 +01:00
kselftest_harness.h selftests: kselftest_harness.h: partially fix kernel-doc markups 2021-01-21 14:06:00 -07:00
kselftest_install.sh
kselftest_module.h kselftest: add support for skipped tests 2021-02-15 11:07:42 +01:00
lib.mk selftests: filter kselftest headers from command in lib.mk 2020-10-27 16:51:06 -06:00
Makefile idmapped-mounts-v5.12 2021-02-23 13:39:45 -08:00
run_kselftest.sh selftests/run_kselftest.sh: fix dry-run typo 2020-11-10 14:51:39 -07:00