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 0BD9FC43334 for ; Wed, 8 Jun 2022 01:53:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240436AbiFHBs6 (ORCPT ); Tue, 7 Jun 2022 21:48:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1575397AbiFGX1G (ORCPT ); Tue, 7 Jun 2022 19:27:06 -0400 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D39840BA6C for ; Tue, 7 Jun 2022 14:39:25 -0700 (PDT) Received: by mail-io1-xd29.google.com with SMTP id y85so6619710iof.2 for ; Tue, 07 Jun 2022 14:39:25 -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=DMYMqyjnC+Pa1f9t3aRd7d9q29f2hRwNi8wYEpJotmk=; b=h4EOnSJW5qlumjyDRpOGgdjQoOyB4Q+O6l59N39UQahjkhxDl4VSySl01hMTwc9zRT EfuDzgEVqg/pBp3s4lQPkvko7HQkMiBmLEgZ1AEo0N7Phwb0v+fDY90LCrvAPcCNaH2r O3L623yMARWhJhFoBgQ8IewDspFlSDu0Jp5ag= 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=DMYMqyjnC+Pa1f9t3aRd7d9q29f2hRwNi8wYEpJotmk=; b=TQOfrQNt6BIVCAefIxOM9uAYyJaAq2Z2820hJbCcHB+8vcYm3pjM6zu/wolANk8sRi pw7LFfPNIHCyhAwbCBMZMKVqdQFua0hzdZL70XsM97797T53sp0BtJTvWl9jKPsR+uqz nbVl9/fzOI+hU/Rdjd4pk0Rc25wb3pO3R7MVxI4zZnFEykznHBCJgjrh7EWdNvUhTcwd ViXv0bOujRp3rqmX6HF3MoIwkDvFJF55BNgasBeJino8aW0NaEkp++kgn0PAJNPxrI6l 18GbQjNsJWvzJVKgd7jhmi2Vh7qrGvfsHfck/+l4GrDAVQoBrN0oqZ+w4KhlcBhlPfX0 PHTw== X-Gm-Message-State: AOAM531XWd47azGJAjnPpoirOc/R/AdHMRb98CrqrzqX4MeaEI7SN8AT wG+7YSRUMzGchXDWFUV/o3q2Zw== X-Google-Smtp-Source: ABdhPJx4JWLAS1RWT5TFeTIfGK6vW9bn00rsuVLiTtAdQU1cno64ZEk4yj+YCiecaRL9yWnI7GLMpg== X-Received: by 2002:a05:6638:1495:b0:331:c58a:301 with SMTP id j21-20020a056638149500b00331c58a0301mr4212898jak.134.1654637962472; Tue, 07 Jun 2022 14:39:22 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id e1-20020a022101000000b0032b3a78179csm7086269jaa.96.2022.06.07.14.39.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Jun 2022 14:39:22 -0700 (PDT) Subject: Re: [Bug Report] - kselftest build fails if output directory is first level sub-directory To: Masahiro Yamada , Muhammad Usama Anjum Cc: Michal Marek , Nick Desaulniers , Shuah Khan , KERNEL SELFTEST FRAMEWORK , Linux Kbuild mailing list , LKML , "kernelci@groups.io" , Shuah Khan References: From: Shuah Khan Message-ID: Date: Tue, 7 Jun 2022 15:39:20 -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-kernel@vger.kernel.org On 5/22/22 11:15 AM, Masahiro Yamada wrote: > On Sat, May 21, 2022 at 3:44 PM Muhammad Usama Anjum > wrote: >> >> Hello, >> >> kselftest can be built using the kernel's top most Makefile without >> using kselftest's Makefile directly. But there is bug in the top most >> Makefile. The build fails if the specified output directory is first >> level sub-directory. Here is a example to reproduce this bug: >> >> make kselftest-all O=build >> >> "The Make is working in a wrong directory, that is why the relative path >> does not work." Masahiro Yamada. Feel free to fix it if someone pin the bug. >> >> It should be noted that the build works in some other combinations: >> make kselftest-all (works) >> make kselftest-all O=/tmp (works) >> make kselftest-all O=build/build2 (works) >> >> My unsuccessful attempt to fix this bug can be found here: >> https://lore.kernel.org/lkml/20220223191016.1658728-1-usama.anjum@collabora.com/ >> >> Thanks, >> Muhammad Usama Anjum > > > This problem starts from the bad design of the kselftest framework. > I did some research before. I think I can fix the root cause but > currently I do not have enough time to do it. > > > KBUILD_ABS_SRCTREE is a user-interface to request > Kbuild to use the absolute path. > If it is forced in the top Makefile, users have no way to > negate it. > It is true that using the absolute path is a quick work-around > because you do not need to care about the current working directory. > > If you insist on it, just go ahead. It is just two line changes. > Once the issue is fixed in a better way, your patch can be reverted easily. > > > Why don't we work on fixing it the wright way? I would rather go that route than using short rem fixes. Usama, would you be interested in working on a proper fix as recommended by Masahiro? thanks, -- Shuah