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:could you please try the fix below? it's passing with non-root user for me
Hi,ugh, I'll check.. looks like control fifo files are created with wrong permissions
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.
thanks,
jirka
---
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