[LTP] [PATCH 2/2] netns_netlink: Rewrite into new API
Richard Palethorpe
rpalethorpe@suse.de
Fri Feb 19 16:57:59 CET 2021
Hello,
Petr Vorel <pvorel@suse.cz> writes:
> From: Richard Palethorpe <rpalethorpe@suse.com>
I don't remember this :-)
>
> 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.
--
Thank you,
Richard.
More information about the ltp
mailing list