From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>,
Jin Yao <yao.jin@linux.intel.com>,
Song Liu <songliubraving@fb.com>, Yonghong Song <yhs@fb.com>,
Alexei Starovoitov <ast@fb.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Daniel Borkmann <daniel@iogearbox.net>,
Jakub Kicinski <jakub.kicinski@netronome.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
bpf@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tools build: Add test-reallocarray.c to test-all.c to fix the build Was: Re: reallocarray failure on centos:7 superseded by raw data API
Date: Thu, 14 Feb 2019 12:58:36 -0300 [thread overview]
Message-ID: <20190214155836.GB23266@kernel.org> (raw)
In-Reply-To: <20190214155042.GB16707@krava>
Em Thu, Feb 14, 2019 at 04:50:42PM +0100, Jiri Olsa escreveu:
> On Thu, Feb 14, 2019 at 12:30:18PM -0300, Arnaldo Carvalho de Melo wrote:
>
> SNIP
>
> > diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c
> > index 74329957553a..e903b86b742f 100644
> > --- a/tools/build/feature/test-all.c
> > +++ b/tools/build/feature/test-all.c
> > @@ -174,6 +174,10 @@
> > # include "test-libaio.c"
> > #undef main
> >
> > +#define main main_test_reallocarray
> > +# include "test-reallocarray.c"
> > +#undef main
> > +
> > int main(int argc, char *argv[])
> > {
> > main_test_libpython();
> > @@ -214,6 +218,7 @@ int main(int argc, char *argv[])
> > main_test_sdt();
> > main_test_setns();
> > main_test_libaio();
> > + main_test_reallocarray();
> >
> > return 0;
> > }
> > diff --git a/tools/build/feature/test-reallocarray.c b/tools/build/feature/test-reallocarray.c
> > index 8170de35150d..8f6743e31da7 100644
> > --- a/tools/build/feature/test-reallocarray.c
> > +++ b/tools/build/feature/test-reallocarray.c
> > @@ -6,3 +6,5 @@ int main(void)
> > {
> > return !!reallocarray(NULL, 1, 1);
> > }
> > +
> > +#undef _GNU_SOURCE
>
> nice, also test-sched_getcpu.c does not do #undef _GNU_SOURCE
Thanks, I'll fix that, since those tests are included one after the
other in test-all.c, they shouldn't lead those defines in place,
otherwise they will fail, as I fixed in other cases, but somehow missed
this one.
[acme@quaco perf]$ grep _GNU_SOURCE tools/build/feature/test-*.c
tools/build/feature/test-get_current_dir_name.c:#define _GNU_SOURCE
tools/build/feature/test-get_current_dir_name.c:#undef _GNU_SOURCE
tools/build/feature/test-libpython.c:#undef _GNU_SOURCE
tools/build/feature/test-reallocarray.c:#define _GNU_SOURCE
tools/build/feature/test-reallocarray.c:#undef _GNU_SOURCE
tools/build/feature/test-sched_getcpu.c:#ifndef _GNU_SOURCE
tools/build/feature/test-sched_getcpu.c:#define _GNU_SOURCE
tools/build/feature/test-setns.c:#define _GNU_SOURCE
tools/build/feature/test-setns.c:#undef _GNU_SOURCE
[acme@quaco perf]$
Its just because all the preceding ones undef it and the ones following
it doesn't define it:
$ cat tools/build/feature/test-all.c
<SNIP>
#define main main_test_libaio
# include "test-libaio.c"
#undef main
#define main main_test_reallocarray
# include "test-reallocarray.c"
#undef main
int main(int argc, char *argv[])
{
main_test_libpython();
main_test_libpython_version();
<SNIP>
main_test_bpf();
main_test_libcrypto();
main_test_sched_getcpu();
main_test_sdt();
main_test_setns();
main_test_libaio();
main_test_reallocarray();
return 0;
}
<SNIP>
- Arnaldo
next prev parent reply other threads:[~2019-02-14 15:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190212205557.GM3269@kernel.org>
[not found] ` <20190212205750.GN3269@kernel.org>
[not found] ` <D9304DB8-0E43-49D0-9F61-871CB14473F8@fb.com>
[not found] ` <CAEf4BzaCMq5C94bp31Ew=PqcasfuUm-dEvSi6p9ErduRHRgGTA@mail.gmail.com>
[not found] ` <CA+JHD93gPW4oPkumPK36UkQv_2AOxywAzTjDXz1VgJ7YHa5qBg@mail.gmail.com>
[not found] ` <CAEf4BzYGzgoZ2c_zuvyjM1d734dMKLm_9Ki8XfFvUGMCMxU=Lw@mail.gmail.com>
[not found] ` <20190213133855.GB1904@kernel.org>
[not found] ` <20190213142136.GC1904@kernel.org>
[not found] ` <CAEf4BzaNBSxZCVC2myZRkn4N8WLJ6cCtV1M6Qy-3e7ZHJHZp6A@mail.gmail.com>
2019-02-14 15:30 ` [PATCH] tools build: Add test-reallocarray.c to test-all.c to fix the build Was: Re: reallocarray failure on centos:7 superseded by raw data API Arnaldo Carvalho de Melo
2019-02-14 15:50 ` Jiri Olsa
2019-02-14 15:58 ` Arnaldo Carvalho de Melo [this message]
2019-02-14 15:56 ` Jiri Olsa
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=20190214155836.GB23266@kernel.org \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=andrii.nakryiko@gmail.com \
--cc=ast@fb.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=jakub.kicinski@netronome.com \
--cc=jolsa@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=songliubraving@fb.com \
--cc=yao.jin@linux.intel.com \
--cc=yhs@fb.com \
/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