mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
selftests: net: Skip so_incoming_cpu on single-CPU systems
The test requires at least two CPUs to exercise the distribution of connections between per-CPU listeners. It currently enforces this prerequisite with an assertion, causing all test cases to fail on single-vCPU systems even though no kernel functionality was tested. Report the unsupported environment as a skip instead. Check the prerequisite before setting up the network namespace so skipped tests do not make unnecessary system changes. Link: https://bugs.launchpad.net/ubuntu-kernel-tests/+bug/2023546 Signed-off-by: Kuba Pawlak <kuba.pawlak@canonical.com> Link: https://patch.msgid.link/20260904140334.562593-1-kuba.pawlak@canonical.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
1c9c07d0ad
commit
5bb36cd120
|
|
@ -81,10 +81,11 @@ static int nr_client_per_server, nr_server, nr_client;
|
|||
|
||||
FIXTURE_SETUP(so_incoming_cpu)
|
||||
{
|
||||
setup_netns(_metadata);
|
||||
|
||||
nr_server = get_nprocs();
|
||||
ASSERT_LE(2, nr_server);
|
||||
if (nr_server < 2)
|
||||
SKIP(return, "requires at least two CPUs");
|
||||
|
||||
setup_netns(_metadata);
|
||||
|
||||
if (NR_CLIENT_PER_SERVER_DEFAULT * nr_server < NR_PORT)
|
||||
nr_client_per_server = NR_CLIENT_PER_SERVER_DEFAULT;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user