Re: [PATCH net-next v3 6/7] selftests: net: Add busy_poll_test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri,  1 Nov 2024 00:48:33 +0000 Joe Damato wrote:
> +	ip netns exec nscl nc -N 192.168.1.1 48675 < $tmp_file

Thanks a lot for adding the test. Could you replace nc with socat or
a similar tool? There are multiple incompatible implementations of
netcat packaged by various distros, we get:

# selftests: net: busy_poll_test.sh
# nc: invalid option -- 'N'
# Ncat: Try `--help' or man(1) ncat for more information, usage options and help. QUITTING.

nc is a known PITA.

> +	# set the suspend parameter for the server via its IFIDX
> +
> +	DUMP_CMD="${YNL_PATH} --spec ${SPEC_PATH} --dump napi-get --json=\"{\\\"ifindex\\\": ${NSIM_DEV_1_IFIDX}}\" --output-json"
> +	NSIM_DEV_1_NAPIID=$(ip netns exec nssv bash -c "$DUMP_CMD")
> +	NSIM_DEV_1_NAPIID=$(echo $NSIM_DEV_1_NAPIID | jq '.[] | .id')
> +
> +	SUSPEND_CMD="${YNL_PATH} --spec ${SPEC_PATH} --do napi-set --json=\"{\\\"id\\\": ${NSIM_DEV_1_NAPIID}, \\\"irq-suspend-timeout\\\": 20000000, \\\"gro-flush-timeout\\\": 50000, \\\"defer-hard-irqs\\\": 100}\""
> +	NSIM_DEV_1_SETCONFIG=$(ip netns exec nssv bash -c "$SUSPEND_CMD")

Can you try to run this test in installed mode?

https://docs.kernel.org/dev-tools/kselftest.html#install-selftests

IIRC YNL moves around when we install, you'd either need to do
autodetection of the path (see tools/testing/selftests/net/lib/py/ynl.py
and if you go down this route please move the helper which exports the
YNL variables to lib.sh so other tests can reuse); or teach the C code
to do the setup, you can link against YNL fairly easily (look at where
ncdevmem is added in the Makefile, it uses YNL)




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux