]> git.proxmox.com Git - mirror_qemu.git/commit
ahci-test: test atapi read_cd with bcl, nb_sectors = 0
authorJohn Snow <jsnow@redhat.com>
Mon, 14 Nov 2016 16:15:54 +0000 (11:15 -0500)
committerJohn Snow <jsnow@redhat.com>
Mon, 14 Nov 2016 16:15:54 +0000 (11:15 -0500)
commitebde93bf9a13f2e0a853eac8fb4f33c9ecd74baf
tree8b0b8b3eda42422c98cc6e6bdf9d53483aaca40f
parent53c05e6c20509adcff40fe1c7a02210354fe53f7
ahci-test: test atapi read_cd with bcl, nb_sectors = 0

Commit 9ef2e93f introduced the concept of tagging ATAPI commands as
NONDATA, but this introduced a regression for certain commands better
described as CONDDATA. read_cd is such a command that both requires
a non-zero BCL if a transfer size is set, but is perfectly content to
accept a zero BCL if the transfer size is 0.

This test adds a regression test for the case where BCL and nb_sectors
are both 0.

Flesh out the CDROM tests by:

(1) Allowing the test to specify a BCL
(2) Allowing the buffer comparison test to compare a 0-size buffer
(3) Fix the BCL specification in libqos (It is LE, not BE)
(4) Add a nice human-readable message for future SCSI command additions

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 1477970211-25754-4-git-send-email-jsnow@redhat.com
[Line length edit --js]
Signed-off-by: John Snow <jsnow@redhat.com>
tests/ahci-test.c
tests/libqos/ahci.c
tests/libqos/ahci.h