From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 1/1] tests/gem_seqno_wrap: verify debugfs write with readback
Date: Thu, 11 Apr 2013 16:11:28 +0300 [thread overview]
Message-ID: <1365685888-6089-1-git-send-email-mika.kuoppala@intel.com> (raw)
Make sure that debugfs entry works as expected by reading
back the sequence number that was written.
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
---
tests/gem_seqno_wrap.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/tests/gem_seqno_wrap.c b/tests/gem_seqno_wrap.c
index 43e3851..776dedc 100644
--- a/tests/gem_seqno_wrap.c
+++ b/tests/gem_seqno_wrap.c
@@ -438,6 +438,7 @@ static int write_seqno(uint32_t seqno)
int fh;
char buf[32];
int r;
+ uint32_t rb;
if (options.dontwrap)
return 0;
@@ -457,6 +458,15 @@ static int write_seqno(uint32_t seqno)
if (options.verbose)
printf("next_seqno set to: 0x%x\n", seqno);
+ r = __read_seqno(&rb);
+ if (r < 0)
+ return r;
+
+ if (rb != seqno) {
+ printf("seqno readback differs rb:0x%x vs w:0x%x\n", rb, seqno);
+ return -1;
+ }
+
return 0;
}
--
1.7.9.5
next reply other threads:[~2013-04-11 13:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-11 13:11 Mika Kuoppala [this message]
2013-04-11 15:27 ` [PATCH 1/1] tests/gem_seqno_wrap: verify debugfs write with readback 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=1365685888-6089-1-git-send-email-mika.kuoppala@intel.com \
--to=mika.kuoppala@linux.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