public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] syscalls/capget[set]: Make use of guarded buffers
Date: Fri, 10 Jan 2020 12:42:08 +0100	[thread overview]
Message-ID: <20200110114208.GA25704@x230> (raw)
In-Reply-To: <1578633511-15403-1-git-send-email-xuyang2018.jy@cn.fujitsu.com>

Hi Xu,

> Also, using pid=0 instead of getpid() in capget02.c because
> it also returns the capabilities for the calling thread.

> Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
Reviewed-by: Petr Vorel <pvorel@suse.cz>

Thanks these improvements.

...
> diff --git a/testcases/kernel/syscalls/capget/capget02.c b/testcases/kernel/syscalls/capget/capget02.c
...
> -	tst_res(TINFO, "%s", tc->message);
> -	TEST(tst_syscall(__NR_capget, tc->headerp, tc->datap));
> +	header->version = tc->version;
> +	if (tc->pid == 1)
> +		header->pid = unused_pid;
> +	else
> +		header->pid = tc->pid;
> +
> +	tst_res(TINFO, "%s ", tc->message);
Why this extra space? I suggest to merge with the original:
	tst_res(TINFO, "%s", tc->message);

Kind regards,
Petr

      reply	other threads:[~2020-01-10 11:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10  5:18 [LTP] [PATCH] syscalls/capget[set]: Make use of guarded buffers Yang Xu
2020-01-10 11:42 ` 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=20200110114208.GA25704@x230 \
    --to=pvorel@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