All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Palethorpe <rpalethorpe@suse.de>
To: Andrea Cervesato <andrea.cervesato@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v3 2/7] Refactor mqns_01 using new LTP API
Date: Thu, 11 Aug 2022 10:53:10 +0100	[thread overview]
Message-ID: <87r11nw0qv.fsf@suse.de> (raw)
In-Reply-To: <20220722120501.28670-3-andrea.cervesato@suse.com>

Hello,

Andrea Cervesato via ltp <ltp@lists.linux.it> writes:

> Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
> ---
>  runtest/containers                         |   3 +-
>  testcases/kernel/containers/mqns/common.h  | 101 +++++++++++
>  testcases/kernel/containers/mqns/mqns_01.c | 193 +++++++--------------
>  3 files changed, 166 insertions(+), 131 deletions(-)
>  create mode 100644 testcases/kernel/containers/mqns/common.h
>
> diff --git a/runtest/containers b/runtest/containers
> index 2637b62fe..863a964ad 100644
> --- a/runtest/containers
> +++ b/runtest/containers
> @@ -16,7 +16,8 @@ pidns31 pidns31
>  pidns32 pidns32
>  
>  mqns_01 mqns_01
> -mqns_01_clone mqns_01 -clone
> +mqns_01_clone mqns_01 -m clone
> +mqns_01_unshare mqns_01 -m unshare
>  mqns_02 mqns_02
>  mqns_02_clone mqns_02 -clone
>  mqns_03 mqns_03
> diff --git a/testcases/kernel/containers/mqns/common.h b/testcases/kernel/containers/mqns/common.h
> new file mode 100644
> index 000000000..92a77b566
> --- /dev/null
> +++ b/testcases/kernel/containers/mqns/common.h
> @@ -0,0 +1,101 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/*
> + * Copyright (C) 2022 SUSE LLC Andrea Cervesato <andrea.cervesato@suse.com>
> + */
> +
> +#ifndef MQNS_H
> +#define MQNS_H
> +
> +#include <stdlib.h>
> +#include "lapi/namespaces_constants.h"
> +#include "tst_test.h"
> +#include "tst_safe_posix_ipc.h"
> +
> +enum {
> +	T_CLONE,
> +	T_UNSHARE,
> +	T_NONE,
> +};
> +
> +static int dummy_child1(void *v)
> +{
> +	(void)v;
> +	return 0;
> +}
> +
> +static inline void check_newipc(void)
> +{
> +	int pid, status;
> +
> +	pid = ltp_clone_quick(CLONE_NEWIPC | SIGCHLD, dummy_child1,
>  NULL);

ltp_clone_quick is still part of the old API and only uses clone2. I
think it should be replaced with tst_clone. This may require extending
tst_clone. In fact we probably need a test variant to switch between the
clone2 and clone3 syscalls when using tst_clone.

I'll leave it to you whether you want to try that and rebase this patch
set on it.

-- 
Thank you,
Richard.

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

  reply	other threads:[~2022-08-11 10:09 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-22 12:04 [LTP] [PATCH v3 0/7] Refactor mqns testing suite Andrea Cervesato via ltp
2022-07-22 12:04 ` [LTP] [PATCH v3 1/7] Add more safe macros for mqueue API Andrea Cervesato via ltp
2022-07-26  6:50   ` Petr Vorel
2022-11-01 11:36   ` Richard Palethorpe
2022-07-22 12:04 ` [LTP] [PATCH v3 2/7] Refactor mqns_01 using new LTP API Andrea Cervesato via ltp
2022-08-11  9:53   ` Richard Palethorpe [this message]
2022-08-11 11:13     ` Andrea Cervesato via ltp
2022-09-02  9:05       ` Richard Palethorpe
2022-10-11  9:17         ` Richard Palethorpe
2022-10-11  9:42           ` Andrea Cervesato via ltp
2022-10-11 10:49             ` Richard Palethorpe
2022-10-11 11:19               ` Andrea Cervesato via ltp
2022-07-22 12:04 ` [LTP] [PATCH v3 3/7] Refactor mqns_02 " Andrea Cervesato via ltp
2022-07-22 12:04 ` [LTP] [PATCH v3 4/7] Refactor mqns_03 " Andrea Cervesato via ltp
2022-07-22 12:04 ` [LTP] [PATCH v3 5/7] Refactor mqns_04 " Andrea Cervesato via ltp
2022-07-22 12:05 ` [LTP] [PATCH v3 6/7] Delete deprecated mqns header files Andrea Cervesato via ltp
2022-07-22 12:05 ` [LTP] [PATCH v3 7/7] Rename common.h into mqns.h for mqns suite Andrea Cervesato via ltp
2022-07-26  7:00   ` Petr Vorel
2022-07-26 11:52     ` [LTP] [PATCH] tools: Check headers with checkpatch.pl Richard Palethorpe via ltp
2022-07-26 12:03       ` Petr Vorel
2022-07-26 12:53         ` Richard Palethorpe
2022-07-26 14:05           ` Petr Vorel
2022-10-11 10:15 ` [LTP] [PATCH v3 0/7] Refactor mqns testing suite Richard Palethorpe

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=87r11nw0qv.fsf@suse.de \
    --to=rpalethorpe@suse.de \
    --cc=andrea.cervesato@suse.com \
    --cc=ltp@lists.linux.it \
    /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.