summaryrefslogtreecommitdiff
path: root/tests/gem_seqno_wrap.c
diff options
context:
space:
mode:
authorMika Kuoppala <mika.kuoppala@linux.intel.com>2013-04-11 16:11:28 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-04-11 17:26:56 +0200
commita7ca33b673ee90b0a93ffdb18449256798f67786 (patch)
tree2d4e5523eb41c7c707984c85f9c668de6777db92 /tests/gem_seqno_wrap.c
parent918e763e2dd474a58c43c145c10e7f3aa4ec9a39 (diff)
tests/gem_seqno_wrap: verify debugfs write with readback
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> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/gem_seqno_wrap.c')
-rw-r--r--tests/gem_seqno_wrap.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/gem_seqno_wrap.c b/tests/gem_seqno_wrap.c
index 43e385132..776dedc92 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;
}