intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Robert Bragg <robert@sixbynine.org>
To: Matthew Auld <matthew.william.auld@gmail.com>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH igt v3 01/11] igt/perf: add i915 perf stream tests for Haswell
Date: Mon, 14 Nov 2016 15:52:06 +0000	[thread overview]
Message-ID: <CAMou1-0MM08uGRoahi0nMNcv0tWVpRtDdtJJ1FTExy5b5UCcgw@mail.gmail.com> (raw)
In-Reply-To: <20161110230302.pulguzdnmzq3ao56@mwahaha>


[-- Attachment #1.1: Type: text/plain, Size: 2426 bytes --]

On Thu, Nov 10, 2016 at 11:03 PM, Matthew Auld <matthew.william.auld@gmail.
com> wrote:

> On 11/09, Robert Bragg wrote:
> > +
> > +igt_main
> > +{
> > +        igt_skip_on_simulation();
> > +
> > +        igt_fixture {
> > +                struct stat sb;
> > +                int ret;
> > +
> > +                drm_fd = drm_open_driver_render(DRIVER_INTEL);
> > +                devid = intel_get_drm_devid(drm_fd);
> > +                device = drm_get_card();
> > +
> > +                igt_require(IS_HASWELL(devid));
> > +                igt_require(lookup_hsw_render_basic_id());
> > +
> > +                ret = stat("/proc/sys/dev/i915/perf_stream_paranoid",
> &sb);
> > +                igt_require(ret == 0);
> > +                ret = stat("/proc/sys/dev/i915/oa_max_sample_rate",
> &sb);
> > +                igt_require(ret == 0);
> The absence of the above files would indicate a failure in the kernel,
> so would it not be more apt to assert, rather than skip ?
>

The test could be running against an older kernel which won't have these
files and we should skip all the tests in that case.

E.g. Chris asked me to maintain compatibility within the gem_exec_parse
test for older versions of the command parser so I suppose i-g-t tries to
maintain backwards compatibility.

We could potentially require one and assert the other.


> > +
> > +                gt_frequency_range_save();
> > +
> > +                write_u64_file("/proc/sys/dev/i915/perf_stream_paranoid",
> 1);
> Don't we also want to ensure that the oa_max_sample_rate is also in a
> "good" starting state before we begin, especially since we ensure that
> we leave in its default state when cleaning up ?
>

Explicitly setting the max rate interferes with being able to assert what
the default is, but that's already a problem with the cleanup fixture
explicitly setting the rate.

What I'm doing now is initializing oa_max_sample_rate before tests, as
suggested here, and I've also added a test_sysctl_defaults() test that's
run very early, just after the i915-ref-count test.



>
> Anyway, I think it all looks pretty reasonable to me and it looks like
> we have a good amount of coverage, so you can have my r-b with Chris'
> comment addressed.
>

Thanks, I've moved the ref counting test in front of the first fixture as
suggested by chris (with just the requirements check that the i915-perf
interface exists in another fixture before).

[-- Attachment #1.2: Type: text/html, Size: 3647 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-11-14 15:52 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-09 16:15 [PATCH igt v3 00/11] corresponding changes for i915-perf interface Robert Bragg
2016-11-09 16:15 ` [PATCH igt v3 01/11] igt/perf: add i915 perf stream tests for Haswell Robert Bragg
2016-11-09 16:33   ` Chris Wilson
2016-11-10 23:03   ` Matthew Auld
2016-11-14 15:52     ` Robert Bragg [this message]
2016-11-09 16:15 ` [PATCH igt v3 02/11] igt/gem_exec_parse: some minor cleanups Robert Bragg
2016-11-11 21:49   ` Matthew Auld
2016-11-09 16:15 ` [PATCH igt v3 03/11] igt/gem_exec_parse: move hsw_load_register_reg down Robert Bragg
2016-11-11 21:51   ` Matthew Auld
2016-11-09 16:15 ` [PATCH igt v3 04/11] igt/gem_exec_parse: update hsw_load_register_reg Robert Bragg
2016-11-11 22:01   ` Matthew Auld
2016-11-09 16:15 ` [PATCH igt v3 05/11] igt/gem_exec_parse: req. v < 9 for oacontrol tracking test Robert Bragg
2016-11-11 22:07   ` Matthew Auld
2016-11-09 16:15 ` [PATCH igt v3 06/11] igt/gem_exec_parse: make basic-rejected version agnostic Robert Bragg
2016-11-14 18:57   ` Matthew Auld
2016-11-09 16:15 ` [PATCH igt v3 07/11] igt/gem_exec_parse: update bitmasks test for v >=8 Robert Bragg
2016-11-11 22:08   ` Matthew Auld
2016-11-09 16:15 ` [PATCH igt v3 08/11] igt/gem_exec_parse: update cmd-crossing-page for >= v8 Robert Bragg
2016-11-11 22:10   ` Matthew Auld
2016-11-09 16:16 ` [PATCH igt v3 09/11] igt/gem_exec_parse: update hsw_load_register_reg for v >= 8 Robert Bragg
2016-11-11 22:14   ` Matthew Auld
2016-11-09 16:16 ` [PATCH igt v3 10/11] igt/gem_exec_parse: update registers test " Robert Bragg
2016-11-11 22:28   ` Matthew Auld
2016-11-09 16:16 ` [PATCH igt v3 11/11] igt/gem_exec_parse: check oacontrol lri bad for >= v9 Robert Bragg
2016-11-11 22:36   ` Matthew Auld

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=CAMou1-0MM08uGRoahi0nMNcv0tWVpRtDdtJJ1FTExy5b5UCcgw@mail.gmail.com \
    --to=robert@sixbynine.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.william.auld@gmail.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;
as well as URLs for NNTP newsgroup(s).