<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p><font size="4">Hi!</font><br>
    </p>
    <div class="moz-cite-prefix">On 2/3/22 06:31, Richard Palethorpe
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:8735l0y07y.fsf@suse.de">
      <pre class="moz-quote-pre" wrap="">Hello,

Petr Vorel <a class="moz-txt-link-rfc2396E" href="mailto:pvorel@suse.cz"><pvorel@suse.cz></a> writes:

</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">Hi Andrea,

[ Cc Richie, Li ]
<a class="moz-txt-link-freetext" href="https://lore.kernel.org/ltp/20220201142230.20243-1-andrea.cervesato@suse.de/">https://lore.kernel.org/ltp/20220201142230.20243-1-andrea.cervesato@suse.de/</a>

</pre>
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">libclone has been added to the libs folder and updated with the new
LTP API. This library will be used by containers tests, which will be
updated to the new LTP API as well.
</pre>
        </blockquote>
        <pre class="moz-quote-pre" wrap="">I suppose you want to use it for containers (still use legacy API), which
already use it. I remember Richie not considering libclone.h as a good source
and suggesting to use SAFE_CLONE() for simple cases.

<a class="moz-txt-link-freetext" href="https://lore.kernel.org/ltp/878s7k59tk.fsf@suse.de/">https://lore.kernel.org/ltp/878s7k59tk.fsf@suse.de/</a>

We probably need some wrapper for containers, but we should recheck, whether
we want to take a different approach. Code in the functions is really a bit weird.

</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
Yeah tst_clone.{c,h} is the new library which uses clone3 + a
compatability layer if clone3 is not available. This avoids reinventing
a cloning API to some extent because the clone3 interface is nice IMO.

Also IMO tests should be rewritten to use tst_clone, I just haven't had
chance to do that.
</pre>
    </blockquote>
    libclone does also a several other things, such as executing a
    process under unshared namespace and that is used by mountns
    testcases. So maybe we can just call it in an another way or find a
    way to recycle the libclone code.<br>
    <blockquote type="cite" cite="mid:8735l0y07y.fsf@suse.de">
      <pre class="moz-quote-pre" wrap="">
BTW we need to test cloning into a CGroup, so I'll probably add that
soon.

</pre>
    </blockquote>
  </body>
</html>