From patchwork Tue May 29 17:24:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeffrin Jose T X-Patchwork-Id: 10436511 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F3FC360327 for ; Tue, 29 May 2018 17:27:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3B0F2267B for ; Tue, 29 May 2018 17:27:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D644A28752; Tue, 29 May 2018 17:27:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A45C2267B for ; Tue, 29 May 2018 17:27:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936850AbeE2R1Q (ORCPT ); Tue, 29 May 2018 13:27:16 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:34730 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937187AbeE2R1O (ORCPT ); Tue, 29 May 2018 13:27:14 -0400 Received: by mail-pl0-f67.google.com with SMTP id ay10-v6so9353080plb.1; Tue, 29 May 2018 10:27:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=dOrBzrhbdUrbUFx8vlOSOEmHd0beop/BRMb5PLa2aR0=; b=ttXlp47jzpku13fiWTCjZIIa4WvliGodpwMJzwAe19qldTgRrRU3iEiQVRz0IotDRD ZsbSlJs/ExJCD7CbPKzBpvqKcrxl+jeMu+5i2Mr/uarpYaMa5WKJmL6umQdRas6HqjFo bnvjKxtppcit6j4R0dt0xaEMCgM3/vB4+IHno6rSss7t/DDR8bhn5xKu1TNLwofCTJ3Z jzEI/a+Db87zKizVHBIFM+zIkxHI/4rpn7I5snS2RA19kBXIz5CqvlUK90dxm57SsiK5 QCy/n4mpNp3Zum+y5wz5tAuUOvnGfZ0VrXdYVTr0AcM+Dy0VLfTjXj2ziCDQnC4Wq69M TVeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=dOrBzrhbdUrbUFx8vlOSOEmHd0beop/BRMb5PLa2aR0=; b=a51cXodiC2MePuI23rtQQ6oG1VMqxnHJXeemzBguIFat+UdFM6T1MLMP/ZRNLCq1Pg fPpC1BJwXShsO3G6K7XKamfXjoYwgq1EgNAU0nERtlbSpR7RKo4styNvVH0ofg1eFbVB 4oWhtXoB/DEmRNlJXqfKQoiCHS/DDDeEQb8jbGtj8c6ej7G3OhVeGsxwvM48Bu/2CUA+ DKQwOurQowSpTYteAgKae4o8YEKPDdfXW53Espqt+/6pRnQuusk2u6xib6fRnG01RiHA +hX7RUiWGm2UOfidO5xbgbrAsAkiBI1Mp7r8+WzoJy1BIEXiifCy/zlv0w2+5uqHeHVY IH/A== X-Gm-Message-State: ALKqPwewh655bpm/gjp4r6yeDnRNg+/ykpz9nYXq+cOdyJZOlOrY4a9U QwLJXwKm7jR8IIaupZhn1G0= X-Google-Smtp-Source: AB8JxZrmq5rzdrQsw07Jci8S7LfyyIW3y24YMCWniTzvim2tzzPLkDXICedHu5fkjJwenRFuxoj4OA== X-Received: by 2002:a17:902:26a:: with SMTP id 97-v6mr18661310plc.367.1527614834345; Tue, 29 May 2018 10:27:14 -0700 (PDT) Received: from localhost.localdomain ([122.164.29.151]) by smtp.gmail.com with ESMTPSA id 69-v6sm74533946pfh.33.2018.05.29.10.27.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 May 2018 10:27:13 -0700 (PDT) From: Jeffrin Jose T To: shuah@kernel.org, kstewart@linuxfoundation.org, tglx@linutronix.de, pombredanne@nexb.com, gregkh@linuxfoundation.org Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Jeffrin Jose T Subject: [PATCH] [RESEND] selftest: intel_pstate: debug support message from aperf.c and return value fix. Date: Tue, 29 May 2018 22:54:36 +0530 Message-Id: <20180529172436.4432-1-ahiliation@gmail.com> X-Mailer: git-send-email 2.17.0 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Additional message along with an error message which is more verbose for debug support from aperf.c and updated with the new return value "KSFT_SKIP". Signed-off-by: Jeffrin Jose T [Rajagiri SET] --- tools/testing/selftests/intel_pstate/aperf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/intel_pstate/aperf.c b/tools/testing/selftests/intel_pstate/aperf.c index d21edea9c560..f6cd03a87493 100644 --- a/tools/testing/selftests/intel_pstate/aperf.c +++ b/tools/testing/selftests/intel_pstate/aperf.c @@ -9,6 +9,8 @@ #include #include #include +#include +#include "../kselftest.h" void usage(char *name) { printf ("Usage: %s cpunum\n", name); @@ -41,8 +43,8 @@ int main(int argc, char **argv) { fd = open(msr_file_name, O_RDONLY); if (fd == -1) { - perror("Failed to open"); - return 1; + printf("/dev/cpu/%d/msr: %s\n", cpu, strerror(errno)); + return KSFT_SKIP; } CPU_ZERO(&cpuset);