From: Jeff McGee <jeff.mcgee@xxxxxxxxx> Signed-off-by: Jeff McGee <jeff.mcgee@xxxxxxxxx> --- tests/pm_rps.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/pm_rps.c b/tests/pm_rps.c index 7c739b6..ec07dd2 100644 --- a/tests/pm_rps.c +++ b/tests/pm_rps.c @@ -68,15 +68,20 @@ static int readval(FILE *filp) static int do_writeval(FILE *filp, int val, int lerrno) { - int ret; + int ret, orig; + + orig = readval(filp); rewind(filp); ret = fprintf(filp, "%d", val); + if (lerrno) { /* Expecting specific error */ igt_assert(ret == EOF && errno == lerrno); + igt_assert(readval(filp) == orig); } else { /* Expecting no error */ igt_assert(ret != EOF); + igt_assert(readval(filp) == val); } return ret; -- 1.8.5.2 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx