[LTP] [PATCH 2/2] netns_netlink: Rewrite into new API

Petr Vorel pvorel@suse.cz
Mon Feb 22 09:28:11 CET 2021


Hi Richie,

> Hello,

> Petr Vorel <pvorel@suse.cz> writes:

> > From: Richard Palethorpe <rpalethorpe@suse.com>

> I don't remember this :-)

I'm sorry, that should be me :). I normally does not have problems with git,
but this time I messed things up with rebasing.

> > This also require to rewrite netns_helper.h.
> > New test still uses legacy libclone.h.

> > ...

> >  	pclose(ipf);
> > @@ -67,14 +53,14 @@ static void check_netns(void)
> >  	int pid, status;
> >  	/* Checking if the kernel supports unshare with netns capabilities. */
> >  	if (CLONE_NEWNS == -1)
> > -		tst_brkm(TCONF | TERRNO, NULL, "CLONE_NEWNS (%d) not supported",
> > +		tst_brk(TCONF | TERRNO, "CLONE_NEWNS (%d) not supported",
> >  			 CLONE_NEWNS);

> >  	pid = do_clone_unshare_test(T_UNSHARE, CLONE_NEWNET | CLONE_NEWNS,
> >  	                            dummy, NULL);

> I guess you are considering replacing this with something that uses
> SAFE_CLONE?

> This should be quite easy as this function is not cloning with CLONE_VM
> or anything special. It is just fork() with CLONE_NEWNET | CLONE_NEWNS,
> so we probably don't need most of the wierdness in libclone.
+1, I'd also like to get rid of libclone.

Kind regards,
Petr


More information about the ltp mailing list