Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2812348pxb; Sat, 30 Jan 2021 15:57:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJzXU5re5wCan8VWXFefwpEP3uJ9oD2D19H2sKsUa/vnCxKRNV/zKrKmKffJD74kB2uYlTYQ X-Received: by 2002:a17:906:5917:: with SMTP id h23mr297254ejq.407.1612051059595; Sat, 30 Jan 2021 15:57:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612051059; cv=none; d=google.com; s=arc-20160816; b=aA7FiGYT3tPd3bKBCzV0VhoRE0ymMjQHOG8NtRXdTayOAFzaqGKBaPby6gy7eOEong +s20DDUuPQiMx8JTbxo11i9/2SlXIV2izEWnrwixOfcnYg8ZiaUfy5bqhKVsXCbMCALT OLNfHL0Ze0cPHH/3p2ConGhF9lN4ksIY4Qe7UIuitpAUo/I9AhvDnVEcU2LKBY1RyKdw KaRX6CswKZ52qqREr/G546bA5wc/oNvcJb1nTKnIw7qeJExPmbVp6jPNVi7zK+QSUO2n sKDAcaXMT5XEBoph2wu6XXYb2Kmbc7osab9dgeCGZfp5yazyXLEod9bQCsNaoBKla/35 2WHQ== 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=EkaaNyLUmmmEdDPmFtRkIbtGMcdJIh0v4v/2Of/gerY=; b=kRJjjoNNKvQUQZvJqNeKs2sBkTGS600qn3C2ic8jScZ+v6/hbvpsSoijTeP2Tv8GOj jPEElc63qeS79fqrDSHHzltLp6CSbt3vjZtJHoDCGQP4P8BwzvCDRcGYkgdHznJqQSBg 9PUIFZY86To8G7/6O/jhK7DjiaahoUzLEHqzPcSZGCESrfDeFDoXUQIn40zjSKpjJF2e 74tsXwzAvtnOncl3bbLGgIvxD+xve2f2MFnP1jIwyB06yySLfVPxLnKO30eix3rcLIJQ Z1luSa5lTqemcOx3bCg1hU6r5mOJw426yn45EnR8J84mKG72vXqqzDSNq3hErCW0kJ+A 6g1w== 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 e13si7482136edz.214.2021.01.30.15.57.14; Sat, 30 Jan 2021 15:57:39 -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 S232771AbhA3XyH convert rfc822-to-8bit (ORCPT + 99 others); Sat, 30 Jan 2021 18:54:07 -0500 Received: from us-smtp-delivery-44.mimecast.com ([205.139.111.44]:54437 "EHLO us-smtp-delivery-44.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232545AbhA3XvJ (ORCPT ); Sat, 30 Jan 2021 18:51:09 -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-22-12fumTSHMs-kKS41t8_LBQ-1; Sat, 30 Jan 2021 18:50:14 -0500 X-MC-Unique: 12fumTSHMs-kKS41t8_LBQ-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 5A099800D53; Sat, 30 Jan 2021 23:50:12 +0000 (UTC) Received: from krava.redhat.com (unknown [10.40.192.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id E516860DA0; Sat, 30 Jan 2021 23:50:09 +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 23/24] perf tests: Add daemon ping command test Date: Sun, 31 Jan 2021 00:48:55 +0100 Message-Id: <20210130234856.271282-24-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 ping command. The tests verifies the ping command gets proper answer from sessions. 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 2e414f2c9251..9fcb98768633 100755 --- a/tools/perf/tests/shell/daemon.sh +++ b/tools/perf/tests/shell/daemon.sh @@ -387,11 +387,51 @@ EOF rm -f ${config} } +test_ping() +{ + echo "test daemon ping" + + 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-size] +run = -e cpu-clock + +[session-time] +run = -e task-clock +EOF + + sed -i -e "s|BASE|${base}|" ${config} + + # start daemon + daemon_start ${config} size + + size=`perf daemon ping --config ${config} --session size | awk '{ print $1 }'` + type=`perf daemon ping --config ${config} --session time | awk '{ print $1 }'` + + if [ ${size} != "OK" -o ${type} != "OK" ]; then + error=1 + echo "FAILED: daemon ping failed" + fi + + # stop daemon + daemon_exit ${base} ${config} + + rm -rf ${base} + rm -f ${config} +} + error=0 test_list test_reconfig test_stop test_signal +test_ping exit ${error} -- 2.29.2