From: jeff.mcgee@intel.com
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 1/3] pm_rps: Add read back checking on sysfs writes
Date: Fri, 17 Jan 2014 16:56:04 -0600 [thread overview]
Message-ID: <1389999366-19715-2-git-send-email-jeff.mcgee@intel.com> (raw)
In-Reply-To: <1389999366-19715-1-git-send-email-jeff.mcgee@intel.com>
From: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
---
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
next prev parent reply other threads:[~2014-01-17 22:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-17 22:56 More fixes for igt pm_rps jeff.mcgee
2014-01-17 22:56 ` jeff.mcgee [this message]
2014-01-17 22:56 ` [PATCH 2/3] pm_rps: Convert to subtest structure jeff.mcgee
2014-01-19 14:29 ` Daniel Vetter
2014-01-17 22:56 ` [PATCH 3/3] pm_rps: Fix verbose option and streamline its use jeff.mcgee
2014-01-18 14:23 ` Daniel Vetter
2014-01-19 21:33 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1389999366-19715-2-git-send-email-jeff.mcgee@intel.com \
--to=jeff.mcgee@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox