ltp.lists.linux.it archive mirror
 help / color / mirror / Atom feed
From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: rpalethorpe@suse.de, Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v1] Extract libclone from testcases/kernel/containers
Date: Thu, 3 Feb 2022 10:37:48 +0100	[thread overview]
Message-ID: <692e3994-ef2b-3a9a-c4e2-118304cad3a0@suse.com> (raw)
In-Reply-To: <1fbbeba9-aa4e-81b3-0b56-c92b9b7d8356@suse.com>


[-- Attachment #1.1: Type: text/plain, Size: 1781 bytes --]

Hi,

an update about the last comments: the unshared clone is only used by 
mountns tests suite, so we can add that to the common utilities and get 
back to tst_clone for the other testing suites. I'm going to do that.

Andrea

On 2/3/22 10:22, Andrea Cervesato wrote:
>
> Hi!
>
> On 2/3/22 06:31, Richard Palethorpe wrote:
>> Hello,
>>
>> Petr Vorel<pvorel@suse.cz>  writes:
>>
>>> Hi Andrea,
>>>
>>> [ Cc Richie, Li ]
>>> https://lore.kernel.org/ltp/20220201142230.20243-1-andrea.cervesato@suse.de/
>>>
>>>> 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.
>>> 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.
>>>
>>> https://lore.kernel.org/ltp/878s7k59tk.fsf@suse.de/
>>>
>>> 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.
>>>
>> 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.
> 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.
>> BTW we need to test cloning into a CGroup, so I'll probably add that
>> soon.
>>

[-- Attachment #1.2: Type: text/html, Size: 3158 bytes --]

[-- Attachment #2: Type: text/plain, Size: 60 bytes --]


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-02-03  9:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-01 14:22 [LTP] [PATCH v1] Extract libclone from testcases/kernel/containers Andrea Cervesato
2022-02-02  7:56 ` Petr Vorel
2022-02-03  5:31   ` Richard Palethorpe
2022-02-03  9:22     ` Andrea Cervesato via ltp
2022-02-03  9:37       ` Andrea Cervesato via ltp [this message]
2022-02-03 10:28         ` Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=692e3994-ef2b-3a9a-c4e2-118304cad3a0@suse.com \
    --to=ltp@lists.linux.it \
    --cc=andrea.cervesato@suse.com \
    --cc=pvorel@suse.cz \
    --cc=rpalethorpe@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).