Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1007405imu; Fri, 4 Jan 2019 11:09:54 -0800 (PST) X-Google-Smtp-Source: ALg8bN63DlsDYikgKsf1kv7KHHJwZDppvghDM54xyL23czVRDtMx333F0d5JU7xW1VsMaJXvOeCL X-Received: by 2002:a63:91c1:: with SMTP id l184mr2643620pge.29.1546628994778; Fri, 04 Jan 2019 11:09:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546628994; cv=none; d=google.com; s=arc-20160816; b=fDS8oJ917EnmuOdw2l7DJTnqx+8k5pPtgHB0X/EBZ8dekHmroFIU5KxlyIky6FvZOO PKYEBsPup5HUoKlgq+tyqA9srvN8UBrWJ3j/bzuC8yTzXOZmrAoYUGR80/NwSds50lQn cop8W4DfigBMZ7uYZ32BNbuaAfluDKeekTTPzsakl/6Nwn0AUkTXJKUPyudGtN5HfMoW vipTWLYBVVptgu/ol6EI+WlSUPqqgKtrHT4oWzcCtVfowmKA2uUDqi4WWRrFLvFpzMYE 6lgkH0ZM1DezB/I2nfZVEmUtNtWYNN6gzAqyZLiBGYRBUfW1WgQeugd7C1VYhFNEgcLA EpPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=PgFC9bIQMp0guHahtNt6aJE4LHWJ4Yc2MWcPzmpsX5E=; b=RzK3rvBoonMOVem3UTssSLL5BecgUL5PtlI6MEV8n72psItalXOBVvmEF3hZzpE7kx VKUvxe9hxAo4ve+gyPMXr1Eiq6p2kp+GpUOuVjMIzXa9HgC44dHvE3JuOhUOMLHKX9pJ kDEpdsTiJ13I3K5vaBNc/q3dl7/1Dl6Xruwc0HeF787MPmkL7qvD1W9IABH6zGsvULX+ LhsjEzONGbauBIk1yo3e+aVNHkLMJxGNnzYAmeVMwPG00Hl6BmCaswUvCIkq0MbOGVaP BRKxs2fkbitHENghNNGqhFdl/uc1fHwAsCbyHVGDnOsyQ5zVq5TPHYjiBsKnOnfV/PZP q7iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=igsrr4r7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z61si17770625plb.49.2019.01.04.11.09.39; Fri, 04 Jan 2019 11:09:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=igsrr4r7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726200AbfADTH0 (ORCPT + 99 others); Fri, 4 Jan 2019 14:07:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:37508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725916AbfADTH0 (ORCPT ); Fri, 4 Jan 2019 14:07:26 -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 D96F9218CD; Fri, 4 Jan 2019 19:07:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1546628844; bh=FeODntf5j4sIiYiALtAO6CeXsgDo2W0b/i+34BPAthU=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=igsrr4r7mTJ/VQyIgkImj/Q8aMuj6xRonux5sEJAv/SpxsMUL4OHmYErSFbW/xRf4 HBrgnjf5A3+tKTfih7rnoByCxX07TyQqW9a8DZG/yO4jZfsT55/MKqnBOCkZGk+N37 80tNvNbgplWixuqHzxzLz1XDRBbs/80wBUrfNhBI= Subject: Re: selftests/bpf doesn't compile To: Geert Uytterhoeven Cc: Daniel Borkmann , Alexei Starovoitov , Thomas Meyer , Linux Kernel Mailing List , "open list:KERNEL SELFTEST FRAMEWORK" , Shuah Khan , Networking , Masahiro Yamada , linux-kbuild , "open list:GPIO SUBSYSTEM" , shuah References: <20170908111923.27434-1-thomas@m3y3r.de> <20170908230155.esge2mctk5d5g7gb@ast-mbp> <59B32231.9090406@iogearbox.net> <295553a4-aadc-e5d1-229e-22d1966bc9f5@kernel.org> From: shuah Message-ID: Date: Fri, 4 Jan 2019 12:07:23 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Geert, On 1/4/19 10:16 AM, Geert Uytterhoeven wrote: > Hi Shuah, > > CC kbuild, gpio > > On Thu, Sep 14, 2017 at 5:34 PM Shuah Khan wrote: >> bpf test depends on clang and fails to compile when >> >> ------------------------------------------------------ >> make -C tools/testing/selftests/bpf run_tests >> >> >> make: clang: Command not found >> Makefile:39: recipe for target '.linux-kselftest/tools/testing/selftests/bpf/test_pkt_access.o' failed >> make: *** [./linux-kselftest/tools/testing/selftests/bpf/test_pkt_access.o] Error 127 >> make: Leaving directory '.linux-kselftest/tools/testing/selftests/bpf' > > The above failure is indeed due to missing clang. > >> With "make TARGETS=bpf kselftest" it fails earlier: >> >> make[3]: Entering directory './linux-kselftest/tools/lib/bpf' >> Makefile:40: tools/scripts/Makefile.arch: No such file or directory >> Makefile:84: tools/build/Makefile.feature: No such file or directory >> Makefile:143: tools/build/Makefile.include: No such file or directory > > This is due to srctree being "." instead of the actual source tree, > when invoked as "make kselftest". > When using "make -C tools/testing/selftests", srctree is correct. > > tools/testing/selftests/bpf/Makefile has: > > $(BPFOBJ): force > $(MAKE) -C $(BPFDIR) OUTPUT=$(OUTPUT)/ > > to enter the tools/lib/bpf directory to force a build of libbpf.a > > Note that tools/gpio has the same issue. > > There seem to be _four_ different ways to build kselftests > (Documentation/dev-tools/kselftest.rst): > > make kselftest > make O=/path/to/output kselftest > make -C tools/testing/selftests > make O=/path/to/output -C tools/testing/selftests > > I'm not so fond of the latter two, as they basically run make from > somewhere inside the tree, which complicates things. I believe we don't > support this anywhere else. > > Each of the four seem to have (different) issues. Especially when you > throw cross-compiling into the mix. And care about where installed > headers end up (yes, kselftest calls headers_install internally). > > I'm working on fixes for some of them, but I don't know how to fix the > srctree issue. > I will take a look at the srctree problem and fix it. I have had to fix a few individual test Makefiles after ksefltest headers_install went in. It will be in a week or two. I am taking some time off this week and next week other than for occasional email checking. thanks, -- Shuah