Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4928321imm; Wed, 30 May 2018 15:06:16 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK09IsRs9UXiFk4yNM9G+LqTH91xi5tidBZTkBZHTJ0Q73ny3+UPRP9gwjWQW/GUqXp9ktU X-Received: by 2002:a63:7f1b:: with SMTP id a27-v6mr3583968pgd.410.1527717976414; Wed, 30 May 2018 15:06:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527717976; cv=none; d=google.com; s=arc-20160816; b=j25ZRWdGs5M6dQm9yHd59jq1l2UbFBw8mbFxRebmht+RIVszmOwi59Upqzh5CRAhoz DTzWjGkNJhXswLLGudavmgm52uAV+jTQklRsIYPTJBY2Hu3QYtj32uwDgKTAjUxs1r43 P3CXppFF7lNDFKpRIdRCsMp4aDVruo+AVGPJ9lV1/FSLJLOVjDK6XG4Y4QiuDZvOch1r cCuG4kHdbVmQLU9dhr7sjzPaw1zUcepNMPsMPcWzZ6uWkcg83tEpT8578XSZaJHN0YYU TJlmaSY2XnG/I+hRTWClduvvgvDJnMBnfVqD3NNQDqDJIhDeGiIjIrThajXgwIANBtPx dp1A== 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=pFLpmAyHzHMfrgenuhzn8B8QREvdKWaaZJVBMTBeW/s=; b=zZnbvOH0e4MwMCWIopQSe/5YtGj+Hur0pMcWSK3D0svi0p5g0io0N3zNkS6CFHKAdK k6oAcKkEtkAT6y8apdI6ImU+DXZTQ4x15kQPy8qFH7l/1VUO8jvdsZWRtP/bi3pk8FLi bmbH6iegIN5sqpUXgbdm1fILPdkZsCawJS0/LzYBGhewVkLNsuceh79WvqjXCGOFdQ6L 9d2cJDM3wJm0M1HFULIR/yD0dVGFWD/2Xx4nywDdG7l9NA8e8bhPBDMkscclL9hx0bUk 6OM/Kc9zxsRDvR+k76k+KOlqUmPTPkuuIS/OVmrq028ypaR1eNj6nBSlzuMGM0VKzXFQ 5o5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=u9bmx1jT; 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 q2-v6si35532187plh.136.2018.05.30.15.06.02; Wed, 30 May 2018 15:06:16 -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=u9bmx1jT; 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 S932547AbeE3WEP (ORCPT + 99 others); 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-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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 () { -- 2.17.0