From: Pratyush Yadav <pratyush@kernel.org>
To: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: linux-kselftest@vger.kernel.org, rppt@kernel.org,
shuah@kernel.org, akpm@linux-foundation.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
dmatlack@google.com, kexec@lists.infradead.org,
pratyush@kernel.org, skhawaja@google.com, graf@amazon.com
Subject: Re: [PATCH 4/5] selftests/liveupdate: Add stress-sessions kexec test
Date: Tue, 12 May 2026 16:09:06 +0200 [thread overview]
Message-ID: <2vxzlddoafel.fsf@kernel.org> (raw)
In-Reply-To: <20260414200237.444170-5-pasha.tatashin@soleen.com> (Pasha Tatashin's message of "Tue, 14 Apr 2026 20:02:36 +0000")
On Tue, Apr 14 2026, Pasha Tatashin wrote:
> Add a new test that creates 2000 LUO sessions before a kexec
> reboot and verifies their presence after the reboot. This ensures
> that the linked-block serialization mechanism works correctly for
> a large number of sessions.
>
> Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
> ---
> diff --git a/tools/testing/selftests/liveupdate/luo_test_utils.c b/tools/testing/selftests/liveupdate/luo_test_utils.c
> index 3c8721c505df..37c330b9bb36 100644
> --- a/tools/testing/selftests/liveupdate/luo_test_utils.c
> +++ b/tools/testing/selftests/liveupdate/luo_test_utils.c
> @@ -20,6 +20,7 @@
> #include <sys/stat.h>
> #include <errno.h>
> #include <stdarg.h>
> +#include <sys/resource.h>
>
> #include "luo_test_utils.h"
>
> @@ -28,6 +29,30 @@ int luo_open_device(void)
> return open(LUO_DEVICE, O_RDWR);
> }
>
> +void luo_ensure_nofile_limit(long min_limit)
Since you are adding this to luo_test_utils anyway, I think you should
do it in patch 3 and use it there too.
LGTM otherwise.
> +{
> + struct rlimit hl;
> +
> + if (getrlimit(RLIMIT_NOFILE, &hl) < 0)
> + ksft_exit_fail_msg("getrlimit failed: %s\n", strerror(errno));
> +
> + if (hl.rlim_cur >= min_limit)
> + return;
> +
> + hl.rlim_cur = min_limit;
> + if (hl.rlim_cur > hl.rlim_max)
> + hl.rlim_max = hl.rlim_cur;
> +
> + if (setrlimit(RLIMIT_NOFILE, &hl) < 0) {
> + if (errno == EPERM) {
> + ksft_exit_skip("Insufficient privileges to set RLIMIT_NOFILE to %ld\n",
> + hl.rlim_cur);
> + }
> + ksft_exit_fail_msg("setrlimit to %ld failed: %s\n",
> + hl.rlim_cur, strerror(errno));
> + }
> +}
> +
> int luo_create_session(int luo_fd, const char *name)
> {
> struct liveupdate_ioctl_create_session arg = { .size = sizeof(arg) };
--
Regards,
Pratyush Yadav
next prev parent reply other threads:[~2026-05-12 14:09 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-14 20:02 [PATCH 0/5] liveupdate: Remove limits on the number of files and sessions Pasha Tatashin
2026-04-14 20:02 ` [PATCH 1/5] liveupdate: Remove limit on the number of sessions Pasha Tatashin
2026-04-15 0:05 ` yanjun.zhu
2026-04-15 0:14 ` Pasha Tatashin
2026-04-20 4:32 ` Zhu Yanjun
2026-04-20 4:45 ` Pasha Tatashin
2026-04-20 7:13 ` Mike Rapoport
2026-04-20 13:26 ` Pasha Tatashin
2026-05-12 13:35 ` Pratyush Yadav
2026-05-12 15:55 ` Pasha Tatashin
2026-04-14 20:02 ` [PATCH 2/5] liveupdate: Remove limit on the number of files per session Pasha Tatashin
2026-05-12 13:58 ` Pratyush Yadav
2026-05-12 20:06 ` Pasha Tatashin
2026-04-14 20:02 ` [PATCH 3/5] selftests/liveupdate: Test session and file limit removal Pasha Tatashin
2026-05-12 14:04 ` Pratyush Yadav
2026-05-12 20:13 ` Pasha Tatashin
2026-04-14 20:02 ` [PATCH 4/5] selftests/liveupdate: Add stress-sessions kexec test Pasha Tatashin
2026-05-12 14:09 ` Pratyush Yadav [this message]
2026-05-12 20:41 ` Pasha Tatashin
2026-04-14 20:02 ` [PATCH 5/5] selftests/liveupdate: Add stress-files " Pasha Tatashin
2026-05-12 14:10 ` Pratyush Yadav
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=2vxzlddoafel.fsf@kernel.org \
--to=pratyush@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=dmatlack@google.com \
--cc=graf@amazon.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pasha.tatashin@soleen.com \
--cc=rppt@kernel.org \
--cc=shuah@kernel.org \
--cc=skhawaja@google.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.