Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp5343033rwb; Tue, 17 Jan 2023 12:23:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXumsOo5JkLnJLcTOApcnRnacUPtSQTYFojrD23CGv+RyqVqnM/di6hfXfm4omS4heBnHdHf X-Received: by 2002:a50:fc01:0:b0:49e:d15:4b46 with SMTP id i1-20020a50fc01000000b0049e0d154b46mr10695253edr.27.1673987018200; Tue, 17 Jan 2023 12:23:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673987018; cv=none; d=google.com; s=arc-20160816; b=JgBtUspo/jnpdx0B2teYAMA8cIlh2z48cY0kP5xf83d4D5w59T2geQo+lk9UMTDjFZ fMGrMNsmY3FNT0E1U6KPY0r+eIIjg75VrPI1YV5f+0q7VKdI55qCwIbt8+VFP6nFnelc vtALGRv6aO4yGwW7H5ZEe3xfqGqcwD76NWPWjUVyxSGd7WmytQvJYZQiAYgjmDzIDrxF sREsCa1UA2DcEUb+5JnhxWURSffIvZ2GGZNg3jnqGsWA7R5nyCOYZ2hYZmat4fFnJGhV EOQdlLRhilf83813KeDDyLZgeNL3xlc0BFEgH3PudXGmuOpGJOdVmqBP8bMkQsn5VU+w j53w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=7KqTypsImNZmniW91zYe1yhsSZXhDDo+Q5hJ0Ux/67g=; b=WZ0MbhY1MlBzUVEl/znieBIsifGewB5vMmjhvJNGinRw8hsu3rgydaFAmh35cNViw8 ZlSrtuq1UPhCJRy8NA5HGOX5upLKUkKzdXlV9q21btm1wAJlozJqLyP+Alp7S6GkW/Vg CVEHuhuZtr3N8tSKCDoa3y/cIf8/CnNaIQyp6vV7gnH2rHHLO1fFpXlCuLORi5ep1Io3 to5oQY2Nd+3O/mMsQ4AAp8K1oZJ2dQ5B+PZICfmTL4qReScSYCMFEYBMj9lSeFcgTPs3 hLWt/7SJ0jGMrOT+TfLD9zBDeKt+yzfNpc0L1Z1FGvZDThKOxAcTX3KWCSxdPELATA2e X/2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=UJm5J013; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cm25-20020a0564020c9900b0049b5d6f6711si8441756edb.255.2023.01.17.12.23.23; Tue, 17 Jan 2023 12:23:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=UJm5J013; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232233AbjAQUUA (ORCPT + 47 others); Tue, 17 Jan 2023 15:20:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231373AbjAQUQ2 (ORCPT ); Tue, 17 Jan 2023 15:16:28 -0500 Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34FB438678 for ; Tue, 17 Jan 2023 11:11:33 -0800 (PST) Received: by mail-io1-xd2c.google.com with SMTP id s26so7522199ioa.11 for ; Tue, 17 Jan 2023 11:11:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=7KqTypsImNZmniW91zYe1yhsSZXhDDo+Q5hJ0Ux/67g=; b=UJm5J0133XcPj/n9gOAm6r3L7ghjKGThYDwcs+Zgq7sNkIMIcxWhaNZzVuL50g4xll axzO/2NBWRKO+Z0p4Dtg2gqYPioHnM1gdkcm2UrgwvuSHatKZ6+h4jIoNA5wP4301xq8 bX8YgqaO+YX60wmJoloHl/jpzC+5HvvMpLLUA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7KqTypsImNZmniW91zYe1yhsSZXhDDo+Q5hJ0Ux/67g=; b=ZsPyIyr+TYnV2WVQvZ3k9CIrHVVTTY5PwK0P3/mWzN7/+S1e5nO+d94VVwEmVmshvF qK+SA3q7LBkm1j58I/GYnCKo7RzbymD6GmSFbmOwxRuhk+mL9Uj0D7RdIwZrYgUXjPXw Ce3TUulIx6yTdBRm/pqdnktjsc/wn/NGU8FU9WEiN3yxb51pjq85KSwM76xinGCh8ccS T8tmv/54c6TaOGWct0mcrZtmQ94mX58L467vOhJNosE6yspobhgRgV9CoD+nWZHs1dXI CKPYHuIM3JuBPubIluFSruxws+vV4mDQcgtsShlavzO9xZblkuqExm9AIJwUorOHHu60 78sA== X-Gm-Message-State: AFqh2kqABN9DOwkEqofGQJpmXRuwbeJYuMXYx3vHaBhY7FQYPnQauph4 lAD7t0s184iT8wWTwk0o+xVWhA== X-Received: by 2002:a6b:8fcd:0:b0:704:d16d:4a59 with SMTP id r196-20020a6b8fcd000000b00704d16d4a59mr422934iod.2.1673982692512; Tue, 17 Jan 2023 11:11:32 -0800 (PST) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id a7-20020a927f07000000b002eb1137a774sm9328008ild.59.2023.01.17.11.11.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Jan 2023 11:11:31 -0800 (PST) Message-ID: <1eed08d1-c100-6ca5-63f3-73487970b08e@linuxfoundation.org> Date: Tue, 17 Jan 2023 12:11:30 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [tip:sched/core 7/28] rseq.c:139:37: error: 'AT_RSEQ_ALIGN' undeclared; did you mean 'R_SH_ALIGN'? Content-Language: en-US To: Mathieu Desnoyers , Ingo Molnar Cc: kernel test robot , Shuah Khan , oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, x86@kernel.org, Peter Zijlstra , linux-kselftest@vger.kernel.org, Shuah Khan References: <202301170348.7WLKH1pl-lkp@intel.com> <4449d8b5-b7a5-0f09-5b42-7b70ba00f8f6@linuxfoundation.org> <37625f31-6ac2-1f90-d864-e4644820bba3@efficios.com> From: Shuah Khan In-Reply-To: <37625f31-6ac2-1f90-d864-e4644820bba3@efficios.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 1/17/23 10:44, Mathieu Desnoyers wrote: > On 2023-01-17 04:06, Ingo Molnar wrote: >> >> * Shuah Khan wrote: >> >>> On 1/16/23 13:18, Mathieu Desnoyers wrote: >>>> On 2023-01-16 14:40, kernel test robot wrote: >>>>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core >>>>> head:   79ba1e607d68178db7d3fe4f6a4aa38f06805e7b >>>>> commit: 03f5c0272d1b59343144e199becc911dae52c37e [7/28] selftests/rseq: Use ELF auxiliary vector for extensible rseq >>>>> compiler: gcc-11 (Debian 11.3.0-8) 11.3.0 >>>>> reproduce: >>>>>           # https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=03f5c0272d1b59343144e199becc911dae52c37e >>>>>           git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git >>>>>           git fetch --no-tags tip sched/core >>>>>           git checkout 03f5c0272d1b59343144e199becc911dae52c37e >>>>>           make O=/tmp/kselftest headers >>>>>           make O=/tmp/kselftest -C tools/testing/selftests >>>>> >>>>> If you fix the issue, kindly add following tag where applicable >>>>> | Reported-by: kernel test robot >>>> >>>> In order to fix this, I need to change -I../../../../usr/include/ for $(KHDR_INCLUDES) in tools/testing/selftests/rseq/Makefile >>>> >>>> I can find 25 odd uses of the same pattern in the kernel selftests. Should I fix them all in one go ? >>> >>> kselftest build depends on headers installed in the root directory. > > By "root directory", do you mean kernel sources root directory or build output root directory ? > >>> The main makefile enforces this dependency. > > How ? I figure that tools/testing/selftests/lib.mk overrides KHDR_INCLUDES if it is not defined yet: > > ifeq ($(KHDR_INCLUDES),) > KHDR_INCLUDES := -isystem $(top_srcdir)/usr/include > endif > > and selftests makefiles include ../lib.mk. > > This KHDR_INCLUDES can be modified by O=... when built from the kernel top level, thus using tools/testing/selftests/Makefile: > > ifneq ($(KBUILD_OUTPUT),) > [...] >   KHDR_INCLUDES := -isystem ${abs_objtree}/usr/include > else > [...] >   KHDR_INCLUDES := -isystem ${abs_srctree}/usr/include > endif > > But it's up to the individual selftests to actually use $(KHDR_INCLUDES). In many cases, they hardcode -I../../../../usr/include/ which is bogus when the build root (O=...) differs from the source root. > >  If this test is being >>> built without installing headers by itself, I think the scripts that >>> build individual tests have to makes sure headers are installed first. > > The headers were previously built by "make O=/tmp/kselftest headers", as it should, it's just that the selftest makefile uses a hardcoded path that is relative to the source directory, and it appears that this pattern is repeated all across the selftests. > selftests Makefile used to install headers and there has been a recent change to have mani Makefile (root) to install it. As a result individual test builds (running make in the test directory) requires header install now. I think the hard-coded includes are a problem and we have to fix them for all cases i.e make O=, individual test builds. If you are still up for it, please send patch. thanks, -- Shuah