Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3793455imw; Mon, 11 Jul 2022 16:18:08 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vjBrPNpBapPnliQfi/eF70XZJMVm0h1x6Y9eo8p/iE8szE42ALr9UbpeuZItbFG7yVJMQP X-Received: by 2002:a05:6402:294c:b0:43a:91a9:a691 with SMTP id ed12-20020a056402294c00b0043a91a9a691mr28326048edb.182.1657581488428; Mon, 11 Jul 2022 16:18:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657581488; cv=none; d=google.com; s=arc-20160816; b=r4yUwEhlDflYhdo7tsal8VK6uNtw1nKTtBjMiO3Wrc6l5FPUulFy7GS6xKilOEDgtT n+soMoKSKkxoNGobjxaJWtcBlpg3sm7ydRkt5KGX8/A8GMxWezAtNjKVfMc5mqJCI021 K/4x2Tz/vKHsC1KRyp1d8JpR5WibGBZPTFMrkXid/pB69fcY+WqV86G44b3bYmPxBhMA HhqSVFyXeQfwqXkBRCcGHFcfW+WtPX/r6Ds7v3WpThxIYWpBQB142gcZI/pjKq/NhWoz CZUA9eOQPB+i4my3Yj6Sfc0UZrNJDpsOEZw7hnebpBb44J36xiCGyh+lTx9y0T/AVnJM K/5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=pxJlETCPEHBQbahGOg/NSMRU0LrVE7hOLMj3y7kzK9w=; b=eCB95gxVUPDDD+8efix79s7+WpilIBq/EhlKM/kCnNRazIJfdlED5ZS6gio9LMyorF IOCS42/8IPok2a4g5aZg3BDBSWgyIV1GxrlTmoUPeZr63ZZev1AeoCH5b1thcMPfkCwT JXLbjbBjHLdBJ1AfMt/yz7nUw5+6jCeiYBp5BDhpGRxTaX38PoFD1wnYHEknFMqCysef A0ukxI00WJYPDorfFLEpBr37on2mXY6X4lnyAVFRfpMikctkROwTLL12I3FelHBnyxoa dTf14fuhI5JVi4F4OGZIAlMIMu75qyw1ft1RoP4462Gq/H3laA0HjGvBmnSJ00Wh6zR1 YhKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b="X7RGik/j"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dm3-20020a05640222c300b0043acbf73479si6997840edb.458.2022.07.11.16.17.36; Mon, 11 Jul 2022 16:18:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b="X7RGik/j"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230228AbiGKXIJ (ORCPT + 99 others); Mon, 11 Jul 2022 19:08:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229606AbiGKXII (ORCPT ); Mon, 11 Jul 2022 19:08:08 -0400 Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FC6F87367 for ; Mon, 11 Jul 2022 16:08:06 -0700 (PDT) Received: by mail-il1-x12d.google.com with SMTP id h16so3904340ila.2 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=Ay8YJEEd6hkxrkl3rAeH3aeqYoojHFbY16p9WCEiCapgW+bRFbDKrFZAYfqV/Yg7kT EUW0n6lW5gnnilAJgc9u2P9fkRVkBtlXCCXg2Uw3vJ3gsH++09BgJsR05v21eB/+UEa5 TbVO+GhdwDN+LMDoTt9jMhlW3jMfv40fAO2wt48eZRAMfwbAr/sKok2R6lfk08NtURif 2HjPfpkl64NzIpgHYZ0pMEggtEkMqcUhuGfGtuiur3S6Fhl8C7pGV8JtXWvhJ0wO7CYx +CqdQWLP5vUaRS1w3yiI8wQ0NNxrjJOLIAblXJtubt+Cnq8RuPiz4lln8YPgRZBTUfFj KGsA== X-Gm-Message-State: AJIora/hBzvUItJlUTghRszzef9NRyYl5zrZR6HKPIyhSt9AVqlI2ZKq rgAggG9YNVBwWekFze45vA0l7g== 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 X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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