Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3628712imm; Tue, 29 May 2018 10:29:08 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpTsDoOy/IL3qCKZcraDVRE2kwHhqQ6b9C96SYTKoFjT6q/cG0YN5i12JFwcWjLdbY99m7U X-Received: by 2002:a63:8f19:: with SMTP id n25-v6mr12913855pgd.344.1527614948635; Tue, 29 May 2018 10:29:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527614948; cv=none; d=google.com; s=arc-20160816; b=FEKXxHKNher16VJCq/IAnGbtg/qzSB8hXPOqA5i8p8pPTc8Z77l9ROwHH3BI3yS5fr 8JPHVA5xgyjurIzLbbf4cDqVZGJzzCSqY+wFQCG/yX6IngRONPIqnDybohpzqLY3s4iN arc07tOm8AAy2vj3Ta6m7ZSmP3cXh0BrN9oQUcCYFNNT38EAzgCQyR13QygelhpqqDKB Ly3Ox0abeqYgjHy8qJyKG80uH4FrxHzTypjqx6rLU2U15qjHx8RQqBtHsr8hBGVrHLVU lmL/J07PuzEW2WLHtQ4xaoUHEDQZ28SNmksN82J76wxCutmQYg0dXXcYPc98RjeNSz4t RIGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=dOrBzrhbdUrbUFx8vlOSOEmHd0beop/BRMb5PLa2aR0=; b=CLwSmjuTevoy0siyx3MQNa2b/ItQFaUwdPRRYj08qihskAimf1nHpUk5ferVJBWkxn P0wa50Gi3e4fzpiGJDuOkzzyR9SbbGXUiVwp65JzN7lIooXajb6OZXReM0lx40nyMwlc FwqK7L+URZeUhv3vSkvNVDg4hX8UELmuTKBhNCnC3CxKHBixZAEtXiDtVXFPBECCVwOp aTaCi+T0/gpGWBVRJ/V8/JcEfUYGHeZFmAiiJWOyL8UgeWH393gI/Yl3ZbajKmoNOJ2n ROxouLgpK0JssFJyrNjwRe5+B5OaASkF4UpixdAuVix1B5yxDfMGMQY+eh3BlrvAyQx7 7bCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ttXlp47j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 9-v6si4732789ple.104.2018.05.29.10.28.54; Tue, 29 May 2018 10:29:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ttXlp47j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965309AbeE2R1S (ORCPT + 99 others); Tue, 29 May 2018 13:27:18 -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-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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); -- 2.17.0