Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1647512ioo; Sun, 22 May 2022 22:56:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZy1aYW98McUa9MweKoLHr7LjlvGFQHS68uMQQmzM0kcBoCBJNZ+/Jnl0nRqgKmQHKDP80 X-Received: by 2002:a17:903:d1:b0:15f:3277:fae with SMTP id x17-20020a17090300d100b0015f32770faemr21751512plc.69.1653285369856; Sun, 22 May 2022 22:56:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653285369; cv=none; d=google.com; s=arc-20160816; b=08OYUkgyrFMqQd2KiZuCwLsds/b1UvcSO6ghLEnMSklssNR/DCCxu2j5bpUoGiiogD KDl8Yt0MFr7WJ0BAbXBOwAAajmdIjdwRDG4KlTiT2aqEnfyDvJ475A4Rwy+3U/F+wDS5 nFMPEzGBHTiY1h3p0oHp2SQDZ/D4c168kEEaoD8ZqAEcdSSGOppIZlD4QJOl0l2rCiEl obnIShkHHHb+krEe0vr4ziMzoIo3hUempkveWayN4Wc0nF69H3P4Vzf4Cj5m/ZTz9rSG LaWZmQyVyCQ2krOpum1r4k6nUMKXMHX8o4kf3pISLyy4g/91eEyqYNSGyhwN0+NVvjkR 2OFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=iJUQ11zdibvEKML1MoaBG63neGvxnn+10KFJyibTf7w=; b=Bohm9D4p3vL0+C2cxczzbB0Naih+/AQsiyKEdGKr00K6/NDQhXgUTquKBHO5kJ5+AD kEtXbbodPfA4mjZDa6cqCMXV6Gn06BfP4TYkNPQd0z+aW0KMluCgNiMfz82Dqc73SjEd TmvbprIyo7Q34lg+aDgNKLJJtacqDj/zf0M9vLcO3HNw9v7JYSlhDg6ASifnTFqOc6xk mbK5DROFpipzikZrvYAkv5x/gPNvh4BIxfVT9CFvAtRzpD/bFJAvorxhRiTiC8xZTaZ2 AvXB09cWjHHJLH/ELDJbeCgaeZQlK2BwbtQCTYSaTcrOg0fZpDIoYcIhy/HaCux+vlxX NeHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=B4fFu8cu; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id lp5-20020a17090b4a8500b001df6b71c925si15166706pjb.188.2022.05.22.22.56.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 May 2022 22:56:09 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=B4fFu8cu; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 842C611806; Sun, 22 May 2022 22:52:20 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349493AbiEVRQY (ORCPT + 99 others); Sun, 22 May 2022 13:16:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232802AbiEVRQU (ORCPT ); Sun, 22 May 2022 13:16:20 -0400 Received: from conssluserg-02.nifty.com (conssluserg-02.nifty.com [210.131.2.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1ED5013E00; Sun, 22 May 2022 10:16:16 -0700 (PDT) Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) (authenticated) by conssluserg-02.nifty.com with ESMTP id 24MHFw3s024765; Mon, 23 May 2022 02:15:58 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com 24MHFw3s024765 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1653239758; bh=iJUQ11zdibvEKML1MoaBG63neGvxnn+10KFJyibTf7w=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=B4fFu8cukgve1ap2HSFu/zK9ZKa0IO6x2O3sFN4Xgne3SmGdYp/Cwn2J0KN2Fr2+v vswDVXXi+gfrSowdrbrW7fm4vq+q0edVZukOWju5bHFui1E5pE5JS+J/PquoG8Mshl bfqJ8TBLiT5LsCkN4U5b6kmKrwGpGorXoKP901TjdzieEafo/QvNESyitHxe7Nmrqu TaOsWdmXOXI/FQQVBSlTH5TZ5DHuqZ2hlVpXgBcK7AQpPlTqeUBneRrAYfErbDekKU JWGJIrIf2JGcwrb1cdzuLmQxpNmxJcQ8POo8oZwK8aYS9KHzP9MRs/aagXoJuF40pH 3BGPj6hkEZhhg== X-Nifty-SrcIP: [209.85.216.50] Received: by mail-pj1-f50.google.com with SMTP id oe17-20020a17090b395100b001df77d29587so15534658pjb.2; Sun, 22 May 2022 10:15:58 -0700 (PDT) X-Gm-Message-State: AOAM533DRXsn1szpLeIOX1rUsa4ARzt4ZVPuFEIG+QKSkNKLaeG7lvoA h3MzyoNt6fFb/recYhEgHiBRcrgkMp+LFsKCBFE= X-Received: by 2002:a17:90b:1e50:b0:1e0:3a08:9b12 with SMTP id pi16-20020a17090b1e5000b001e03a089b12mr4350049pjb.119.1653239757627; Sun, 22 May 2022 10:15:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Masahiro Yamada Date: Mon, 23 May 2022 02:15:20 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [Bug Report] - kselftest build fails if output directory is first level sub-directory To: Muhammad Usama Anjum Cc: Michal Marek , Nick Desaulniers , Shuah Khan , KERNEL SELFTEST FRAMEWORK , Linux Kbuild mailing list , LKML , "kernelci@groups.io" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no 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 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. -- Best Regards Masahiro Yamada