From: Daniel Vetter <daniel@ffwll.ch>
To: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: IGT development <igt-dev@lists.freedesktop.org>,
Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t 1/3] lib/tests: Use ARRAY_SIZE
Date: Thu, 21 Feb 2019 00:38:56 +0100 [thread overview]
Message-ID: <20190220233856.GF2665@phenom.ffwll.local> (raw)
In-Reply-To: <20190220150011.fis55iv4qifpwo26@ahiler-desk1.fi.intel.com>
On Wed, Feb 20, 2019 at 05:00:11PM +0200, Arkadiusz Hiler wrote:
> On Wed, Feb 20, 2019 at 03:24:47PM +0100, Daniel Vetter wrote:
> > Except in igt_simulation.c where we use tricks and intentionally only
> > want part of the array in some cases.
> >
> > Suggested-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> > Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > ---
> > lib/tests/igt_assert.c | 3 ++-
> > lib/tests/igt_exit_handler.c | 3 ++-
> > lib/tests/igt_fork.c | 3 ++-
> > lib/tests/igt_invalid_subtest_name.c | 5 +++--
> > lib/tests/igt_list_only.c | 2 +-
> > lib/tests/igt_no_exit.c | 4 ++--
> > lib/tests/igt_no_subtest.c | 2 +-
> > lib/tests/igt_segfault.c | 4 +---
> > 8 files changed, 14 insertions(+), 12 deletions(-)
> >
> > diff --git a/lib/tests/igt_assert.c b/lib/tests/igt_assert.c
> > index 632e15978978..1caf5d885ddb 100644
> > --- a/lib/tests/igt_assert.c
> > +++ b/lib/tests/igt_assert.c
> > @@ -34,6 +34,7 @@
> > #include <sys/wait.h>
> >
> > #include "igt_core.h"
> > +#include "drmtest.h"
>
> It may be worth moving that macro somewhere else.
> ctags show me about 10 spearate definitions across the codebase.
>
> But that's another cleanup.
Yeah I looked at git grep ARRAY_SIZE too, and the macro feels a bit
misplayed. But then got lazy :-)
>
> > diff --git a/lib/tests/igt_segfault.c b/lib/tests/igt_segfault.c
> > index 2a24531aaa8c..0d872f67850a 100644
> > --- a/lib/tests/igt_segfault.c
> > +++ b/lib/tests/igt_segfault.c
> > @@ -65,15 +65,13 @@ static int do_fork(void)
> > case -1:
> > internal_assert(0);
> > case 0:
> > + argc = ARRAY_SIZE(argv_run);
> > if (simple) {
> > - argc = 1;
> > igt_simple_init(argc, argv_run);
> > crashme();
> >
> > igt_exit();
> > } else {
> > -
> > - argc = 1;
> > igt_subtest_init(argc, argv_run);
> >
>
> igt_simple_init(ARRAY_SIZE(argv_run), argv_run);
> may indeed be a bit much.
Because macro magic doesn't actually work, or something like that.
igt_subtest_init has a &argc which goes boom :-)
> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Thanks for your review, applied.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-02-20 23:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-20 14:24 [igt-dev] [PATCH i-g-t 1/3] lib/tests: Use ARRAY_SIZE Daniel Vetter
2019-02-20 14:24 ` [igt-dev] [PATCH i-g-t 2/3] tests/kms_mmap_write_crc: Fix igt_fixture handling Daniel Vetter
2019-02-20 14:31 ` Chris Wilson
2019-02-20 23:44 ` Daniel Vetter
2019-02-20 14:24 ` [igt-dev] [PATCH i-g-t 3/3] lib: disallow fixtures/subtest groups in simple tests Daniel Vetter
2019-02-20 14:51 ` Arkadiusz Hiler
2019-02-20 23:41 ` Daniel Vetter
2019-02-20 15:00 ` [igt-dev] [PATCH i-g-t 1/3] lib/tests: Use ARRAY_SIZE Arkadiusz Hiler
2019-02-20 23:38 ` Daniel Vetter [this message]
2019-02-20 15:14 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] " Patchwork
2019-02-20 17:46 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
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=20190220233856.GF2665@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=arkadiusz.hiler@intel.com \
--cc=daniel.vetter@intel.com \
--cc=igt-dev@lists.freedesktop.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