ahci-test: improve rw buffer patterns
commit54fced034e4d32d8ba6d1e27ecb7e2e2fb2f45d4
authorJohn Snow <jsnow@redhat.com>
Fri, 20 Mar 2015 00:24:16 +0000 (19 20:24 -0400)
committerJohn Snow <jsnow@redhat.com>
Mon, 23 Mar 2015 16:24:16 +0000 (23 12:24 -0400)
tree8f146d0a987a7382b146eaa4dc89161dffae7e02
parentac38123609742ce3fbdf53774a797ac230cbf118
ahci-test: improve rw buffer patterns

My pattern was cyclical every 256 bytes, so it missed a fairly obvious
failure case. Add some rand() pepper into the test pattern, and for large
patterns that exceed 256 sectors, start writing an ID per-sector so that
we never generate identical sector patterns.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Tested-by: Andreas Färber <afaerber@suse.de>
Message-id: 1426811056-2202-5-git-send-email-jsnow@redhat.com
tests/ahci-test.c