From c8d5c353bf7eca652fd3a6ad6cd151d3127d2de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Mon, 7 Mar 2016 19:38:30 +0200 Subject: [PATCH] tests/pm_rps: Fix assert for sysfs writes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fprintf() returns a negative value on error. Fix the assert to catch that. Signed-off-by: Ville Syrjälä --- 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 72e47e72..74bbdc85 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);