From: Antonio Argenziano <antonio.argenziano@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [i-g-t 2/2] tests/gem_reset_stats: Add client ban test
Date: Thu, 12 Oct 2017 15:21:29 -0700 [thread overview]
Message-ID: <ccfc6a22-d8f7-2092-8377-d7ffae5eb789@intel.com> (raw)
In-Reply-To: <20171012221037.9081-2-antonio.argenziano@intel.com>
On 12/10/17 15:10, Antonio Argenziano wrote:
> When a client gets a fixed amount of its contexts banned, will be
> blocked from creating any new contexts itself. This patch adds a test
> for this feature.
>
> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
> Cc: Michel Thierry <michel.thierry@intel.com>
> ---
> tests/gem_ctx_create.c | 10 +++++-----
> tests/gem_reset_stats.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 52 insertions(+), 5 deletions(-)
>
> diff --git a/tests/gem_ctx_create.c b/tests/gem_ctx_create.c
> index ae0825a1..abe9a32e 100644
> --- a/tests/gem_ctx_create.c
> +++ b/tests/gem_ctx_create.c
> @@ -45,7 +45,7 @@ static unsigned all_nengine;
> static unsigned ppgtt_engines[16];
> static unsigned ppgtt_nengine;
>
> -static int __gem_context_create(int fd, struct drm_i915_gem_context_create *arg)
> +static int __gem_context_create_local(int fd, struct drm_i915_gem_context_create *arg)
> {
> int ret = 0;
> if (drmIoctl(fd, DRM_IOCTL_I915_GEM_CONTEXT_CREATE, arg))
> @@ -255,7 +255,7 @@ static void maximum(int fd, int ncpus, unsigned mode)
>
> err = -ENOMEM;
> if (avail_mem > (count + 1) * ctx_size)
> - err = __gem_context_create(fd, &create);
> + err = __gem_context_create_local(fd, &create);
> if (err) {
> igt_info("Created %lu contexts, before failing with '%s' [%d]\n",
> count, strerror(-err), -err);
> @@ -322,7 +322,7 @@ igt_main
> igt_require_gem(fd);
>
> memset(&create, 0, sizeof(create));
> - igt_require(__gem_context_create(fd, &create) == 0);
> + igt_require(__gem_context_create_local(fd, &create) == 0);
> gem_context_destroy(fd, create.ctx_id);
>
> for_each_engine(fd, engine) {
> @@ -347,7 +347,7 @@ igt_main
> memset(&create, 0, sizeof(create));
> create.ctx_id = rand();
> create.pad = 0;
> - igt_assert_eq(__gem_context_create(fd, &create), 0);
> + igt_assert_eq(__gem_context_create_local(fd, &create), 0);
> igt_assert(create.ctx_id != 0);
> gem_context_destroy(fd, create.ctx_id);
> }
> @@ -356,7 +356,7 @@ igt_main
> memset(&create, 0, sizeof(create));
> create.ctx_id = rand();
> create.pad = 1;
> - igt_assert_eq(__gem_context_create(fd, &create), -EINVAL);
> + igt_assert_eq(__gem_context_create_local(fd, &create), -EINVAL);
> }
>
> igt_subtest("maximum-mem")
Ops, this was supposed to be in patch 1/2.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-10-12 22:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-12 22:10 [PATCH i-g-t 1/2] lib: Move __gem_context_create to common ioctl wrapper library Antonio Argenziano
2017-10-12 22:10 ` [i-g-t 2/2] tests/gem_reset_stats: Add client ban test Antonio Argenziano
2017-10-12 22:21 ` Antonio Argenziano [this message]
2017-10-12 22:32 ` Chris Wilson
2017-10-12 22:15 ` [PATCH i-g-t 1/2] lib: Move __gem_context_create to common ioctl wrapper library Chris Wilson
2017-10-12 22:23 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] " 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=ccfc6a22-d8f7-2092-8377-d7ffae5eb789@intel.com \
--to=antonio.argenziano@intel.com \
--cc=intel-gfx@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