[LTP] [PATCH v2 2/3] network/stress/multicast/query-flood: Convert to new API

Joerg Vehlow lkml@jv-coder.de
Thu Nov 19 08:50:51 CET 2020


Hi Petr,

>> +# Verify that the kernel is not crashed when joining a multicast group
>> +# on a single socket, then receiving a large number of General Queries
> nit: some sort of the description could be in
> tst_test TINFO message in do_setup() / do_test()
I removed this, because I though it was useless, but will add it back in.
>> +TST_NEEDS_ROOT=1
>> +. mcast-lib.sh
>> +
>> +do_setup()
>> +{
>> +	mcast_setup $MCASTNUM_NORMAL
>> +}
>> +
>> +do_test()
>> +{
>> +	local mcast_addr_prefix="$MCAST_IPV4_ADDR_PREFIX"
>> +	[ "$TST_IPV6" ] && mcast_addr_prefix="$MCAST_IPV6_ADDR_PREFIX"
> nit: maybe just $prefix is enough.
ACK
>> +
>> +	# Run a multicast join tool
>> +	local tmpfile=$$
> Please, when you need temporary files, use
> TST_NEEDS_TMPDIR=1
That's actually set in mcast-lib.sh, but duplication makes sense here I 
guess.
>> +	EXPECT_PASS $MCAST_LCMD -n 1 -p $mcast_addr_prefix \> $tmpfile
>> +	tst_res TINFO "joined $(grep groups $tmpfile)"
>> +
>> +	# Send General Query from the remote host
>> +	local params=""
> nit: no need to add =""
ACK


Jörg


More information about the ltp mailing list