lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 19 Jan 2022 13:22:26 +0500
From:   Muhammad Usama Anjum <usama.anjum@...labora.com>
To:     Matthieu Baerts <matthieu.baerts@...sares.net>,
        Shuah Khan <shuah@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Darren Hart <dvhart@...radead.org>,
        Davidlohr Bueso <dave@...olabs.net>,
        André Almeida <andrealmeid@...labora.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Mickaël Salaün <mic@...ikod.net>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Mat Martineau <mathew.j.martineau@...ux.intel.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        chiminghao <chi.minghao@....com.cn>,
        "open list:KERNEL SELFTEST FRAMEWORK" 
        <linux-kselftest@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        "open list:KERNEL VIRTUAL MACHINE (KVM)" <kvm@...r.kernel.org>,
        "open list:LANDLOCK SECURITY MODULE" 
        <linux-security-module@...r.kernel.org>,
        "open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>,
        "open list:NETWORKING [MPTCP]" <mptcp@...ts.linux.dev>,
        "open list:MEMORY MANAGEMENT" <linux-mm@...ck.org>
Cc:     usama.anjum@...labora.com, kernel@...labora.com
Subject: Re: [PATCH 08/10] selftests: mptcp: Add the uapi headers include
 variable

Hi Matthieu,

Thank you for putting details below.

On 1/19/22 2:47 AM, Matthieu Baerts wrote:
> Hi Muhammad,
> 
> On 18/01/2022 12:29, Muhammad Usama Anjum wrote:
>> Out of tree build of this test fails if relative path of the output
>> directory is specified. Remove the un-needed include paths and use
>> KHDR_INCLUDES to correctly reach the headers.
> 
> Thank you for looking at that!
> 
>> Signed-off-by: Muhammad Usama Anjum <usama.anjum@...labora.com>
>> ---
>>  tools/testing/selftests/net/mptcp/Makefile | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/tools/testing/selftests/net/mptcp/Makefile b/tools/testing/selftests/net/mptcp/Makefile
>> index 0356c4501c99..fed6866d3b73 100644
>> --- a/tools/testing/selftests/net/mptcp/Makefile
>> +++ b/tools/testing/selftests/net/mptcp/Makefile
>> @@ -1,9 +1,8 @@
>>  # SPDX-License-Identifier: GPL-2.0
>>  
>> -top_srcdir = ../../../../..
> 
> Removing this line breaks our CI validating MPTCP selftests. That's
> because this "top_srcdir" variable is needed in the "lib.mk" file which
> is included at the end of this Makefile.
> 
> But that's maybe a misuse from our side. Indeed to avoid compiling
> binaries and more from the VM, our CI does that as a preparation job
> before starting the VM and run MPTCP selftests:
> 
>   $ make O=(...) INSTALL_HDR_PATH=(...)/kselftest/usr headers_install
>   $ make O=(...) -C tools/testing/selftests/net/mptcp
> 
> From the VM, we re-use the same source directory and we can start
> individual tests without having to compile anything else:
> 
>   $ cd tools/testing/selftests/net/mptcp
>   $ ./mptcp_connect.sh
> 
> We want to do that because some scripts are launched multiple times with
> different parameters.
> 
> With your modifications, we can drop the headers_install instruction but
> we need to pass new parameters to the last 'make' command:
> 
>   $ make O=(...) top_srcdir=../../../../.. \
>                  KHDR_INCLUDES=-I(...)/usr/include \
>          -C tools/testing/selftests/net/mptcp
> 
> Or is there a better way to do that?
> Can we leave the definition of "top_srcdir" like it was or did we miss
> something else?
> 
It seems like I've missed this use cases where people can build only one
individual test. It is not my intention to break individual test builds.
I shouldn't be fixing one thing while breaking something else. I'll
update these patches such that individual tests are also build-able. For
this to happen, I'll just add $(KHDR_INCLUDES) to the build flags while
leaving everything else intact. I'll send a V2.

>>  KSFT_KHDR_INSTALL := 1
>>  
>> -CFLAGS =  -Wall -Wl,--no-as-needed -O2 -g  -I$(top_srcdir)/usr/include
>> +CFLAGS =  -Wall -Wl,--no-as-needed -O2 -g $(KHDR_INCLUDES)
>>  
>>  TEST_PROGS := mptcp_connect.sh pm_netlink.sh mptcp_join.sh diag.sh \
>>  	      simult_flows.sh mptcp_sockopt.sh
> 
> Note: I see there is a very long recipients list. If my issue is not
> directly due to your modifications, we can probably continue the
> discussion with a restricted audience.
> 
> Cheers,
> Matt

Powered by blists - more mailing lists