public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 1/8] kms_force_connector: use comparison macros to make debug output clearer
@ 2015-11-02 11:48 Thomas Wood
  2015-11-02 11:48 ` [PATCH i-g-t 2/8] lib: highlight subtest results on terminals Thomas Wood
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: Thomas Wood @ 2015-11-02 11:48 UTC (permalink / raw)
  To: intel-gfx

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
---
 tests/kms_force_connector.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/tests/kms_force_connector.c b/tests/kms_force_connector.c
index 7485ca8..4ba1e0b 100644
--- a/tests/kms_force_connector.c
+++ b/tests/kms_force_connector.c
@@ -27,8 +27,9 @@
 IGT_TEST_DESCRIPTION("Check the debugfs force connector/edid features work"
 		     " correctly.");
 
-#define CHECK_MODE(m, h, w, r) igt_assert(m.hdisplay == h && m.vdisplay == w \
-					  && m.vrefresh == r)
+#define CHECK_MODE(m, h, w, r) \
+	igt_assert_eq(m.hdisplay, h); igt_assert_eq(m.vdisplay, w); \
+	igt_assert_eq(m.vrefresh, r);
 
 igt_main
 {
@@ -63,8 +64,8 @@ igt_main
 		/* force the connector on and check the reported values */
 		kmstest_force_connector(drm_fd, vga_connector, FORCE_CONNECTOR_ON);
 		temp = drmModeGetConnector(drm_fd, vga_connector->connector_id);
-		igt_assert(temp->connection == DRM_MODE_CONNECTED);
-		igt_assert(temp->count_modes > 0);
+		igt_assert_eq(temp->connection, DRM_MODE_CONNECTED);
+		igt_assert_lt(0, temp->count_modes);
 		drmModeFreeConnector(temp);
 
 		/* attempt to use the display */
@@ -77,15 +78,15 @@ igt_main
 		kmstest_force_connector(drm_fd, vga_connector,
 					FORCE_CONNECTOR_OFF);
 		temp = drmModeGetConnector(drm_fd, vga_connector->connector_id);
-		igt_assert(temp->connection == DRM_MODE_DISCONNECTED);
-		igt_assert(temp->count_modes == 0);
+		igt_assert_eq(temp->connection, DRM_MODE_DISCONNECTED);
+		igt_assert_lt(0, temp->count_modes);
 		drmModeFreeConnector(temp);
 
 		/* check that the previous state is restored */
 		kmstest_force_connector(drm_fd, vga_connector,
 					FORCE_CONNECTOR_UNSPECIFIED);
 		temp = drmModeGetConnector(drm_fd, vga_connector->connector_id);
-		igt_assert(temp->connection == vga_connector->connection);
+		igt_assert_eq(temp->connection, vga_connector->connection);
 		drmModeFreeConnector(temp);
 	}
 
@@ -115,7 +116,7 @@ igt_main
 		temp = drmModeGetConnector(drm_fd, vga_connector->connector_id);
 		/* the connector should now have the same number of modes that
 		 * it started with */
-		igt_assert(temp->count_modes == start_n_modes);
+		igt_assert_eq(temp->count_modes, start_n_modes);
 		drmModeFreeConnector(temp);
 
 		kmstest_force_connector(drm_fd, vga_connector,
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2015-11-11 10:09 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-02 11:48 [PATCH i-g-t 1/8] kms_force_connector: use comparison macros to make debug output clearer Thomas Wood
2015-11-02 11:48 ` [PATCH i-g-t 2/8] lib: highlight subtest results on terminals Thomas Wood
2015-11-04 19:58   ` Paulo Zanoni
2015-11-05 15:32     ` Morton, Derek J
2015-11-09 17:17       ` [PATCH i-g-t] lib: add a environment variable to control output Thomas Wood
2015-11-09 20:58         ` Chris Wilson
2015-11-10 10:43           ` Thomas Wood
2015-11-11 10:09             ` Morton, Derek J
2015-11-02 11:48 ` [PATCH i-g-t 3/8] Add missing noreturn attribute to various functions Thomas Wood
2015-11-02 11:48 ` [PATCH i-g-t 4/8] tests: remove unnecessary igt_exit calls Thomas Wood
2015-11-02 11:48 ` [PATCH i-g-t 5/8] tests: remove duplicate struct member initializers Thomas Wood
2015-11-02 11:48 ` [PATCH i-g-t 6/8] Fix comparison of unsigned integers Thomas Wood
2015-11-02 11:48 ` [PATCH i-g-t 7/8] lib: add PIPE_ANY to the pipe enum Thomas Wood
2015-11-02 11:48 ` [PATCH i-g-t 8/8] tests/kms_fbc_crc: ensure context is initialized correctly Thomas Wood
2015-11-04 19:36   ` Zanoni, Paulo R
2015-11-04 20:00     ` Ville Syrjälä
2015-11-09 14:50     ` Thomas Wood
2015-11-02 17:13 ` [PATCH i-g-t 1/8] kms_force_connector: use comparison macros to make debug output clearer Thomas Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox