tests/pc8: Readd verbose error message
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 14 Oct 2013 17:10:56 +0000 (19:10 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 14 Oct 2013 17:10:56 +0000 (19:10 +0200)
I deemed them a bit redundant (assuming that developers are the only
ones that look at them anyway). But Paulo requested that I readd them
for the education of QA.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
tests/pc8.c

index 79c64fc..d1d89a7 100644 (file)
@@ -586,25 +586,31 @@ static void setup_environment(void)
        init_mode_set_data(&ms_data);
 
        /* Only Haswell supports the PC8 feature. */
-       igt_require(IS_HASWELL(ms_data.devid));
+       igt_require_f(IS_HASWELL(ms_data.devid),
+                     "PC8+ feature only supported on Haswell.\n");
 
        /* Make sure our Kernel supports MSR and the module is loaded. */
        msr_fd = open("/dev/cpu/0/msr", O_RDONLY);
-       igt_assert(msr_fd >= 0);
+       igt_assert_f(msr_fd >= 0,
+                    "Can't open /dev/cpu/0/msr.\n");
 
        /* Non-ULT machines don't support PC8+. */
-       igt_require(supports_pc8_plus_residencies());
+       igt_require_f(supports_pc8_plus_residencies(),
+                     "Machine doesn't support PC8+ residencies.\n");
 }
 
 static void basic_subtest(void)
 {
        /* Make sure PC8+ residencies move! */
        disable_all_screens(&ms_data);
-       igt_assert(pc8_plus_enabled());
+       igt_assert_f(pc8_plus_enabled(),
+                    "Machine is not reaching PC8+ states, please check its "
+                    "configuration.\n");
 
        /* Make sure PC8+ residencies stop! */
        enable_one_screen(&ms_data);
-       igt_assert(pc8_plus_disabled());
+       igt_assert_f(pc8_plus_disabled(),
+                    "PC8+ residency didn't stop with screen enabled.\n");
 }
 
 static void teardown_environment(void)