Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Maíra Canal" <mcanal@igalia.com>
To: Melissa Wen <mwen@igalia.com>,
	Petri Latvala <adrinael@adrinael.net>,
	Kamil Konieczny <kamil.konieczny@linux.intel.com>,
	Bhanuprakash Modem <bhanuprakash.modem@intel.com>,
	Karthik B S <karthik.b.s@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t v2] tests/kms_flip: Check if is Intel device before doing all the setup
Date: Thu,  4 May 2023 11:54:38 -0300	[thread overview]
Message-ID: <20230504145438.257055-1-mcanal@igalia.com> (raw)

The tests bo-too-big and bo-too-big-interruptible should only run on
Intel devices. Instead of checking this condition after doing all the
setup, check this condition in the beginning of the test.

Checking if is an Intel device in the beginning of the test will also
avoid the following error, which occurs in non-Intel devices when
running the test bo-too-big:

(kms_flip:1641) igt_kms-CRITICAL: Test assertion failure function kmstest_set_connector_dpms, file ../lib/igt_kms.c:1960:
(kms_flip:1641) igt_kms-CRITICAL: Failed assertion: found_it
(kms_flip:1641) igt_kms-CRITICAL: Last errno: 9, Bad file descriptor
(kms_flip:1641) igt_kms-CRITICAL: DPMS property not found on 36
Stack trace:
    #0 ../lib/igt_core.c:1963 __igt_fail_assert()
    #1 ../lib/igt_kms.c:1960 kmstest_set_connector_dpms()
    #2 ../lib/igt_core.c:2831 igt_atexit_handler()
    #3 /usr/src/debug/glibc-2.36-9.fc37.x86_64/stdlib/exit.c:114 __run_exit_handlers()
    #4 /usr/src/debug/glibc-2.36-9.fc37.x86_64/stdlib/fmtmsg.c:292 internal_addseverity()
    #5 ../lib/igt_core.c:2297 igt_exit()
    #6 [main+0x32]
    #7 ../sysdeps/nptl/libc_start_call_main.h:74 __libc_start_call_main()
    #8 ../csu/libc-start.c:128 __libc_start_main@@GLIBC_2.34()
    #9 [_start+0x25]

Signed-off-by: Maíra Canal <mcanal@igalia.com>
---

v1 -> v2:

- As kms_flip is using dynamic subtests, no need to trigger the skip. So, just
return if it is not an intel device (Bhanuprakash Modem).
- Add the same check for 2x tests (Bhanuprakash Modem).

---
 tests/kms_flip.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index e4c98b8e..ae94b15e 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -1354,7 +1354,6 @@ restart:
 	/* 256 MB is usually the maximum mappable aperture,
 	 * (make it 4x times that to ensure failure) */
 	if (o->flags & TEST_BO_TOOBIG) {
-		igt_skip_on(!is_intel_device(drm_fd));
 		bo_size = 4*gem_mappable_aperture_size(drm_fd);
 
 		if (is_i915_device(drm_fd))
@@ -1566,6 +1565,9 @@ static void run_test(int duration, int flags)
 	if (is_xe_device(drm_fd) && flags & TEST_FENCE_STRESS)
 		return;
 
+	if (flags & TEST_BO_TOOBIG && !is_intel_device(drm_fd))
+		return;
+
 	igt_require((flags & TEST_HANG) == 0 ||
 		    (is_i915_device(drm_fd) && !is_wedged(drm_fd)));
 	igt_require(!(flags & TEST_FENCE_STRESS) ||
@@ -1639,6 +1641,9 @@ static void run_pair(int duration, int flags)
 	if (is_xe_device(drm_fd) && flags & TEST_FENCE_STRESS)
 		return;
 
+	if (flags & TEST_BO_TOOBIG && !is_intel_device(drm_fd))
+		return;
+
 	igt_require((flags & TEST_HANG) == 0 ||
 		    (is_i915_device(drm_fd) && !is_wedged(drm_fd)));
 	igt_require(!(flags & TEST_FENCE_STRESS) ||
-- 
2.40.1

             reply	other threads:[~2023-05-04 14:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-04 14:54 Maíra Canal [this message]
2023-05-04 17:08 ` [igt-dev] [PATCH i-g-t v2] tests/kms_flip: Check if is Intel device before doing all the setup Modem, Bhanuprakash
2023-05-04 18:20 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_flip: Check if is Intel device before doing all the setup (rev2) Patchwork
2023-05-05  6:02 ` [igt-dev] ✓ Fi.CI.IGT: " 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=20230504145438.257055-1-mcanal@igalia.com \
    --to=mcanal@igalia.com \
    --cc=adrinael@adrinael.net \
    --cc=bhanuprakash.modem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=karthik.b.s@intel.com \
    --cc=mwen@igalia.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