From patchwork Wed May 30 22:03:39 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: 10440041 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 EC870601E9 for ; Wed, 30 May 2018 22:04:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC95329526 for ; Wed, 30 May 2018 22:04:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D0D4829553; Wed, 30 May 2018 22:04:39 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB,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 7422929526 for ; Wed, 30 May 2018 22:04:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932513AbeE3WEP (ORCPT ); Wed, 30 May 2018 18:04:15 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:42896 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932506AbeE3WEI (ORCPT ); Wed, 30 May 2018 18:04:08 -0400 Received: by mail-pf0-f194.google.com with SMTP id p14-v6so9692365pfh.9; Wed, 30 May 2018 15:04:08 -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=pFLpmAyHzHMfrgenuhzn8B8QREvdKWaaZJVBMTBeW/s=; b=u9bmx1jTNWFZ4bXT/Odun2qdtLsuTrVDb3Mw03+UDb+/8WZEBHNr3lUh0J0tfjd5r8 xCFkIldRXNFhVolf/U0XqPmxzMxxtlmI7k9jfo/TIBOv5x3NdcDnW4S/pKQ11CTJHm7t 3xpZHDFZ3U/aS7lChXFnDbTmTv6RFuRGki9LJAU7TaRklIE2rBEcDK+IE6JyBoIvsgUV 4Id5pfzzf76ROis/mA6n76IPyLDPWJlAavOwj38KKTI4snrSrTE3ayRc6Cbge73oqdbZ WTLTccEo9UxsRslr1CB2va0VoTMlDEe6mTo0ir6tA2JsCDXKTjguZJc62lp2y1+mmzPf U0ng== 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=pFLpmAyHzHMfrgenuhzn8B8QREvdKWaaZJVBMTBeW/s=; b=iMqnuZ0A/gYBLcayDbgc6rA35244qAhufXqE8Q9Yeu1XbeaNVRXlvldrNfQFbb0Omu oAM0dK9Yjr/OKcV/4ywCPZThdR8Sz4mC/ToQ23Hl8LFL4rXQC8tRi5LcaL+D5TetILP5 LSBcwEX/1VMGoyzQnP8qN2eWdfpm8UK9yFL0K85hY0FqFvALCc1NpMJMz7Px7beTnGTY v9C0EMo4p9k+PF9L2MMecJYWXHoo0Fwdi72pcp7/U+LztR1urnfemSg9W6ly+umed2YK 1Qk32hi0c3Zugq5n6reN+VKulZTNpBf8hGyBcw9bE2gmxCVgbmxlinE/NjDosy9NcHw9 zhcA== X-Gm-Message-State: ALKqPwetrk0DVvKn6aJL3V/GZg6kiOUE1YCkkbx0a77x1oMRcqHQc3L2 QWFpMyd4wvfnfSRoH+4KtKE= X-Google-Smtp-Source: ADUXVKL3bANiFeHlnCWwcekRpKR7p0tgcf1BuYzWBBojHYtcZ4DK0i+7WtYYBMrxzt7qjiO+xwZ0dA== X-Received: by 2002:a65:578b:: with SMTP id b11-v6mr3564615pgr.57.1527717847522; Wed, 30 May 2018 15:04:07 -0700 (PDT) Received: from localhost.localdomain ([122.174.249.214]) by smtp.gmail.com with ESMTPSA id y18-v6sm3644047pfl.122.2018.05.30.15.04.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 May 2018 15:04:06 -0700 (PDT) From: Jeffrin Jose T To: shuah@kernel.org, daniel.diaz@linaro.org, kstewart@linuxfoundation.org, tglx@linutronix.de, thomas@m3y3r.de, gregkh@linuxfoundation.org Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Jeffrin Jose T Subject: [RESEND PATCH] selftests: intel_pstate: notification about privilege required to run intel_pstate testing script Date: Thu, 31 May 2018 03:33:39 +0530 Message-Id: <20180530220339.6107-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 The intel_pstate related testing script need root level privileges when trying to access certain file for the successful execution of the script.But this is not the case always like when using evaluation only mode, which only require user level privilege. This patch is to notify the user about the privilege the script demands for the successful execution of the test. Signed-off-by: Jeffrin Jose T (Rajagiri SET) --- tools/testing/selftests/intel_pstate/run.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/testing/selftests/intel_pstate/run.sh b/tools/testing/selftests/intel_pstate/run.sh index 8576f6564307..e7008f614ad7 100755 --- a/tools/testing/selftests/intel_pstate/run.sh +++ b/tools/testing/selftests/intel_pstate/run.sh @@ -38,6 +38,12 @@ if ! uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ | grep -q x86; then exit $ksft_skip fi +msg="skip all tests:" +if [ $UID != 0 ] && [ $EVALUATE_ONLY == 0 ]; then + echo $msg please run this as root >&2 + exit $ksft_skip +fi + max_cpus=$(($(nproc)-1)) function run_test () {