[LTP] [PATCH 4/4] network: Fix tst_brk TFAIL

Petr Vorel pvorel@suse.cz
Wed Jan 24 14:48:38 CET 2024


Hi Martin,

> Hi,
> two comments below.

...
> > +++ b/testcases/network/virt/virt_lib.sh
> > @@ -174,8 +174,10 @@ virt_multiple_add_test()
> >   	tst_res TINFO "add $NS_TIMES $virt_type, then delete"
> >   	for i in $(seq $start_id $max); do
> > -		virt_add ltp_v$i id $i $opt || \
> > -			tst_brk TFAIL "failed to create 'ltp_v0 $opt'"
> > +		if ! virt_add ltp_v$i id $i $opt; then
> > +			tst_res TFAIL "failed to create 'ltp_v0 $opt'"
> > +			return

> This is a library function so tst_brk TBROK is probably the correct fix
> here. Also, the message should say ltp_v$i instead of ltp_v0, but that's for
> a separate patch.

Thanks! tst_brk TBROK makes sense here.

ltp_v$i fixed in separate commit with your credit (merged now).

> > +		fi
> >   		ROD_SILENT "ip link set ltp_v$i up"
> >   	done
> > @@ -196,8 +198,10 @@ virt_add_delete_test()
> >   	tst_res TINFO "add/del $virt_type $NS_TIMES times"
> >   	for i in $(seq 0 $max); do
> > -		virt_add ltp_v0 $opt || \
> > -			tst_brk TFAIL "failed to create 'ltp_v0 $opt'"
> > +		if ! virt_add ltp_v0 $opt; then
> > +			tst_res TFAIL "failed to create 'ltp_v0 $opt'"
> > +			return

> Same here.

Yes (tst_brk TBROK).

Kind regards,
Petr


More information about the ltp mailing list