Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org, swati2.sharma@intel.com
Subject: [i-g-t 1/2] tests/kms_feature_discovery: Add basic sanity test
Date: Thu,  4 Jan 2024 11:21:05 +0530	[thread overview]
Message-ID: <20240104055106.1949767-2-bhanuprakash.modem@intel.com> (raw)
In-Reply-To: <20240104055106.1949767-1-bhanuprakash.modem@intel.com>

Add basic sanity test to make sure DRM_IOCTL_MODE_GETRESOURCES is
working fine.

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_feature_discovery.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tests/kms_feature_discovery.c b/tests/kms_feature_discovery.c
index 5bca9ad76..eb762928f 100644
--- a/tests/kms_feature_discovery.c
+++ b/tests/kms_feature_discovery.c
@@ -44,6 +44,9 @@
 #include "igt_types.h"
 
 /**
+ * SUBTEST: basic-rte
+ * Description: Basic sanity test to make sure DRM_IOCTL_MODE_GETRESOURCES is working fine.
+ *
  * SUBTEST: display
  * Description: Make sure that we have display support.
  *
@@ -87,6 +90,17 @@ igt_main {
 		debugfs_fd = igt_debugfs_dir(fd);
 	}
 
+	igt_describe("Basic sanity test to make sure DRM_IOCTL_MODE_GETRESOURCES is working fine.");
+	igt_subtest("basic-rte") {
+		drmModeResPtr resources = drmModeGetResources(fd);
+
+		/* Operation not supported on non-display platforms. */
+		if (!resources)
+			igt_assert_eq(errno, EOPNOTSUPP);
+
+		drmModeFreeResources(resources);
+	}
+
 	igt_subtest_group {
 		igt_fixture {
 			igt_display_require(&display, fd);
-- 
2.40.0

  reply	other threads:[~2024-01-04  5:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-04  5:51 [i-g-t 0/2] tests/kms_feature_discovery: Add basic sanity test Bhanuprakash Modem
2024-01-04  5:51 ` Bhanuprakash Modem [this message]
2024-01-04 16:08   ` [i-g-t 1/2] " Sharma, Swati2
2024-01-04  5:51 ` [i-g-t 2/2] intel-ci: Add feature discovery test to BAT Bhanuprakash Modem
2024-01-04  6:59 ` ✓ Fi.CI.BAT: success for tests/kms_feature_discovery: Add basic sanity test (rev2) Patchwork
2024-01-04  7:05 ` ✓ CI.xeBAT: " Patchwork
2024-01-04  8:21 ` ✗ Fi.CI.IGT: failure " 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=20240104055106.1949767-2-bhanuprakash.modem@intel.com \
    --to=bhanuprakash.modem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=swati2.sharma@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