[LTP] [PATCH] tst_net.sh: Fix root detection on netns on new shell API

Petr Vorel pvorel@suse.cz
Thu Aug 29 21:35:04 CEST 2019


Hi Alexey,

> > >  init_ltp_netspace()
> > >  {
> > >  	tst_test_cmds ip
> > > -	tst_require_root_
> > > +	[ -z "$TST_USE_LEGACY_API" ] && _tst_require_root || tst_require_root

> > Can we fix tst_require_root_() instead?
> I'll do.
> I wanted to use API variable than call internal function. It's not a big issue
> and this function is called in _tst_require_root anyway.

> NOTE: I've posted a patch which move variable and link setup to separate
> function, but I'm going to reject it myself. It's not an improvement and does
> not solve this solution. Sorry for the noise.
Merged, with your ack and suggested-by tags.

Kind regards,
Petr


More information about the ltp mailing list