* [PATCH 1/2] tests/kms_sink_crc_basic: skip properly
@ 2014-05-22 7:35 Daniel Vetter
2014-05-22 7:35 ` [PATCH 2/2] tests/kms_sink_crc_basic: Use igt_assert Daniel Vetter
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Vetter @ 2014-05-22 7:35 UTC (permalink / raw)
To: Intel Graphics Development; +Cc: Daniel Vetter
Not running the test is not failing.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
tests/kms_sink_crc_basic.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tests/kms_sink_crc_basic.c b/tests/kms_sink_crc_basic.c
index 924aadaca610..4be115c2d51c 100644
--- a/tests/kms_sink_crc_basic.c
+++ b/tests/kms_sink_crc_basic.c
@@ -178,8 +178,7 @@ static void run_test(data_t *data)
return;
}
- fprintf(stderr, "no eDP with CRC support found\n");
- igt_fail(1);
+ igt_skip("no eDP with CRC support found\n");
}
igt_simple_main
--
1.8.4.rc3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] tests/kms_sink_crc_basic: Use igt_assert
2014-05-22 7:35 [PATCH 1/2] tests/kms_sink_crc_basic: skip properly Daniel Vetter
@ 2014-05-22 7:35 ` Daniel Vetter
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2014-05-22 7:35 UTC (permalink / raw)
To: Intel Graphics Development; +Cc: Daniel Vetter
Less verbose code makes for clearer test logic.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
tests/kms_sink_crc_basic.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/tests/kms_sink_crc_basic.c b/tests/kms_sink_crc_basic.c
index 4be115c2d51c..087b79db4b36 100644
--- a/tests/kms_sink_crc_basic.c
+++ b/tests/kms_sink_crc_basic.c
@@ -134,28 +134,19 @@ static void basic_sink_crc_check(data_t *data, uint32_t connector_id)
/* get reference crc for black color */
get_crc(ref_crc_black);
- if (strcmp(ref_crc_black, ref_crc_white) == 0) {
- fprintf(stderr, "CRC Black should differ from CRC White\n");
- igt_fail(1);
- }
+ igt_assert(strcmp(ref_crc_black, ref_crc_white) != 0);
/*Go White again*/
connector_set_mode(data, &connector, &connector.config.default_mode, WHITE);
get_crc(crc_check);
- if (strcmp(crc_check, ref_crc_white) != 0) {
- fprintf(stderr, "CRC check for white differ from reference\n");
- igt_fail(1);
- }
+ igt_assert(strcmp(crc_check, ref_crc_white) == 0);
/* Go Black again */
connector_set_mode(data, &connector, &connector.config.default_mode, BLACK);
get_crc(crc_check);
- if (strcmp(crc_check, ref_crc_black) != 0) {
- fprintf(stderr, "CRC check for black differ from reference\n");
- igt_fail(1);
- }
+ igt_assert(strcmp(crc_check, ref_crc_black) == 0);
kmstest_free_connector_config(&connector.config);
}
--
1.8.4.rc3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-22 7:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-22 7:35 [PATCH 1/2] tests/kms_sink_crc_basic: skip properly Daniel Vetter
2014-05-22 7:35 ` [PATCH 2/2] tests/kms_sink_crc_basic: Use igt_assert Daniel Vetter
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.