Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp55681pxb; Tue, 2 Mar 2021 18:59:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJwlgMcXlRph5H0etQMkGb+wQX3EAuzDU9In+W+tMsInZGp2tAqDnpGDXTLAkIO2pq0HkdAt X-Received: by 2002:a17:906:d8d3:: with SMTP id re19mr4110336ejb.440.1614740384570; Tue, 02 Mar 2021 18:59:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614740384; cv=none; d=google.com; s=arc-20160816; b=ie5xCZKyY4RILLp4Uxpcp42q/nwA/1eBy1gcE+9iW+dzpu91jtxWlWPpSdcan3LX6z oTxLtRahlJDsRFUTln7ocN2dckiwa/5iNx0YnU1qz8qWChwbWKi0kTsR7Q+JaBKCOxgC dD0EnzFTZO3YOKU46RC1NZ5SKombOfav68i1q2MwkP6hORmi6CLN/HVqWO4FC1CHyB/Y w7sHtWygDf3t20zPB6MydDGIQhR2hZapB1NOgle/CtaD3c3wBNkHLP++BNO0/93G27c1 uvbgvedNKi+z8qxS7TMDENlGNsfr5S1FirSW2Jpw7aTnSC8reP3IdtE4NwoHJ/Iwouub e7mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=hxjkokTLqcae0xgszW86aO9aCpfhAC5nd6LPWo42tRk=; b=eT1KGhMbtUGfCHnfscd1nUw0eytCR3uOAjEC2pUuoRfT6V1+pNbWVjKNJIT5umJCtC tNZ1iXlh9D9XuVYNQx9d44lDFWVv4M5mUAF04fkwUPX/ZO8Xxuv+wMRJHe4N+ZV6R24y IgfM0WcZ+W8aw5ifd6cUf07TTv81s7irhtbEV5jUjEczGy/MlZB/4wAMcJPw5itC6sxl 0Rc/To2/DbVKIqJ/leuk4CGkbLdrE8MXAYgRJhZf8e5DNd82wQ+rSj53PyIgw8Ntczze jwjk/wLseVsExdx1j4RVw6P/ao+AkBvSoay3s0DUsdhSIW2fWV5/R6QCLiIBPIr4ybVj hTNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a42si16403632edf.287.2021.03.02.18.59.15; Tue, 02 Mar 2021 18:59:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234938AbhCAM0Q convert rfc822-to-8bit (ORCPT + 99 others); Mon, 1 Mar 2021 07:26:16 -0500 Received: from us-smtp-delivery-44.mimecast.com ([207.211.30.44]:49247 "EHLO us-smtp-delivery-44.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232916AbhCAM0O (ORCPT ); Mon, 1 Mar 2021 07:26:14 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-385--EyhXwv5MAS-t8o7KyKhCw-1; Mon, 01 Mar 2021 07:25:18 -0500 X-MC-Unique: -EyhXwv5MAS-t8o7KyKhCw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5F0221020C20; Mon, 1 Mar 2021 12:25:16 +0000 (UTC) Received: from krava.cust.in.nbox.cz (unknown [10.40.192.173]) by smtp.corp.redhat.com (Postfix) with ESMTP id 21B905C1C4; Mon, 1 Mar 2021 12:25:13 +0000 (UTC) From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: John Garry , lkml , Peter Zijlstra , Ingo Molnar , Mark Rutland , Namhyung Kim , Alexander Shishkin , Michael Petlan , Ian Rogers Subject: [PATCH 2/2] perf daemon: Allow test for non root user Date: Mon, 1 Mar 2021 13:25:10 +0100 Message-Id: <20210301122510.64402-2-jolsa@kernel.org> In-Reply-To: <20210301122510.64402-1-jolsa@kernel.org> References: <20210301122510.64402-1-jolsa@kernel.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jolsa@kernel.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: kernel.org Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset=WINDOWS-1252 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org John reported that the daemon test is not working for non root user. Changing the tests configurations so it's allowed to run under normal user. Fixes: 2291bb915b55 ("perf tests: Add daemon 'list' command test") Reported-by: John Garry Tested-by: John Garry Signed-off-by: Jiri Olsa --- tools/perf/tests/shell/daemon.sh | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tools/perf/tests/shell/daemon.sh b/tools/perf/tests/shell/daemon.sh index e5b824dd08d9..5ad3ca8d681b 100755 --- a/tools/perf/tests/shell/daemon.sh +++ b/tools/perf/tests/shell/daemon.sh @@ -140,10 +140,10 @@ test_list() base=BASE [session-size] -run = -e cpu-clock +run = -e cpu-clock -m 1 sleep 10 [session-time] -run = -e task-clock +run = -e task-clock -m 1 sleep 10 EOF sed -i -e "s|BASE|${base}|" ${config} @@ -159,14 +159,14 @@ EOF # check 1st session # pid:size:-e cpu-clock:base/size:base/size/output:base/size/control:base/size/ack:0 local line=`perf daemon --config ${config} -x: | head -2 | tail -1` - check_line_other "${line}" size "-e cpu-clock" ${base}/session-size \ + check_line_other "${line}" size "-e cpu-clock -m 1 sleep 10" ${base}/session-size \ ${base}/session-size/output ${base}/session-size/control \ ${base}/session-size/ack "0" # check 2nd session # pid:time:-e task-clock:base/time:base/time/output:base/time/control:base/time/ack:0 local line=`perf daemon --config ${config} -x: | head -3 | tail -1` - check_line_other "${line}" time "-e task-clock" ${base}/session-time \ + check_line_other "${line}" time "-e task-clock -m 1 sleep 10" ${base}/session-time \ ${base}/session-time/output ${base}/session-time/control \ ${base}/session-time/ack "0" @@ -190,10 +190,10 @@ test_reconfig() base=BASE [session-size] -run = -e cpu-clock +run = -e cpu-clock -m 1 sleep 10 [session-time] -run = -e task-clock +run = -e task-clock -m 1 sleep 10 EOF sed -i -e "s|BASE|${base}|" ${config} @@ -204,7 +204,7 @@ EOF # check 2nd session # pid:time:-e task-clock:base/time:base/time/output:base/time/control:base/time/ack:0 local line=`perf daemon --config ${config} -x: | head -3 | tail -1` - check_line_other "${line}" time "-e task-clock" ${base}/session-time \ + check_line_other "${line}" time "-e task-clock -m 1 sleep 10" ${base}/session-time \ ${base}/session-time/output ${base}/session-time/control ${base}/session-time/ack "0" local pid=`echo "${line}" | awk 'BEGIN { FS = ":" } ; { print $1 }'` @@ -215,10 +215,10 @@ EOF base=BASE [session-size] -run = -e cpu-clock +run = -e cpu-clock -m 1 sleep 10 [session-time] -run = -e cpu-clock +run = -e cpu-clock -m 1 sleep 10 EOF # TEST 1 - change config @@ -238,7 +238,7 @@ EOF # check reconfigured 2nd session # pid:time:-e task-clock:base/time:base/time/output:base/time/control:base/time/ack:0 local line=`perf daemon --config ${config} -x: | head -3 | tail -1` - check_line_other "${line}" time "-e cpu-clock" ${base}/session-time \ + check_line_other "${line}" time "-e cpu-clock -m 1 sleep 10" ${base}/session-time \ ${base}/session-time/output ${base}/session-time/control ${base}/session-time/ack "0" # TEST 2 - empty config @@ -309,10 +309,10 @@ test_stop() base=BASE [session-size] -run = -e cpu-clock +run = -e cpu-clock -m 1 sleep 10 [session-time] -run = -e task-clock +run = -e task-clock -m 1 sleep 10 EOF sed -i -e "s|BASE|${base}|" ${config} @@ -361,7 +361,7 @@ test_signal() base=BASE [session-test] -run = -e cpu-clock --switch-output +run = -e cpu-clock --switch-output -m 1 sleep 10 EOF sed -i -e "s|BASE|${base}|" ${config} @@ -400,10 +400,10 @@ test_ping() base=BASE [session-size] -run = -e cpu-clock +run = -e cpu-clock -m 1 sleep 10 [session-time] -run = -e task-clock +run = -e task-clock -m 1 sleep 10 EOF sed -i -e "s|BASE|${base}|" ${config} @@ -439,7 +439,7 @@ test_lock() base=BASE [session-size] -run = -e cpu-clock +run = -e cpu-clock -m 1 sleep 10 EOF sed -i -e "s|BASE|${base}|" ${config} -- 2.29.2