Re: [PATCH net-next v6] net: netconsole: selftests: Create a new netconsole selftest

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

 



Hi Breno,

On 21/08/2024 10:08, Breno Leitao wrote:
> Adds a selftest that creates two virtual interfaces, assigns one to a
> new namespace, and assigns IP addresses to both.
> 
> It listens on the destination interface using socat and configures a
> dynamic target on netconsole, pointing to the destination IP address.
> 
> The test then checks if the message was received properly on the
> destination interface.
> 
> Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>
> ---
> Changelog:
> 
> v6:
>  * Check for SRC and DST ip before starting the test (Jakub)
>  * Revert the printk configuration at the end of the test (Jakub)
>  * Fix the modprobe stderr redirection (Jakub)

Thank you for the v6! It looks good to me:

Acked-by: Matthieu Baerts (NGI0) <matttbe@xxxxxxxxxx>

(...)

> diff --git a/tools/testing/selftests/drivers/net/netcons_basic.sh b/tools/testing/selftests/drivers/net/netcons_basic.sh
> new file mode 100755
> index 000000000000..b4bfb451ccb6
> --- /dev/null
> +++ b/tools/testing/selftests/drivers/net/netcons_basic.sh
> @@ -0,0 +1,234 @@

(...)

> +	if ip addr list | grep -E "inet.*(${SRCIP}|${DSTIP})" 2> /dev/null; then

Out of curiosity: the DSTIP is only set in the new netns, but I guess
that will be an issue if it is also set on the host (or elsewhere with
the same MAC address), hence this check here? (In any case, it sounds
safer, it can stay)

> +		echo "SKIP: IPs already in use. Skippig it" >&2

Skippig: is it because netconsole is vegetarian?

(no need for a v7 just for that of course ;) )

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.





[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