Skip to contentSkip to conversation

tests/pm_rps: Fix assert for sysfs writes

PATCH New [email protected] 1 participant 1 message Mar 7, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/pm_rps: Fix assert for sysfs writes

From: Ville Syrjälä <[email protected]>

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

---
 tests/pm_rps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/pm_rps.c +1 -1
index 72e47e728e2c..74bbdc852167 100644
@@ -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);
Signature · 6 lines
2.4.10

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx