public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] syscalls/msgstress01: Fix off by one in array access
Date: Thu, 23 May 2024 18:19:44 +0200	[thread overview]
Message-ID: <20240523161944.GA29885@pevik> (raw)
In-Reply-To: <20240523155932.26393-1-chrubis@suse.cz>

Hi Cyril,

> -		for (int i = 0; i < size; i++) {
> +		for (int i = 0; i < msg_recv.data.len; i++) {
>  			if (msg_recv.data.pbytes[i] != buff->msg.data.pbytes[i]) {
>  				tst_res(TFAIL, "Received wrong data at index %d: %x != %x", i,
>  					msg_recv.data.pbytes[i],

Reviewed-by: Petr Vorel <pvorel@suse.cz>

And FYI (old, unimportant warning): musl 32bit complains about off_t being long
long int. Not sure if we bother (after the release) to %lld + cast to (long long int).

../../../../../include/tst_safe_macros.h:284:50: warning: format '%ld' expects argument of type 'long int', but argument 11 has type 'off_t' {aka 'long long int'} [-Wformat=]
  284 |                 "mmap(%p, %zu, %s(%x), %d, %d, %ld)",
      |                                                ~~^
      |                                                  |
      |                                                  long int
      |                                                %lld
  285 |                 addr, length, prot_buf, prot, flags, fd, offset);
      |                                                          ~~~~~~
      |                                                          |
      |                                                          off_t {aka long long int}

Kind regards,
Petr

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

  parent reply	other threads:[~2024-05-23 16:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-23 15:59 [LTP] [PATCH] syscalls/msgstress01: Fix off by one in array access Cyril Hrubis
2024-05-23 16:08 ` Martin Doucha
2024-05-23 16:27   ` Petr Vorel
2024-05-24 11:33   ` Cyril Hrubis
2024-05-24 11:39     ` Petr Vorel
2024-05-24 11:43     ` Martin Doucha
2024-05-24 11:59       ` Cyril Hrubis
2024-05-24 12:01         ` Martin Doucha
2024-05-23 16:19 ` Petr Vorel [this message]
2024-05-23 18:35   ` Cyril Hrubis
2024-05-23 16:25 ` Petr Vorel

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=20240523161944.GA29885@pevik \
    --to=pvorel@suse.cz \
    --cc=chrubis@suse.cz \
    --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