From: Petr Vorel <pvorel@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/2] testcases/lib: Fix tst_ns_* helpers
Date: Fri, 17 Jan 2025 13:44:07 +0100 [thread overview]
Message-ID: <20250117124407.GA765313@pevik> (raw)
In-Reply-To: <CAEemH2d0YTx3AN+p_r1yf9ZYSbuHJ82jPMhOiKQhaVzHGkddgw@mail.gmail.com>
Hi Cyril, Li,
> On Fri, Jan 17, 2025 at 8:25 PM Cyril Hrubis <chrubis@suse.cz> wrote:
> > Replaces SAFE_CLONE() with tst_clone() in the tst_ns_* helpers.
> > The reason for the replacement is that SAFE_CLONE() uses
> > TST_RETRY_FUNC() which calls tst_multiply_timeout(). The problem with
> > that is that the tst_multiply_timeout() is a test library function that
> > started to print TINFO messages recently and that we rely on parsing the
> > output from the tst_ns_* helpers.
> > The reason SAFE_CLONE() started to call TST_RETRY_FUNC() is that in the
> > case that we create new namespaces with the clone call, we may end up
> > creating them faster than kernel can clean them up which is described in:
> > commit 7d882081a5613f44a12fc6b1c44267d4df0857a4
> > Author: Petr Vorel <pvorel@suse.cz>
> > Date: Mon Mar 28 22:46:43 2022 +0200
> > lib: Retry safe_clone() on ENOSPC
> > This combined with the newly introduced changes in the test library that
> > check for kernel debugging options that may need to adjust default
> > timeouts:
> > commit 893ca0abe7e82851ff0e5d93c09b1098f2eff121
> > Author: Li Wang <liwang@redhat.com>
> > Date: Sun Dec 22 15:22:49 2024 +0800
> > lib: multiply the timeout if detect slow kconfigs
> > which adds tst_has_slow_kconfig() into the tst_multiply_timeout() causes
> > the TINFO messages to be printed.
> > The reason why we can safely replace the SAFE_CLONE() with tst_clone()
> > here is that we are not creating new namspaces in the tst_ns_* helpers,
> > but rather than that cloning a new process to be executed inside of the
> > namespace, hence we do not need to retry on ENOSPC.
> > Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
> Reviewed-by: Li Wang <liwang@redhat.com>
> Nice work!
Thanks for fix and review. This one fixes the problem, thus I merged it.
I'll let you know about the other patch soon (I suspect that it does not catch
other usage, some tools needs to parse stderr ...).
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2025-01-17 12:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-17 12:24 [LTP] [PATCH 1/2] testcases/lib: Fix tst_ns_* helpers Cyril Hrubis
2025-01-17 12:24 ` [LTP] [PATCH 2/2] testcases/lib: tst_net.sh: Do not use stderr in tst_rhost_run() Cyril Hrubis
2025-01-17 12:33 ` Cyril Hrubis
2025-01-17 13:27 ` Petr Vorel
2025-01-17 13:45 ` Cyril Hrubis
2025-01-17 14:16 ` Petr Vorel
2025-01-17 12:40 ` Li Wang
2025-01-17 12:33 ` [LTP] [PATCH 1/2] testcases/lib: Fix tst_ns_* helpers Li Wang
2025-01-17 12:44 ` Petr Vorel [this message]
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=20250117124407.GA765313@pevik \
--to=pvorel@suse.cz \
--cc=liwang@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox