public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: "xuyang2018.jy@fujitsu.com" <xuyang2018.jy@fujitsu.com>
To: Martin Doucha <mdoucha@suse.cz>
Cc: "ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH] msgget03: Set custom queue limit
Date: Wed, 6 Jul 2022 09:14:55 +0000	[thread overview]
Message-ID: <62C560D5.7080209@fujitsu.com> (raw)
In-Reply-To: <20220704114523.10409-1-mdoucha@suse.cz>

Hi Martin

I don't have objection for this patch.

But I think using system custom max value is more meaningful. How about
setting timeout to 5min, I think it is enough.

Also shmget03 uses same logic, so I guess we need to modify it too.

Best Regards
Yang Xu
> The runtime limit patchset has reduced default test timeout to 30 seconds
> which is not enough for msgget03 on some archs. Set custom queue count
> limit to make the test faster.
>
> Signed-off-by: Martin Doucha<mdoucha@suse.cz>
> ---
>   testcases/kernel/syscalls/ipc/msgget/msgget03.c | 9 +++++++--
>   1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/ipc/msgget/msgget03.c b/testcases/kernel/syscalls/ipc/msgget/msgget03.c
> index 711886e17..2257ae0f9 100644
> --- a/testcases/kernel/syscalls/ipc/msgget/msgget03.c
> +++ b/testcases/kernel/syscalls/ipc/msgget/msgget03.c
> @@ -41,7 +41,8 @@ static void setup(void)
>   	tst_res(TINFO, "Current environment %d message queues are already in use",
>   		used_cnt);
>
> -	SAFE_FILE_SCANF("/proc/sys/kernel/msgmni", "%i",&maxmsgs);
> +	maxmsgs = used_cnt + 32;
> +	SAFE_FILE_PRINTF("/proc/sys/kernel/msgmni", "%i", maxmsgs);
>
>   	queues = SAFE_MALLOC((maxmsgs - used_cnt) * sizeof(int));
>
> @@ -73,5 +74,9 @@ static struct tst_test test = {
>   	.needs_tmpdir = 1,
>   	.setup = setup,
>   	.cleanup = cleanup,
> -	.test_all = verify_msgget
> +	.test_all = verify_msgget,
> +	.save_restore = (const struct tst_path_val[]){
> +		{"/proc/sys/kernel/msgmni", NULL},
> +		{}
> +	}
>   };

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

  reply	other threads:[~2022-07-06  9:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-04 11:45 [LTP] [PATCH] msgget03: Set custom queue limit Martin Doucha
2022-07-06  9:14 ` xuyang2018.jy [this message]
2022-09-20 14:04   ` Martin Doucha
2022-10-10 11:57 ` 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=62C560D5.7080209@fujitsu.com \
    --to=xuyang2018.jy@fujitsu.com \
    --cc=ltp@lists.linux.it \
    --cc=mdoucha@suse.cz \
    /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