public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] pty04: Fix read retries
Date: Thu, 14 May 2020 15:39:18 +0200	[thread overview]
Message-ID: <20200514133918.GA6087@yuki.lan> (raw)
In-Reply-To: <20200514133201.12829-1-rpalethorpe@suse.com>

Hi!
> We need to increase the data pointer by the amount already read.

Applied, thanks.

> Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
> ---
>  testcases/kernel/pty/pty04.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/testcases/kernel/pty/pty04.c b/testcases/kernel/pty/pty04.c
> index 68a84ea87..d574d8b2c 100644
> --- a/testcases/kernel/pty/pty04.c
> +++ b/testcases/kernel/pty/pty04.c
> @@ -294,7 +294,7 @@ static void try_read(int fd, char *data, ssize_t size)
>  	int retry = mtu;
>  
>  	while (retry--) {
> -		ret = read(fd, data, size - n);
> +		ret = read(fd, data + n, size - n);

Sorry for not catching that during the review...

-- 
Cyril Hrubis
chrubis@suse.cz

      reply	other threads:[~2020-05-14 13:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14 13:32 [LTP] [PATCH] pty04: Fix read retries Richard Palethorpe
2020-05-14 13:39 ` Cyril Hrubis [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=20200514133918.GA6087@yuki.lan \
    --to=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