From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754128AbbCKNdG (ORCPT ); Wed, 11 Mar 2015 09:33:06 -0400 Received: from lists.s-osg.org ([54.187.51.154]:54753 "EHLO lists.s-osg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753968AbbCKNaU (ORCPT ); Wed, 11 Mar 2015 09:30:20 -0400 Message-ID: <5500436A.4010802@osg.samsung.com> Date: Wed, 11 Mar 2015 07:30:18 -0600 From: Shuah Khan Organization: Samsung Open Source Group User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Michael Ellerman CC: gorcunov@openvz.org, akpm@linux-foundation.org, tranmanphong@gmail.com, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org Subject: Re: [PATCH v2] selftests: kcmp build fails when invoked from kselftest target References: <1426032512-10353-1-git-send-email-shuahkh@osg.samsung.com> <1426040377.20917.8.camel@ellerman.id.au> In-Reply-To: <1426040377.20917.8.camel@ellerman.id.au> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/10/2015 08:19 PM, Michael Ellerman wrote: > On Tue, 2015-03-10 at 18:08 -0600, Shuah Khan wrote: >> kcmp Makefile doesn't have an explicit build rule. As a result, >> kcmp build fails, when it is run from top level Makefile target >> kselftest. Without the explicit rule, make works only when it is >> run in the current directory or from selftests directory. Add an >> explicit build rule to fix the problem. > > This should be fixed properly using my patch to filter -rR or similar. I don't agree with this. Relying on ARCH Makefiles doing the right thing for individual tests to build makes it difficult to maintain. We will keep running into problems for each of the ARCH. I would rather have this addressed in the individual Makefiles with an explicit rule and if -rR approach works, great. So it has to be two pronged approach with individual Makefiles being able to work irrespective of ARCH Makefiles doing the right thing. > >> In addition, build fails >> as it can't find kcmp.h. Fix it by passing CFLAGS. > > That is also wrong. It should *not* be looking in include/uapi. > > If it needs headers then it should be using the *exported* headers, which are > in ../../../../usr/include as the existing CFLAGS specifiy. > > Those headers are installed as part of 'make headers_install'. > Adding uapi covers both cases where the headers aren't installed yet. Also make V=1 doesn't show CFLAGS getting passed in. They need to be passed in explicitly even when run from the kcmp directory. -- Shuah -- Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America (Silicon Valley) shuahkh@osg.samsung.com | (970) 217-8978