Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2812487pxb; Sat, 30 Jan 2021 15:58:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJwajYoWK65czKPgttfpMghy2mNq5cRxVvZ0TPP/chVeTKfXZ0sXBydbWywV7YJEZq7h9oL/ X-Received: by 2002:a17:906:a115:: with SMTP id t21mr10844089ejy.549.1612051087373; Sat, 30 Jan 2021 15:58:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612051087; cv=none; d=google.com; s=arc-20160816; b=r5z2tSw5yyIfmFt6QKVc1xH4Bn+5OLC+urgpjdoLSQ0Cxg7hS3iueZrL4dqD9jllwy mxBELFunH/cD+StlCuBSDZPFDRyTRHcR3J3+TkN2UuXU6bO6E4Yulg3KSgEzewOWkDR8 uJTW9RNdnxN2AAWEYqfazNhPSSMb7SWnzcO8yXGYtdJX/jZvHyRnrHGn4WPjJi8J1JmP 6H6iodCuaKA2CZjVods19QmNtnuBbR7Roh5Qdhuvdul4DDhe1jM62nFOR632C5TO+avS rF/O351onsl21tyFjKMtL32DkOTt+x7pUbWFygSGYK6UVd3F5KZFDF+SpGseh84OdP63 GlAg== 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=bG6zaol9RnX1gr2Hc9idKViqMAyJoXtsHYMoYY7n86k=; b=TNd4LH/2P7Yy9nSp69ZWspekGdkYQkzWEecJ/T27NJTS+NhO8T/PerAJZ62czBl6zZ 5EqobpRcAvKJyHYAQ+i/3Kq5Qjw2etiFrxxr/PceNg94tBOVUmBgBc2U1GLVVsTH8OCy pe+8cqfYALKcnijPaSd1kqcfujUbZYjE+ZHlSaXX6nNWxsixDAEV5DGzASNLuJegctbM TsZTwOOZEr3JjgflEw4/YoYg1V5PoEX9l9X/EB7lOnED66DJruWEGq9rbF8HJMlJ8S2b Yv6R4gc37BVm2Ei8Ga2NtHcxBtHL7z69YL1kxrmHxlLXh8WVsEx+Awcw8kCjl8JamIsA kKpw== 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 x22si8200418edl.459.2021.01.30.15.57.38; Sat, 30 Jan 2021 15:58:07 -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 S232495AbhA3Xy1 convert rfc822-to-8bit (ORCPT + 99 others); Sat, 30 Jan 2021 18:54:27 -0500 Received: from us-smtp-delivery-44.mimecast.com ([205.139.111.44]:23645 "EHLO us-smtp-delivery-44.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232604AbhA3XvE (ORCPT ); Sat, 30 Jan 2021 18:51:04 -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-230-NjAPl49RP-ip_ZtI6v1AVg-1; Sat, 30 Jan 2021 18:50:11 -0500 X-MC-Unique: NjAPl49RP-ip_ZtI6v1AVg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8BF77801817; Sat, 30 Jan 2021 23:50:09 +0000 (UTC) Received: from krava.redhat.com (unknown [10.40.192.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2096F60DA0; Sat, 30 Jan 2021 23:50:06 +0000 (UTC) From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Peter Zijlstra , Ingo Molnar , Mark Rutland , Namhyung Kim , Alexander Shishkin , Michael Petlan , Ian Rogers , Stephane Eranian , Alexei Budankov Subject: [PATCH 22/24] perf tests: Add daemon signal command test Date: Sun, 31 Jan 2021 00:48:54 +0100 Message-Id: <20210130234856.271282-23-jolsa@kernel.org> In-Reply-To: <20210130234856.271282-1-jolsa@kernel.org> References: <20210129134855.195810-1-jolsa@redhat.com> <20210130234856.271282-1-jolsa@kernel.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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 Adding test for perf daemon signal command. The test sends a signal to configured sessions and verifies the perf data files were generated accordingly. Signed-off-by: Jiri Olsa --- tools/perf/tests/shell/daemon.sh | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/tools/perf/tests/shell/daemon.sh b/tools/perf/tests/shell/daemon.sh index 3b6b5aa5587c..2e414f2c9251 100755 --- a/tools/perf/tests/shell/daemon.sh +++ b/tools/perf/tests/shell/daemon.sh @@ -348,10 +348,50 @@ EOF rm -f ${config} } +test_signal() +{ + echo "test daemon signal" + + local config=$(mktemp /tmp/perf.daemon.config.XXX) + local base=$(mktemp -d /tmp/perf.daemon.base.XXX) + + # prepare config + cat < ${config} +[daemon] +base=BASE + +[session-test] +run = -e cpu-clock --switch-output +EOF + + sed -i -e "s|BASE|${base}|" ${config} + + # start daemon + daemon_start ${config} test + + # send 2 signals + perf daemon signal --config ${config} --session test + perf daemon signal --config ${config} + + # stop daemon + daemon_exit ${base} ${config} + + # count is 2 perf.data for signals and 1 for perf record finished + count=`ls ${base}/session-test/ | grep perf.data | wc -l` + if [ ${count} -ne 3 ]; then + error=1 + echo "FAILED: perf data no generated" + fi + + rm -rf ${base} + rm -f ${config} +} + error=0 test_list test_reconfig test_stop +test_signal exit ${error} -- 2.29.2