mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: perf test for daemon
Date: Fri, 26 Feb 2021 09:14:34 +0000	[thread overview]
Message-ID: <283df638-2300-e723-f0dd-b0672170537f@huawei.com> (raw)
In-Reply-To: <YDf8GYWlEhYqGkXv@krava>

On 25/02/2021 19:35, Jiri Olsa wrote:
> On Thu, Feb 25, 2021 at 08:13:07PM +0100, Jiri Olsa wrote:
>> On Thu, Feb 25, 2021 at 06:39:22PM +0000, John Garry wrote:
>>> Hi,
>>>
>>> I notice that "perf test" when run without root priviledges now hangs at the
>>> daemon test - is this expected behaviour? Can we skip and warn the user
>>> instead?
>>>
>>> I'm checking acme perf/core today.
>> ugh, I'll check.. looks like control fifo files are created with wrong permissions
> could you please try the fix below? it's passing with non-root user for me
> 
> thanks,
> jirka
> 

ok, it completes now. thanks

Tested-by: John Garry <john.garry@huawei.com>

> 
> ---
> diff --git a/tools/perf/builtin-daemon.c b/tools/perf/builtin-daemon.c
> index 617feaf020f6..8f0ed2e59280 100644
> --- a/tools/perf/builtin-daemon.c
> +++ b/tools/perf/builtin-daemon.c
> @@ -373,12 +373,12 @@ static int daemon_session__run(struct daemon_session *session,
>   	dup2(fd, 2);
>   	close(fd);
>   
> -	if (mkfifo(SESSION_CONTROL, O_RDWR) && errno != EEXIST) {
> +	if (mkfifo(SESSION_CONTROL, 0600) && errno != EEXIST) {
>   		perror("failed: create control fifo");
>   		return -1;
>   	}
>   
> -	if (mkfifo(SESSION_ACK, O_RDWR) && errno != EEXIST) {
> +	if (mkfifo(SESSION_ACK, 0600) && errno != EEXIST) {
>   		perror("failed: create ack fifo");
>   		return -1;
>   	}
> diff --git a/tools/perf/tests/shell/daemon.sh b/tools/perf/tests/shell/daemon.sh
> index e5b824dd08d9..5ad3ca8d681b 100755


      reply	other threads:[~2021-02-26  9:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19 19:46 [GIT PULL] perf tools changes for v5.12 Arnaldo Carvalho de Melo
2021-02-22 22:04 ` Linus Torvalds
2021-02-22 22:39 ` pr-tracker-bot
2021-02-25 18:39 ` perf test for daemon John Garry
2021-02-25 19:13   ` Jiri Olsa
2021-02-25 19:35     ` Jiri Olsa
2021-02-26  9:14       ` John Garry [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=283df638-2300-e723-f0dd-b0672170537f@huawei.com \
    --to=john.garry@huawei.com \
    --cc=acme@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®