linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: shuah <shuah@kernel.org>
To: Paolo Bonzini <pbonzini@redhat.com>,
	tglx@linutronix.de, mingo@redhat.com, peterz@infradead.org,
	dvhart@infradead.org, bamv2005@gmail.com, brgl@bgdev.pl,
	fathi.boudra@linaro.org, anders.roxell@linaro.org,
	daniel.diaz@linaro.org, pintu.ping@gmail.com, drjones@redhat.com,
	hofsass@google.com, peterx@redhat.com, peng.hao2@zte.com.cn,
	wei@redhat.com, davem@davemloft.net, dcaratti@redhat.com,
	akpm@linux-foundation.org, mhocko@suse.com,
	khalid.aziz@oracle.com, mpe@ellerman.id.au,
	aneesh.kumar@linux.vnet.ibm.com, dima@arista.com
Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-gpio@vger.kernel.org, stable@vger.kernel.org,
	shuah <shuah@kernel.org>
Subject: Re: [PATCH] selftests: Fix test errors related to lib.mk khdr target
Date: Thu, 13 Dec 2018 15:50:01 -0700	[thread overview]
Message-ID: <25593aa4-a2a7-6567-11f2-b702b6e5563c@kernel.org> (raw)
In-Reply-To: <623cdf7b-fc3c-2a93-c61a-a043e3d7f75b@redhat.com>

On 12/13/18 3:40 PM, Paolo Bonzini wrote:
> On 13/12/18 21:00, shuah@kernel.org wrote:
>> From: Shuah Khan <shuah@kernel.org>
>>
>> Commit b2d35fa5fc80 ("selftests: add headers_install to lib.mk") added
>> khdr target to run headers_install target from the main Makefile. The
>> logic uses KSFT_KHDR_INSTALL and top_srcdir as controls to initialize
>> variables and include files to run headers_install from the top level
>> Makefile. There are a few problems with this logic.
>>
>> 1. Exposes top_srcdir to all tests
>> 2. Common logic impacts all tests
>> 3. Uses KSFT_KHDR_INSTALL, top_srcdir, and khdr in an adhoc way. Tests
>>     add "khdr" dependency in their Makefiles to TEST_PROGS_EXTENDED in
>>     some cases, and STATIC_LIBS in other cases. This makes this framework
>>     confusing to use.
>>
>> The common logic that runs for all tests even when KSFT_KHDR_INSTALL
>> isn't defined by the test. top_srcdir is initialized to a default value
>> when test doesn't initialize it. It works for all tests without a sub-dir
>> structure and tests with sub-dir structure fail to build.
>>
>> e.g: make -C sparc64/drivers/ or make -C drivers/dma-buf
>>
>> ../../lib.mk:20: ../../../../scripts/subarch.include: No such file or directory
>> make: *** No rule to make target '../../../../scripts/subarch.include'.  Stop.
>>
>> There is no reason to require all tests to define top_srcdir and there is
>> no need to require tests to add khdr dependency using adhoc changes to
>> TEST_* and other variables.
>>
>> Fix it with a consistent use of KSFT_KHDR_INSTALL and top_srcdir from tests
>> that have the dependency on headers_install.
>>
>> Change common logic to include khdr target define and "all" target with
>> dependency on khdr when KSFT_KHDR_INSTALL is defined.
>>
>> Only tests that have dependency on headers_install have to define just
>> the KSFT_KHDR_INSTALL, and top_srcdir variables and there is no need to
>> specify khdr dependency in the test Makefiles.
> 
> Looks good.  Could you please provide a topic branch so that we can
> avoid conflicts between our trees at the next merge window.
> 

Thanks. The topic branch is

git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git next

I will apply it in a day or two to get ready for the merge window.

thanks,
-- Shuah

  reply	other threads:[~2018-12-13 22:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-13 20:00 [PATCH] selftests: Fix test errors related to lib.mk khdr target shuah
2018-12-13 22:40 ` Paolo Bonzini
2018-12-13 22:50   ` shuah [this message]
2018-12-13 23:40     ` Paolo Bonzini
2018-12-13 23:56       ` shuah
2018-12-14  9:52         ` Paolo Bonzini
2018-12-14 20:43 ` Khalid Aziz
2018-12-14 21:07 ` Anders Roxell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=25593aa4-a2a7-6567-11f2-b702b6e5563c@kernel.org \
    --to=shuah@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=anders.roxell@linaro.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=bamv2005@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=daniel.diaz@linaro.org \
    --cc=davem@davemloft.net \
    --cc=dcaratti@redhat.com \
    --cc=dima@arista.com \
    --cc=drjones@redhat.com \
    --cc=dvhart@infradead.org \
    --cc=fathi.boudra@linaro.org \
    --cc=hofsass@google.com \
    --cc=khalid.aziz@oracle.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=pbonzini@redhat.com \
    --cc=peng.hao2@zte.com.cn \
    --cc=peterx@redhat.com \
    --cc=peterz@infradead.org \
    --cc=pintu.ping@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=wei@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).