[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211123142600.r5d52iwhbqhujiux@wittgenstein>
Date: Tue, 23 Nov 2021 15:26:00 +0100
From: Christian Brauner <christian.brauner@...ntu.com>
To: Shuah Khan <skhan@...uxfoundation.org>
Cc: Anders Roxell <anders.roxell@...aro.org>, shuah@...nel.org,
christian@...uner.io, nathan@...nel.org, ndesaulniers@...gle.com,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev, Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH 1/2] selftests: cgroup: build error multiple outpt files
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@...db.de>
> > Signed-off-by: Anders Roxell <anders.roxell@...aro.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.
Powered by blists - more mailing lists