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 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E31DC432C0 for ; Wed, 27 Nov 2019 17:32:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5CD0A2075C for ; Wed, 27 Nov 2019 17:32:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574875967; bh=ROTV3DxT9R+Fw0MGi8wfFo+yUBoBuUSrejp3gUGf4Uo=; h=Subject:To:References:From:Date:In-Reply-To:List-ID:From; b=mic/X6d6dV87EA7qm60GOpelzzDo5l1qkke5wiHQgwpRhx8CrXdd57y0I031OGfs1 ARqY/pmBlOFN87zUyynRBHg7YDMzPItokqExbhINAeFJmqEBSrQNlUv+te+A2YsBeV Ir9xk6zcNlkP3SjWcXc3ktWPYeB4SjKdepkq0xCk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726593AbfK0Rcr (ORCPT ); Wed, 27 Nov 2019 12:32:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:58610 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726576AbfK0Rcq (ORCPT ); Wed, 27 Nov 2019 12:32:46 -0500 Received: from [192.168.1.112] (c-24-9-64-241.hsd1.co.comcast.net [24.9.64.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E5C75206E0; Wed, 27 Nov 2019 17:32:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574875966; bh=ROTV3DxT9R+Fw0MGi8wfFo+yUBoBuUSrejp3gUGf4Uo=; h=Subject:To:References:From:Date:In-Reply-To:From; b=NOWYA8Uj49xzobHmuvZtn+Wqoa12Kaq4iheqWN8b/WwHKnboER7Zzn5GSLQCG3slb SeP47oiBgu6L/VXF9cqk+gp8nP8AvVkOSf7OCd3LfNCyLaoYqLyCpOVb0uE62XxcCZ 9qJfZ283srSmrdbeo4Dv1P7Zec3ZWRRyiHKfBFFQ= Subject: Re: kselftest: failed to build with -C tool/testing/selftests when KBUILD_OUTPUT is set To: Cristian Marussi , Michael Ellerman , Tim.Bird@sony.com, "linux-kselftest@vger.kernel.org" , shuah References: <8d34a9b9-f8f3-0e37-00bf-c342cf3d4074@arm.com> <8736ea2cty.fsf@mpe.ellerman.id.au> <47e09faa-a3fb-04a7-4989-4443b27f47c2@arm.com> <8bd66a2d-e92f-6108-77d0-91d737df9b0d@kernel.org> <3f436c1b-1921-78f7-c021-9c8472e24733@arm.com> From: shuah Message-ID: <2fa5f914-e5d6-9ddd-03f0-abe95569a6f2@kernel.org> Date: Wed, 27 Nov 2019 10:32:45 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 In-Reply-To: <3f436c1b-1921-78f7-c021-9c8472e24733@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On 11/27/19 9:53 AM, Cristian Marussi wrote: > On 27/11/2019 16:42, shuah wrote: >> On 11/27/19 9:23 AM, Cristian Marussi wrote: >>> On 27/11/2019 16:04, shuah wrote: >>>> On 11/27/19 3:54 AM, Cristian Marussi wrote: >>>>> Hi >>>>> >>>>> On 27/11/2019 03:54, Michael Ellerman wrote: >>>>>> Cristian Marussi writes: >>>>>>> Hi >>>>>>> >>>>>>> while testing on linux-next >>>>>>> >>>>>>> I see that, when KBUILD_OUTPUT is set in the env, running something like (using TARGETS=exec as a random subsystem here...) >>>>>>> >>>>>>> $ make TARGETS=exec INSTALL_PATH=/nfs/LTP-official-debian-aarch64-rootfs/opt/KSFT_next kselftest-install >>>>>>> >>>>>>> works fine as usual, WHILE the alternative invocation (still documented in Documentation/dev-tools/kselftest.rst) >>>>>>> >>>>>>> make -C tools/testing/selftests/ TARGETS=exec INSTALL_PATH=/nfs/LTP-official-debian-aarch64-rootfs/opt/KSFT_next install >>>>>>> >>>>>>> fails miserably with: >>>>>>> ... >>>>>>> ... >>>>>>> REMOVE usr/include/rdma/cxgb3-abi.h usr/include/rdma/nes-abi.h >>>>>>> HDRINST usr/include/asm/kvm.h >>>>>>> INSTALL /kselftest/usr/include >>>>>>> mkdir: cannot create directory ‘/kselftest’: Permission denied >>>>>>> /home/crimar01/ARM/dev/src/pdsw/linux/Makefile:1187: recipe for target 'headers_install' failed >>>>>>> make[2]: *** [headers_install] Error 1 >>>>>>> >>>>>>> >>>>>>> This is fixed by unsetting KBUILD_OUTPUT OR reverting: >>>>>>> >>>>>>> 303e6218ecec (ksft/fixes) selftests: Fix O= and KBUILD_OUTPUT handling for relative paths >>>>>>> >>>>>>> since bypassing top makefile with -C, the definition of abs-objtree used by the above patch >>>>>>> is no more available. >>>>>>> >>>>>>> As a side effect when KBUILD_OUTPUT is set, this breaks also the usage kselftest_install.sh. >>>>>>> >>>>>>> $ ./kselftest_install.sh /home/crimar01/ARM/dev/nfs/LTP-official-debian-aarch64-rootfs/opt/KSFT_full_next >>>>>>> ./kselftest_install.sh: Installing in specified location - /home/crimar01/ARM/dev/nfs/LTP-official-debian-aarch64-rootfs/opt/KSFT_full_next ... >>>>>>> make --no-builtin-rules INSTALL_HDR_PATH=$BUILD/usr \ >>>>>>> ARCH=arm64 -C ../../.. headers_install >>>>>>> make[1]: Entering directory '/home/crimar01/ARM/dev/src/pdsw/linux' >>>>>>> make[2]: Entering directory '/home/crimar01/ARM/dev/src/pdsw/out_linux' >>>>>>> INSTALL /kselftest/usr/include >>>>>>> mkdir: cannot create directory ‘/kselftest’: Permission denied >>>>>>> /home/crimar01/ARM/dev/src/pdsw/linux/Makefile:1187: recipe for target 'headers_install' failed >>>>>>> make[2]: *** [headers_install] Error 1 >>>>>>> make[2]: Leaving directory '/home/crimar01/ARM/dev/src/pdsw/out_linux' >>>>>>> Makefile:179: recipe for target 'sub-make' failed >>>>>>> make[1]: *** [sub-make] Error 2 >>>>>>> make[1]: Leaving directory '/home/crimar01/ARM/dev/src/pdsw/linux' >>>>>>> Makefile:142: recipe for target 'khdr' failed >>>>>>> make: *** [khdr] Error 2 >>>>>>> >>>>>>> >>>>>> ... >>>>>>> Any thoughts ? ... or am I missing something ? >>>>>> >>>>>> You're not missing anything, this is broken. >>>>> Thanks for the feedback ! >>>>> >>>>> Cristian >>>>> >>>>>> >>>>>>> (I think I'm starting to see this in latest CI linaro kselftest while they cross-compile for arm64) >>>>>> >>>>>> It just hit my travis jobs when I merged up to master: >>>>>> >>>>>> https://travis-ci.org/linuxppc/linux/jobs/617482001 >>>>>> >>>>>> Shuah can we please get this reverted? >>>>>> >>>> >>>> I will take care of this. Supporting all these use-cases has been >>>> maintenance problem. Fixing one use-case breaks another. :( >>>> >>>> I will look into fixing this once for all. >>> >>> Thanks. >>> >>> In fact all of the above works fine with the new kselftest-install target you added recently >>> but I think a lot of CI is still using the old -C method. >>> >>> Regards >> >> If all of the above works with kselftest-install target, I would rather >> ask for CI's to change, so we can get rid of make -C usage for install. >> >> In which case, I would rather not revert this and request CIs to start >> using kselftest-install target. >> >> >> I would like to see CI's use kselftest-* targets from the main makefile >> for build/run/install. >> >> It has been very difficult to support "make -C" use-cases in general >> and especially for install and relocatable builds. >> > > Well I'm not sure if it covers all the build cases/scenario for CIs and I have > only verified that this specific failure seems to work using the toplevel Makefile > targets (since the offending commit uses abs-objtree). > Anyway $ ./kselftest_install.sh is broken too as of now. > With the revert, it will go back to not having support for relative paths :( I will look into reverting the offending commit or fixing it. thanks, -- Shuah