From: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t] tests/perf: skip config tests on older kernels
Date: Fri, 8 Dec 2017 15:39:15 +0000 [thread overview]
Message-ID: <20171208153915.28740-1-lionel.g.landwerlin@intel.com> (raw)
We mostly run tests on the most recent kernels but those are failing
on < 4.14.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
tests/perf.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/tests/perf.c b/tests/perf.c
index 969b8c74..71f64caf 100644
--- a/tests/perf.c
+++ b/tests/perf.c
@@ -3964,6 +3964,17 @@ static void i915_perf_remove_config(int fd, uint64_t config_id)
&config_id), 0);
}
+static bool has_i915_perf_userspace_config(int fd)
+{
+ uint64_t config = 0;
+ int ret = igt_ioctl(fd, DRM_IOCTL_I915_PERF_REMOVE_CONFIG, &config);
+ igt_assert_eq(ret, -1);
+
+ igt_debug("errno=%i\n", errno);
+
+ return errno != EINVAL;
+}
+
static void
test_invalid_create_userspace_config(void)
{
@@ -3973,6 +3984,8 @@ test_invalid_create_userspace_config(void)
uint32_t mux_regs[] = { 0x9888 /* NOA_WRITE */, 0x0 };
uint32_t invalid_mux_regs[] = { 0x12345678 /* invalid register */, 0x0 };
+ igt_skip_on(!has_i915_perf_userspace_config(drm_fd));
+
memset(&config, 0, sizeof(config));
/* invalid uuid */
@@ -4032,6 +4045,8 @@ test_invalid_remove_userspace_config(void)
uint64_t config_id, wrong_config_id = 999999999;
char path[512];
+ igt_skip_on(!has_i915_perf_userspace_config(drm_fd));
+
snprintf(path, sizeof(path), "/sys/class/drm/card%d/metrics/%s/id", card, uuid);
/* Destroy previous configuration if present */
@@ -4090,6 +4105,8 @@ test_create_destroy_userspace_config(void)
};
char path[512];
+ igt_skip_on(!has_i915_perf_userspace_config(drm_fd));
+
snprintf(path, sizeof(path), "/sys/class/drm/card%d/metrics/%s/id", card, uuid);
/* Destroy previous configuration if present */
@@ -4170,6 +4187,8 @@ test_whitelisted_registers_userspace_config(void)
0xe65c
};
+ igt_skip_on(!has_i915_perf_userspace_config(drm_fd));
+
snprintf(path, sizeof(path), "/sys/class/drm/card%d/metrics/%s/id", card, uuid);
if (try_read_u64_file(path, &config_id))
--
2.15.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2017-12-08 15:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-08 15:39 Lionel Landwerlin [this message]
2017-12-08 15:44 ` [PATCH i-g-t] tests/perf: skip config tests on older kernels Chris Wilson
2017-12-08 16:15 ` ✓ Fi.CI.BAT: success for " 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=20171208153915.28740-1-lionel.g.landwerlin@intel.com \
--to=lionel.g.landwerlin@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 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.