From 2fd0eb53aa33662f44d6373c4562ba7cd4523400 Mon Sep 17 00:00:00 2001 From: Paulo Zanoni Date: Fri, 8 Nov 2013 17:05:00 -0200 Subject: [PATCH] tests/pm_pc8: return void on test_i2c And do the assertion in the code line that actually verifies the condition we need. Makes it easier to debug failed tests. Signed-off-by: Paulo Zanoni --- tests/pm_pc8.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/pm_pc8.c b/tests/pm_pc8.c index 4ecfdfdf..5a0b1fb0 100644 --- a/tests/pm_pc8.c +++ b/tests/pm_pc8.c @@ -600,12 +600,12 @@ static int count_i2c_valid_edids(void) return ret; } -static bool test_i2c(struct mode_set_data *data) +static void test_i2c(struct mode_set_data *data) { int i2c_edids = count_i2c_valid_edids(); int drm_edids = count_drm_valid_edids(data); - return i2c_edids == drm_edids; + igt_assert(i2c_edids == drm_edids); } static void setup_environment(void) @@ -733,7 +733,7 @@ static void i2c_subtest(void) disable_all_screens(&ms_data); igt_assert(pc8_plus_enabled()); - igt_assert(test_i2c(&ms_data)); + test_i2c(&ms_data); igt_assert(pc8_plus_enabled()); enable_one_screen(&ms_data);