Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp745109imm; Sat, 26 May 2018 10:02:46 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpPvZ7TZgexq5Z6kKF/JWBYa+6bdD0sqn82uWWVCaBioNdNERfQ9bTFlFAaqRJ648fMRz6N X-Received: by 2002:a17:902:9a08:: with SMTP id v8-v6mr7140970plp.148.1527354166029; Sat, 26 May 2018 10:02:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527354166; cv=none; d=google.com; s=arc-20160816; b=GRAHjTS54smhh9ecxnyu/cFf/RLfccuMJC/UCX5+8SoVEI3lpfUtsP44vuTZvD6fBr ww0V7gwNypM3MmstPE/pGWDxrCQBHR7voGvbgm6PKarxjgpqlsvopO4scFyyVUAzmck3 vazI+FqL/2qN+AY7b+xz5yiQVo485MYiBrzzOw0ul2ayMP/cL7iHVMwAN6044mYtDBET XiYoucFrcAxoJ/hP+iN9EJT3Q7i8jnKe7p5yLIZP/ABjvbXmYqJjOr+vn3sXvrrUdIyu tMBpK6JGduc6tPEopKuYCZz4roB7j9AxYSYbyTWBfDBjZ+XAjrYOM0kG9Yppm1hnYFKx nskg== 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=kAPvJEJkinz0dicyhdvIO/1avu9lwIcFnAEhhEZUitM=; b=CTixKA/FydFf+rOIYFXvSJudxMI1KjmcFbw6RbTeogZCSMO6kqBuv2OGu/HgqsGhQJ V9unY0jxipf9IcmSiyQzDVS+8a1G6HoCU/53TxLzsnZyFDYEWJfg3nr6WV0aUM86PB6A Dh9qgpi0rTk1bHt06WZnEg0CaL7bMZXW9km0O7d2apEwdObT0ceq6HEygT+SXkgnCkrr nn0SC6mKoG7vbxFWT08th+tRkoOLpsy1ai7XYjrexyGF3micgnOE02GcZeGy0Yd6VLs4 ULbhjCYyit893vpV5Ikco8xViwU0WYEMy2xoLBxik0s1csbLVL77F2ta8J85lO2mvA+v PQQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cq6/Lror; 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 3-v6si27470039pla.38.2018.05.26.10.02.16; Sat, 26 May 2018 10:02:45 -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=cq6/Lror; 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 S1032207AbeEZRCG (ORCPT + 99 others); Sat, 26 May 2018 13:02:06 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:44134 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031950AbeEZRCE (ORCPT ); Sat, 26 May 2018 13:02:04 -0400 Received: by mail-pg0-f67.google.com with SMTP id p21-v6so3554817pgd.11; Sat, 26 May 2018 10:02:04 -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=kAPvJEJkinz0dicyhdvIO/1avu9lwIcFnAEhhEZUitM=; b=cq6/Lror0wMpdkDk2FAmdwy3mIyL+n7INiwD6ypG0os3ME/yyhVrJqCRgK+OojruH2 4rZ2/4LcEbbTKUZm2K+FXdIQl5Irlo+CYe6WntZCdNwGwrS9P5RbOSigcdAsIPGe5Qis lmL6e+h5UGqMhBIwO/UrnHrX3QYP/2PHh46EvwQ1v7nad/iiYmUZR0Q+j6EM+ib6Kvs9 39BX3M/++kFVviWvhSad7BasSmUfrcRSIWTwf53rOjHDPp6u12C5Ie55QLFsmwrHDZIz FXFNC91/VJ6N2L7bP8i8cllpwEvSrouJw4AZgTZ2zBtSeRMmhAjAdDbQm+D7JoQ/VcT2 /Wsg== 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=kAPvJEJkinz0dicyhdvIO/1avu9lwIcFnAEhhEZUitM=; b=Wc1/XKp8tTr2AA/m+Oh6GPTp5wioBlrB6CTxu9nwrSWg6XsupT4VRZkcJowLIPwvxc 3uJnyG0uOo39j6o+0a7PLz0gSXVTlUaQIS95upoep9mH2dYvzx0eaeddOCrfoE4YrKxl QYs/wK1OEVD+AQ4BmXds3rB2Qxgu5d0cJHiT4AnMmW82YCJ0vlOOtBhS4KgFEHhfiZxk 5ztxx7SHApPwdUP3RBYE4nm3Mxdm7xxsqZsHAK2BbituBHKxxzHtAH4bDxv90n1wKOXp EbffWlqCyd/gbNshsOUm+WibyLxxVr9zLa493gIreEjLJCZw1rzwfVaf5huKQ/zpc917 b4cA== X-Gm-Message-State: ALKqPwen19Fcyt+w7jO/yZw/oi4okfKeyptWJ0HUnBEjKhOrBDhoQBoa mZKPiMZ29Nh2LXE4zDSIRMQ= X-Received: by 2002:a63:31d4:: with SMTP id x203-v6mr5352574pgx.389.1527354123825; Sat, 26 May 2018 10:02:03 -0700 (PDT) Received: from localhost.localdomain ([122.164.36.47]) by smtp.gmail.com with ESMTPSA id t24-v6sm53579572pfj.75.2018.05.26.10.02.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 26 May 2018 10:02:03 -0700 (PDT) From: Jeffrin Jose T To: shuah@kernel.org, kstewart@linuxfoundation.org, daniel.diaz@linaro.org, pombredanne@nexb.com, thomas@m3y3r.de, gregkh@linuxfoundation.org Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Jeffrin Jose T Subject: [PATCH] selftests: intel_pstate: notification about privilege required to run intel_pstate testing script Date: Sat, 26 May 2018 22:31:35 +0530 Message-Id: <20180526170135.3340-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 6ded61670f6d..4ddd389c2cb9 100755 --- a/tools/testing/selftests/intel_pstate/run.sh +++ b/tools/testing/selftests/intel_pstate/run.sh @@ -33,6 +33,12 @@ EVALUATE_ONLY=0 # Kselftest framework requirement - SKIP code is 4. ksft_skip=4 +msg="skip all tests:" +if [ $UID != 0 ] && [ $EVALUATE_ONLY == 0 ]; then + echo $msg please run this as root >&2 + exit $ksft_skip +fi + if ! uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ | grep -q x86; then echo "$0 # Skipped: Test can only run on x86 architectures." exit $ksft_skip -- 2.17.0