From: Ashutosh Dixit <ashutosh.dixit@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Subject: [PATCH i-g-t 1/1] tests/intel/xe_oa: Delete disabled-read-error subtest
Date: Tue, 10 Mar 2026 15:50:39 -0700 [thread overview]
Message-ID: <20260310225039.2687668-2-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20260310225039.2687668-1-ashutosh.dixit@intel.com>
We are changing OA functionality in the kernel to allow reads even after an
OA stream is disabled. Delete "disabled-read-error" subtest since it is no
longer relevant. Also delete the read error check in "enable-disable"
subtest.
We will add additional coverage for the new functionality in the
"enable-disable" subtest in the future.
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
tests/intel/xe_oa.c | 77 ---------------------------------------------
1 file changed, 77 deletions(-)
diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
index 927f3f4f20..387f29535e 100644
--- a/tests/intel/xe_oa.c
+++ b/tests/intel/xe_oa.c
@@ -2757,12 +2757,6 @@ test_enable_disable(const struct drm_xe_oa_unit *oau)
stream_fd = __perf_open(drm_fd, ¶m, true /* prevent_pm */);
set_fd_flags(stream_fd, O_CLOEXEC | O_NONBLOCK);
- errno = 0;
- ret = read(stream_fd, buf, sizeof(buf));
- igt_assert_eq(ret, -1);
- get_stream_status(stream_fd);
- igt_assert_eq(errno, EINVAL);
-
do_ioctl(stream_fd, DRM_XE_OBSERVATION_IOCTL_ENABLE, 0);
/*
@@ -2927,75 +2921,6 @@ test_non_sampling_read_error(void)
__perf_close(stream_fd);
}
-/**
- * SUBTEST: disabled-read-error
- * Description: Test that attempts to read from a stream while it is disable
- * will return EINVAL instead of blocking indefinitely
- */
-static void
-test_disabled_read_error(void)
-{
- int oa_exponent = 5; /* 5 micro seconds */
- uint64_t properties[] = {
- DRM_XE_OA_PROPERTY_OA_UNIT_ID, 0,
-
- /* XXX: even without periodic sampling we have to
- * specify at least one sample layout property...
- */
- DRM_XE_OA_PROPERTY_SAMPLE_OA, true,
-
- /* OA unit configuration */
- DRM_XE_OA_PROPERTY_OA_METRIC_SET, default_test_set->perf_oa_metrics_set,
- DRM_XE_OA_PROPERTY_OA_FORMAT, __ff(default_test_set->perf_oa_format),
- DRM_XE_OA_PROPERTY_OA_PERIOD_EXPONENT, oa_exponent,
- DRM_XE_OA_PROPERTY_OA_DISABLED, true,
- };
- struct intel_xe_oa_open_prop param = {
- .num_properties = ARRAY_SIZE(properties) / 2,
- .properties_ptr = to_user_pointer(properties),
- };
- uint32_t oa_report0[64];
- uint32_t oa_report1[64];
- uint32_t buf[128] = { 0 };
- int ret;
-
- stream_fd = __perf_open(drm_fd, ¶m, false);
-
- ret = read(stream_fd, buf, sizeof(buf));
- igt_assert_eq(ret, -1);
- get_stream_status(stream_fd);
- igt_assert_eq(errno, EINVAL);
-
- __perf_close(stream_fd);
-
- properties[ARRAY_SIZE(properties) - 1] = false; /* Set DISABLED to false */
- stream_fd = __perf_open(drm_fd, ¶m, false);
- set_fd_flags(stream_fd, O_CLOEXEC);
-
- read_2_oa_reports(default_test_set->perf_oa_format,
- oa_exponent,
- oa_report0,
- oa_report1,
- false); /* not just timer reports */
-
- do_ioctl(stream_fd, DRM_XE_OBSERVATION_IOCTL_DISABLE, 0);
-
- ret = read(stream_fd, buf, sizeof(buf));
- igt_assert_eq(ret, -1);
- get_stream_status(stream_fd);
- igt_assert_eq(errno, EINVAL);
-
- do_ioctl(stream_fd, DRM_XE_OBSERVATION_IOCTL_ENABLE, 0);
-
- read_2_oa_reports(default_test_set->perf_oa_format,
- oa_exponent,
- oa_report0,
- oa_report1,
- false); /* not just timer reports */
-
- __perf_close(stream_fd);
-}
-
/**
* SUBTEST: mi-rpc
* Description: Test OAR/OAC using MI_REPORT_PERF_COUNT
@@ -5154,8 +5079,6 @@ int igt_main_args("b:t", long_options, help_str, opt_handler, NULL)
test_non_zero_reason(oau, SZ_128K);
}
- igt_subtest("disabled-read-error")
- test_disabled_read_error();
igt_subtest("non-sampling-read-error")
test_non_sampling_read_error();
--
2.48.1
next prev parent reply other threads:[~2026-03-10 22:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-10 22:50 [PATCH i-g-t 0/1] tests/intel/xe_oa: Delete disabled-read-error Ashutosh Dixit
2026-03-10 22:50 ` Ashutosh Dixit [this message]
2026-03-11 5:23 ` [PATCH i-g-t 1/1] tests/intel/xe_oa: Delete disabled-read-error subtest Umesh Nerlige Ramappa
2026-03-11 0:39 ` ✓ i915.CI.BAT: success for tests/intel/xe_oa: Delete disabled-read-error Patchwork
2026-03-11 1:13 ` ✓ Xe.CI.BAT: " Patchwork
2026-03-11 13:16 ` ✗ i915.CI.Full: failure " Patchwork
2026-03-11 18:59 ` ✗ Xe.CI.FULL: " 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=20260310225039.2687668-2-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=umesh.nerlige.ramappa@intel.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