Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751447AbdINOrJ (ORCPT ); Thu, 14 Sep 2017 10:47:09 -0400 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:45123 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751335AbdINOrI (ORCPT ); Thu, 14 Sep 2017 10:47:08 -0400 Subject: Re: [PATCH] selftests: intel_pstate: compile programs if executable not found To: naresh.kamboju@linaro.org, linux-kselftest@vger.kernel.org, prarit@redhat.com, Thomas Meyer Cc: linux-kernel@vger.kernel.org, sumit.semwal@linaro.org, milosz.wasilewski@linaro.org, Shuah Khan , Shuah Khan References: <1505386269-15774-1-git-send-email-naresh.kamboju@linaro.org> From: Shuah Khan Message-ID: <8e118754-0589-f7b8-7c2b-e3a7c0faa28f@osg.samsung.com> Date: Thu, 14 Sep 2017 08:47:06 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2004 Lines: 62 On 09/14/2017 08:42 AM, Shuah Khan wrote: > Hi Naresh, > > On 09/14/2017 04:51 AM, naresh.kamboju@linaro.org wrote: >> From: Naresh Kamboju >> >> Test exit due to aperf.c: No such file or directory >> ./run.sh >> gcc: error: aperf.c: No such file or directory >> Problem compiling aperf.c. >> > > Please give me more details on where do you see this problem? > I don't think the below is the right fix. It adds checks for > executables and they doesn't exist, goes and tries to build. > >> The Makefile installs executable programs "aperf" and "msr" >> so skip compile on target. >> >> Signed-off-by: Naresh Kamboju >> --- >> tools/testing/selftests/intel_pstate/run.sh | 15 ++++++++++----- >> 1 file changed, 10 insertions(+), 5 deletions(-) >> >> diff --git a/tools/testing/selftests/intel_pstate/run.sh b/tools/testing/selftests/intel_pstate/run.sh >> index 7868c106b8b1..2149b9b5876a 100755 >> --- a/tools/testing/selftests/intel_pstate/run.sh >> +++ b/tools/testing/selftests/intel_pstate/run.sh >> @@ -31,11 +31,16 @@ EVALUATE_ONLY=0 >> >> max_cpus=$(($(nproc)-1)) >> >> -# compile programs >> -gcc aperf.c -Wall -D_GNU_SOURCE -o aperf -lm >> -[ $? -ne 0 ] && echo "Problem compiling aperf.c." && exit 1 >> -gcc -o msr msr.c -lm >> -[ $? -ne 0 ] && echo "Problem compiling msr.c." && exit 1 >> +# Compile programs if executable not found >> +if [ ! -x aperf ]; then >> + gcc aperf.c -Wall -D_GNU_SOURCE -o aperf -lm >> + [ $? -ne 0 ] && echo "Problem compiling aperf.c." && exit 1 >> +fi >> + >> +if [ ! -x msr ]; then >> + gcc -o msr msr.c -lm >> + [ $? -ne 0 ] && echo "Problem compiling msr.c." && exit 1 >> +fi > > As such run.sh shouldn't have any compile code. These should > be strictly for running tests. > > Instead of adding checks, please remove the compile logic from this > file. > Hi Naresh, I already have a patch from Thomas Meyer that removes the compile logic. No need to redo the patch. thanks, -- Shuah