All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petri Latvala <petri.latvala@intel.com>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: igt-dev@lists.freedesktop.org, chris@chris-wilson.co.uk
Subject: Re: [igt-dev] [PATCH v3 2/8] tests/fbdev: Map framebuffer in igt_fixture
Date: Wed, 11 Nov 2020 12:36:26 +0200	[thread overview]
Message-ID: <20201111103626.GL7444@platvala-desk.ger.corp.intel.com> (raw)
In-Reply-To: <3c3ea376-2575-80c2-e822-256362a9c057@suse.de>

On Wed, Nov 11, 2020 at 11:21:47AM +0100, Thomas Zimmermann wrote:
> Hi,
> 
> thanks for looking at the patches.
> 
> Am 11.11.20 um 10:49 schrieb Petri Latvala:
> > On Tue, Nov 10, 2020 at 08:50:56AM +0100, Thomas Zimmermann wrote:
> >> The mapping of the framebuffer memory will be useful for read/write
> >> tests. Move it into an igt_fixture block.
> >>
> >> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> >> ---
> >>  tests/fbdev.c | 10 ++++------
> >>  1 file changed, 4 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/tests/fbdev.c b/tests/fbdev.c
> >> index 46641fea..fc66210a 100644
> >> --- a/tests/fbdev.c
> >> +++ b/tests/fbdev.c
> >> @@ -63,15 +63,10 @@ static void mode_tests(int fd)
> >>  static void framebuffer_tests(int fd)
> >>  {
> >>  	struct fb_fix_screeninfo fix_info;
> >> +	void *map;
> > 
> > After this patch, map is assigned to in an igt_fixture and read in a
> > subtest. As igt_fixture uses longjmp(), the value of map when read
> > depends on whether this is compiled with or without optimizations.
> 
> One thing I wondered about is that the tests are build with
> -Wno-clobbered. What's the reason? I'd expect that the compiler would
> have warned about this problem.

Too many warnings already accumulated mostly, some of them false
positives.


> 
> > 
> > The options for such variables are:
> > 
> > 1) move it to global scope
> > 2) make it volatile
> > 3) make a struct data_d with the map (and in a later patch, buf as
> >    well) variable and assign its members instead.
> > 
> > I think we prefer 3 generally.
> > 
> 
> I would have used 2. What's the benefit of of using 3?

Actually I take that back, it's an established convention when you
pass data to functions, not so much in code like in your series where
the stuff is entirely contained within the function.

That leaves no benefits so option 2 looks real juicy here indeed.


-- 
Petri Latvala


> 
> Best regards
> Thomas
> 
> -- 
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Maxfeldstr. 5, 90409 Nürnberg, Germany
> (HRB 36809, AG Nürnberg)
> Geschäftsführer: Felix Imendörffer
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2020-11-11 10:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10  7:50 [igt-dev] [PATCH v3 0/8] Test cases for fbdev Thomas Zimmermann
2020-11-10  7:50 ` [igt-dev] [PATCH v3 1/8] tests/fbdev: Move existing tests into separate subgroups Thomas Zimmermann
2020-11-10  7:50 ` [igt-dev] [PATCH v3 2/8] tests/fbdev: Map framebuffer in igt_fixture Thomas Zimmermann
2020-11-11  9:49   ` Petri Latvala
2020-11-11 10:21     ` Thomas Zimmermann
2020-11-11 10:36       ` Petri Latvala [this message]
2020-11-10  7:50 ` [igt-dev] [PATCH v3 3/8] tests/fbdev: Add tests for read operations on framebuffer Thomas Zimmermann
2020-11-11  9:54   ` Petri Latvala
2020-11-10  7:50 ` [igt-dev] [PATCH v3 4/8] tests/fbdev: Add tests for unaligned reads on framebuffer memory Thomas Zimmermann
2020-11-11  9:56   ` Petri Latvala
2020-11-10  7:50 ` [igt-dev] [PATCH v3 5/8] tests/fbdev: Add tests for write operations on framebuffer Thomas Zimmermann
2020-11-11 10:17   ` Petri Latvala
2020-11-10  7:51 ` [igt-dev] [PATCH v3 6/8] tests/fbdev: Add tests for unaligned writes on framebuffer memory Thomas Zimmermann
2020-11-11 10:18   ` Petri Latvala
2020-11-10  7:51 ` [igt-dev] [PATCH v3 7/8] tests/fbdev: Add tests for accessing framebuffer near EOF Thomas Zimmermann
2020-11-11 10:19   ` Petri Latvala
2020-11-10  7:51 ` [igt-dev] [PATCH v3 8/8] tests/fbdev: Add tests for read/writing with NULL-pointer buffers Thomas Zimmermann
2020-11-11 10:20   ` Petri Latvala
2020-11-10 15:45 ` [igt-dev] ✗ Fi.CI.BAT: failure for Test cases for fbdev Patchwork
2020-11-11  9:11   ` Thomas Zimmermann
2020-11-11 10:22     ` Petri Latvala
2020-11-11 10:59       ` [igt-dev] =?unknown-8bit?b?4pyX?= " Chris Wilson

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=20201111103626.GL7444@platvala-desk.ger.corp.intel.com \
    --to=petri.latvala@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=tzimmermann@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.