From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3820C433EF for ; Mon, 11 Jul 2022 23:08:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229684AbiGKXIJ (ORCPT ); Mon, 11 Jul 2022 19:08:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229578AbiGKXII (ORCPT ); Mon, 11 Jul 2022 19:08:08 -0400 Received: from mail-il1-x12c.google.com (mail-il1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A230C87F58 for ; Mon, 11 Jul 2022 16:08:06 -0700 (PDT) Received: by mail-il1-x12c.google.com with SMTP id u13so3896797iln.6 for ; Mon, 11 Jul 2022 16:08:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=pxJlETCPEHBQbahGOg/NSMRU0LrVE7hOLMj3y7kzK9w=; b=X7RGik/jDCOr5Fa+lHlfeG1T2hU9is8O8+tN+LPm4MrRRxsXbb/HJ8jS2ZeFTRlL8d +hMiVojqvGP/3PkP4oqYlWwht1Vkm3nmYFbhncFJONOGdm7taV/GWN7IIfELEU+ZICeV 0/Vayy4Y/IV0hsPxo2ms8svdM4BMqceANMYPU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=pxJlETCPEHBQbahGOg/NSMRU0LrVE7hOLMj3y7kzK9w=; b=Bp5GzORonV9g82sQ7DAy0qFU9gPNGziE3rIWtdCUvpLEi3LkzF2MnuzPLYQoqlhxl9 o9/FjxIs7WrQ23U54ynywv/qZMTrgr2rmCwUtzrBrior6lbB9EQSVb4b9Zjxkv8oPoIU 7UMs2YZ/5YeXYAfl4w2Pn6F1MVP1NZye5rdOv5zvIHHFj57i/qeYQEdQX1yyti925pdY Ts959uAiM//ZJLjI4utC/u/hEzrjXba1BoyRW4oiXY8ybW5j/Z4hcTe47dtvD9+ybPLY CBBpi2A9ZzmpjZgWBLJFE/cwxks5MpS2CXS4noLQ2fUQRMn1sDsmKmBANE99/0rE8sC7 dZAQ== X-Gm-Message-State: AJIora8nylqF826Pm9GhSbDClVEWixzCAIdKdvVPmRRLIXARFRZ25DCq sMEvNftwAo+wTboyrIWZK/3tRw== X-Google-Smtp-Source: AGRyM1ssd95vtTolGyGBr/dfUJKcR2zMP3hv867l9YAKzLPw+Ul9hCxFMfdhF5VDALH3Niydpu7D6g== X-Received: by 2002:a92:c26b:0:b0:2dc:8bee:cade with SMTP id h11-20020a92c26b000000b002dc8beecademr885531ild.160.1657580886020; Mon, 11 Jul 2022 16:08:06 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id s3-20020a056602168300b00678b7e2e040sm4180260iow.7.2022.07.11.16.08.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Jul 2022 16:08:05 -0700 (PDT) Subject: Re: [PATCH 0/4] Fix kselftest build with sub-directory To: Anders Roxell Cc: Guillaume Tucker , Masahiro Yamada , Michal Marek , Nick Desaulniers , Shuah Khan , Kees Cook , Naresh Kamboju , kernel@collabora.com, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Shuah Khan References: From: Shuah Khan Message-ID: Date: Mon, 11 Jul 2022 17:08:04 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org On 7/11/22 6:13 AM, Anders Roxell wrote: > On Fri, 8 Jul 2022 at 19:14, Shuah Khan wrote: >> >> On 7/8/22 10:23 AM, Guillaume Tucker wrote: >>> Earlier attempts to get "make O=build kselftest-all" to work were >>> not successful as they made undesirable changes to some functions >>> in the top-level Makefile. This series takes a different >>> approach by removing the root cause of the problem within >>> kselftest, which is when the sub-Makefile tries to install kernel >>> headers "backwards" by calling make with the top-level Makefile. >>> The actual issue comes from the fact that $(srctree) is ".." when >>> building in a sub-directory with "O=build" which then obviously >>> makes "-C $(top_srcdir)" point outside of the real source tree. >>> >>> With this series, the generic kselftest targets work as expected >>> from the top level with or without a build directory e.g.: >>> >>> $ make kselftest-all >>> >>> $ make O=build kselftest-all >>> >>> Then in order to build using the sub-Makefile explicitly, the >>> headers have to be installed first. This is arguably a valid >>> requirement to have when building a tool from a sub-Makefile. >>> For example, "make -C tools/testing/nvdimm/" fails in a similar >>> way until has been generated by a kernel build. >>> >>> Guillaume Tucker (4): >>> selftests: drop khdr make target >>> selftests: stop using KSFT_KHDR_INSTALL >>> selftests: drop KSFT_KHDR_INSTALL make target >>> Makefile: add headers_install to kselftest targets >>> >> >> This takes us to back to the state before b2d35fa5fc80 added >> khdr support. I reluctantly agreed to the change and it has >> proven to be a problematic change. I would rather have had the >> dependency stated that headers should be installed prior to >> building tests - test build depends on kernel build anyway and >> having dependency on headers having build isn't a huge deal. > > I agree that it's not a huge deal. > >> >> So I am in favor of getting rid of khdr support. However, this >> khdr support was a change originated from Linaro test ring. Undoing >> this might have implication on their workflow. > > It shouldn't be a problem. > I've been running these patches through a smoke test and it looks > good. > > Tested-by: Anders Roxell > > Thank you Anders for confirming this isn't a problem for Linaro workflow and testing. Than you Guillaume for fixing the problem. I will apply these for 5.20-rc1. thanks, -- Shuah