[Intel-gfx] [PATCH i-g-t] tests/pm_rps: Fix assert for sysfs writes

ville.syrjala at linux.intel.com ville.syrjala at linux.intel.com
Mon Mar 7 19:02:24 UTC 2016


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

fprintf() returns a negative value on error. Fix the assert
to catch that.

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 tests/pm_rps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/pm_rps.c b/tests/pm_rps.c
index 72e47e728e2c..74bbdc852167 100644
--- a/tests/pm_rps.c
+++ b/tests/pm_rps.c
@@ -130,7 +130,7 @@ static int do_writeval(FILE *filp, int val, int lerrno, bool readback_check)
 			igt_assert_eq(readval(filp), orig);
 	} else {
 		/* Expecting no error */
-		igt_assert_neq(ret, 0);
+		igt_assert_lt(0, ret);
 		wait_freq_settle();
 		if (readback_check)
 			igt_assert_eq(readval(filp), val);
-- 
2.4.10



More information about the Intel-gfx mailing list