From: Petr Vorel <pvorel@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: Richard Palethorpe <rpalethorpe@suse.com>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v1] Extract libclone from testcases/kernel/containers
Date: Wed, 2 Feb 2022 08:56:47 +0100 [thread overview]
Message-ID: <Yfo5P7ZZI33xz+6K@pevik> (raw)
In-Reply-To: <20220201142230.20243-1-andrea.cervesato@suse.de>
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.
...
> +#ifndef SYS_unshare
> +#ifdef __NR_unshare
> +#define SYS_unshare __NR_unshare
> +#elif __i386__
> +#define SYS_unshare 310
> +#elif __ia64__
> +#define SYS_unshare 1296
> +#elif __x86_64__
> +#define SYS_unshare 272
> +#elif __s390x__ || __s390__
> +#define SYS_unshare 303
> +#elif __powerpc__
> +#define SYS_unshare 282
> +#else
> +#error "unshare not supported on this architecure."
> +#endif
> +#endif
nit: we usually put space before define for a readability.
#ifndef SYS_unshare
#ifdef __NR_unshare
# define SYS_unshare __NR_unshare
#elif __i386__
# define SYS_unshare 310
#elif __ia64__
# define SYS_unshare 1296
...
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-02-02 7:57 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 [this message]
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
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=Yfo5P7ZZI33xz+6K@pevik \
--to=pvorel@suse.cz \
--cc=andrea.cervesato@suse.de \
--cc=ltp@lists.linux.it \
--cc=rpalethorpe@suse.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.