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] [thread-next>] [day] [month] [year] [list]
Message-ID: <4d60a170-53d7-3f9f-fa48-34d6c4020346@tessares.net>
Date:   Tue, 18 Jan 2022 22:47:27 +0100
From:   Matthieu Baerts <matthieu.baerts@...sares.net>
To:     Muhammad Usama Anjum <usama.anjum@...labora.com>,
        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:     kernel@...labora.com
Subject: Re: [PATCH 08/10] selftests: mptcp: Add the uapi headers include
 variable

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?

>  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
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ