linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Thomas Weißschuh" <linux@weissschuh.net>
To: Jordan Richards <jordanrichards@google.com>
Cc: Pasha Tatashin <pasha.tatashin@soleen.com>,
	 Mike Rapoport <rppt@kernel.org>,
	Pratyush Yadav <pratyush@kernel.org>,
	 Shuah Khan <shuah@kernel.org>, Jason Miu <jasonmiu@google.com>,
	 David Matlack <dmatlack@google.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	 linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v2 2/2] selftests/liveupdate: add end to end test infrastructure and scripts
Date: Fri, 6 Feb 2026 23:06:24 +0100	[thread overview]
Message-ID: <98e953ed-616c-4684-a8e1-87195349ef4c@t-8ch.de> (raw)
In-Reply-To: <20260205222329.2419035-3-jordanrichards@google.com>

On 2026-02-05 22:23:29+0000, Jordan Richards wrote:
> From: 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..100dc0f69f37 100644
> --- a/tools/testing/selftests/liveupdate/luo_test_utils.c
> +++ b/tools/testing/selftests/liveupdate/luo_test_utils.c
> @@ -20,9 +20,14 @@
>  #include <sys/stat.h>
>  #include <errno.h>
>  #include <stdarg.h>
> +#include <linux/unistd.h>
>  
>  #include "luo_test_utils.h"
>  
> +#ifdef NOLIBC
> +#include <sys.h>
> +#endif

This should not be necessary.
I am actively trying to get rid of the checks for the NOLIBC macro.

> +
>  int luo_open_device(void)
>  {
>  	return open(LUO_DEVICE, O_RDWR);

(...)

> @@ -45,8 +50,8 @@ int luo_retrieve_session(int luo_fd, const char *name)
>  {
>  	struct liveupdate_ioctl_retrieve_session arg = { .size = sizeof(arg) };
>  
> -	snprintf((char *)arg.name, LIVEUPDATE_SESSION_NAME_LENGTH, "%.*s",
> -		 LIVEUPDATE_SESSION_NAME_LENGTH - 1, name);
> +	strncpy((char *)arg.name, name, LIVEUPDATE_SESSION_NAME_LENGTH);
> +	arg.name[LIVEUPDATE_SESSION_NAME_LENGTH - 1] = '\0';

FWIW we are currently working on "%.*s" support.

>  
>  	if (ioctl(luo_fd, LIVEUPDATE_IOCTL_RETRIEVE_SESSION, &arg) < 0)
>  		return -errno;

(...)


  reply	other threads:[~2026-02-06 22:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-05 22:23 [PATCH v2 0/2] " Jordan Richards
2026-02-05 22:23 ` [PATCH v2 1/2] tools/nolibc: add ftruncate() Jordan Richards
2026-02-06 21:55   ` Thomas Weißschuh
2026-02-05 22:23 ` [PATCH v2 2/2] selftests/liveupdate: add end to end test infrastructure and scripts Jordan Richards
2026-02-06 22:06   ` Thomas Weißschuh [this message]
2026-02-09 20:56     ` Jordan Richards
2026-02-08 18:27   ` Mike Rapoport
2026-02-10 14:18     ` 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=98e953ed-616c-4684-a8e1-87195349ef4c@t-8ch.de \
    --to=linux@weissschuh.net \
    --cc=dmatlack@google.com \
    --cc=jasonmiu@google.com \
    --cc=jordanrichards@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pasha.tatashin@soleen.com \
    --cc=pratyush@kernel.org \
    --cc=rppt@kernel.org \
    --cc=shuah@kernel.org \
    /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