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 8FFC7C433F5 for ; Thu, 3 Mar 2022 22:19:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236778AbiCCWUo (ORCPT ); Thu, 3 Mar 2022 17:20:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236760AbiCCWUn (ORCPT ); Thu, 3 Mar 2022 17:20:43 -0500 Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC18C10A7DC for ; Thu, 3 Mar 2022 14:19:57 -0800 (PST) Received: by mail-io1-xd32.google.com with SMTP id 195so7599656iou.0 for ; Thu, 03 Mar 2022 14:19:57 -0800 (PST) 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=Uy2afJ9ZPvmmHWI6b6VB2HM3H9arIDEQAaJ8qNi/u4s=; b=AlMT6ljgLpZMvzgD59xHREgkpKiwKbtEuapOcBDIpPtJKRqPOXV5oO+kmZCujKdnEM fD3joPO6+cvZ7l8OTW9lKXJOo2YStlCEYiRdIiJOCEnB7aHGVQhrJZTnpOunVg4cDg58 ncYE0pwb5SnXjTa6giQK3X4pbcCr1szj2cyHg= 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=Uy2afJ9ZPvmmHWI6b6VB2HM3H9arIDEQAaJ8qNi/u4s=; b=JyfbucAp6r8NnR3nQL0Ngf/bjSstRVLWmL4cx+5gXUEDqHFw23UBGo24Cy0DH36fYV 8CStcvxLAtNLpS8hmgcdIDy+d9FK1KIGAK+HSSTy5Srgwx8fJQgxSN9ElhKz4kNk/wQc SY++Vv0p+APK87wVYs5Y9s8t+/fd7BCqmU9hxtE9mDEZ0oi7C9Z3H8NBPiBkvtBOs8Gc wv+7oxglMU68l4HQXBk0fBvErv5U07qbLBHw5IsP8enaQBb9OgNpGVBWUKv+LKtzmj8O LoLS6kK/aErl/Ujt3bBlbIXEpsYLa6aK8VA0V2rHGVaPlmNa5xowHWfr6yOBx9t2+As0 MIMQ== X-Gm-Message-State: AOAM532YfIW7RTIxYQUZafGf/DH2dJrEceUJfXF5NSK+v8F8HeiqL8vE 7vkLq/oxsgSTZC3ugA/8wVqAlw== X-Google-Smtp-Source: ABdhPJwyV0kCAYS8zhtpz6l8KGJh5RlhH2rviKwOeDCFKFlpKmMI3raFfSdWuPxguPN1PV2EMTVkDg== X-Received: by 2002:a05:6602:242a:b0:640:746c:c2bd with SMTP id g10-20020a056602242a00b00640746cc2bdmr28851332iob.74.1646345997073; Thu, 03 Mar 2022 14:19:57 -0800 (PST) Received: from [192.168.1.128] ([71.205.29.0]) by smtp.gmail.com with ESMTPSA id i14-20020a056e021d0e00b002c60beec66asm1878556ila.78.2022.03.03.14.19.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Mar 2022 14:19:56 -0800 (PST) Subject: Re: [PATCH V2] selftests: Fix build when $(O) points to a relative path To: Muhammad Usama Anjum , Shuah Khan , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh Cc: kernel@collabora.com, kernelci@groups.io, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, Shuah Khan References: <20220216223817.1386745-1-usama.anjum@collabora.com> <46489cd9-fb7a-5a4b-7f36-1c9f6566bd93@collabora.com> <63870982-62ba-97f2-5ee2-d4457a7a5cdb@linuxfoundation.org> <9a643612-ea85-7b28-a792-770927836d43@linuxfoundation.org> From: Shuah Khan Message-ID: Date: Thu, 3 Mar 2022 15:19:55 -0700 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: bpf@vger.kernel.org On 2/26/22 12:32 AM, Muhammad Usama Anjum wrote: > On 2/26/22 2:13 AM, Shuah Khan wrote: >> On 2/25/22 11:01 AM, Shuah Khan wrote: >>> On 2/25/22 10:22 AM, Muhammad Usama Anjum wrote: >>>> Any thoughts about it? >>>> >>> >>> No to post please. >>> >>>> On 2/17/22 3:38 AM, Muhammad Usama Anjum wrote: >>>>> Build of bpf and tc-testing selftests fails when the relative path of >>>>> the build directory is specified. >>>>> >>>>> make -C tools/testing/selftests O=build0 >>>>> make[1]: Entering directory >>>>> '/linux_mainline/tools/testing/selftests/bpf' >>>>> ../../../scripts/Makefile.include:4: *** O=build0 does not exist. >>>>> Stop. >>>>> make[1]: Entering directory >>>>> '/linux_mainline/tools/testing/selftests/tc-testing' >>>>> ../../../scripts/Makefile.include:4: *** O=build0 does not exist. >>>>> Stop. >>>>> >>>>> Makefiles of bpf and tc-testing include scripts/Makefile.include file. >>>>> This file has sanity checking inside it which checks the output path. >>>>> The output path is not relative to the bpf or tc-testing. The sanity >>>>> check fails. Expand the output path to get rid of this error. The >>>>> fix is >>>>> the same as mentioned in commit 150a27328b68 ("bpf, preload: Fix build >>>>> when $(O) points to a relative path"). >>>>> >>>>> Signed-off-by: Muhammad Usama Anjum >>>>> --- >>>>> Changes in V2: >>>>> Add more explaination to the commit message. >>>>> Support make install as well. >>> >> >> Does the same happen when you use make kselftest-all? > No, this problem doesn't appear when using make kselftest-all. > > As separate output directory build was broken in kernel's top most > Makefile i.e., make kselftest-all O=dir. (I've sent separate patch to > fix this: > https://lore.kernel.org/lkml/20220223191016.1658728-1-usama.anjum@collabora.com/) > So people must have been using kselftest's internal Makefile directly to > keep object files in separate directory i.e., make -C > tools/testing/selftests O=dir and in this way the build of these tests > (bpf, tc-testing) fail. This patch is fixing those build errors. > >> >> I am unable to reproduce what you are seeing? > make -C tools/testing/selftests O=dir should reproduce this problem. > Applied to linux-kselftest next for Linux 5.18-rc1. thanks, -- Shuah