linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Anders Roxell <anders.roxell@linaro.org>,
	shuah@kernel.org, christian@brauner.io, nathan@kernel.org,
	ndesaulniers@google.com, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
	Arnd Bergmann <arnd@arndb.de>,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH 1/2] selftests: cgroup: build error multiple outpt files
Date: Fri, 3 Dec 2021 10:08:44 -0700	[thread overview]
Message-ID: <6c8ef410-479a-a218-81ef-2131cd9a3663@linuxfoundation.org> (raw)
In-Reply-To: <20211201130637.phskqu7rkl5ty2xq@wittgenstein>

On 12/1/21 6:06 AM, Christian Brauner wrote:
> On Tue, Nov 30, 2021 at 09:41:49AM -0700, Shuah Khan wrote:
>> On 11/23/21 7:26 AM, Christian Brauner wrote:
>>> On Fri, Nov 19, 2021 at 05:22:20PM -0700, Shuah Khan wrote:
>>>> On 11/5/21 10:25 AM, Anders Roxell wrote:
>>>>> When building selftests/cgroup: with clang the following error are seen:
>>>>>
>>>>> clang -Wall -pthread    test_memcontrol.c cgroup_util.c ../clone3/clone3_selftests.h  -o /home/anders/.cache/tuxmake/builds/current/kselftest/cgroup/test_memcontrol
>>>>> clang: error: cannot specify -o when generating multiple output files
>>>>> make[3]: *** [../lib.mk:146: /home/anders/.cache/tuxmake/builds/current/kselftest/cgroup/test_memcontrol] Error 1
>>>>>
>>>>> Rework to add the header files to LOCAL_HDRS before including ../lib.mk,
>>>>> since the dependency is evaluated in '$(OUTPUT)/%:%.c $(LOCAL_HDRS)' in
>>>>> file lib.mk.
>>>>>
>>>>> Suggested-by: Arnd Bergmann <arnd@arndb.de>
>>>>> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
>>>>> ---
>>>>>     tools/testing/selftests/cgroup/Makefile | 12 +++++++-----
>>>>>     tools/testing/selftests/lib.mk          |  2 +-
>>>>>     2 files changed, 8 insertions(+), 6 deletions(-)
>>>>>
>>>>> diff --git a/tools/testing/selftests/cgroup/Makefile b/tools/testing/selftests/cgroup/Makefile
>>>>> index 59e222460581..745fe25fa0b9 100644
>>>>> --- a/tools/testing/selftests/cgroup/Makefile
>>>>> +++ b/tools/testing/selftests/cgroup/Makefile
>>>>> @@ -11,10 +11,12 @@ TEST_GEN_PROGS += test_core
>>>>>     TEST_GEN_PROGS += test_freezer
>>>>>     TEST_GEN_PROGS += test_kill
>>>>> +LOCAL_HDRS += $(selfdir)/clone3/clone3_selftests.h $(selfdir)/pidfd/pidfd.h
>>>>> +
>>>>
>>>> This looks odd to me. Why are we introducing dependencies between tests?
>>>> clone3 includes in cgroup? Looks odd to me.
>>>
>>> The cgroup tests need access to clone3() functionality in order to test
>>> CLONE_INTO_CGROUP which is more suited to be placed alongside the cgroup
>>> tests. There are a few other tests that include the clone3 header.
>>>
>>
>> If other tests are also including this header, we could move it up under
>> selftests level. Might have to add include directory.
> 
> No objection from me if that's useful. I won't have time for that in the
> near future. (This might be of interest for one of the LF programs that
> help get new folks interested in kernel development started.)
> 
> Christian
> 

Thanks. I will apply this fix for now.

thanks,
-- Shuah

      reply	other threads:[~2021-12-03 17:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-05 16:25 [PATCH 1/2] selftests: cgroup: build error multiple outpt files Anders Roxell
2021-11-05 16:25 ` [PATCH 2/2] selftests: cgroup: use function 'labs()' over 'abs()' Anders Roxell
2021-11-05 20:15   ` Nick Desaulniers
2021-11-09 15:02   ` Christian Brauner
2021-11-05 20:10 ` [PATCH 1/2] selftests: cgroup: build error multiple outpt files Nick Desaulniers
2021-11-09 15:01 ` Christian Brauner
2021-11-20  0:22 ` Shuah Khan
2021-11-23 14:26   ` Christian Brauner
2021-11-30 16:41     ` Shuah Khan
2021-12-01 13:06       ` Christian Brauner
2021-12-03 17:08         ` Shuah Khan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6c8ef410-479a-a218-81ef-2131cd9a3663@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=anders.roxell@linaro.org \
    --cc=arnd@arndb.de \
    --cc=christian.brauner@ubuntu.com \
    --cc=christian@brauner.io \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).