]> www.infradead.org Git - users/hch/blktests.git/commit
scsi/006: skip cache types which disable read cache for SATA drives
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Wed, 30 Mar 2022 01:32:14 +0000 (10:32 +0900)
committerOmar Sandoval <osandov@fb.com>
Mon, 9 May 2022 19:11:16 +0000 (12:11 -0700)
commitd12b9e390795e6b548a37c47975ad9e1714d60fa
tree6adcfcb27c9d30dbb5ab4b8026c7c285b24f4992
parent73bb38f3c7dc584167e807c228ea5a36d5e159f9
scsi/006: skip cache types which disable read cache for SATA drives

The test case scsi/006 sets four cache types to test target SCSI
devices. Two cache types out of the four, "none" and "write back, no
read (daft)" disable read cache. However, these two types do not work
for SATA drives since SAT specification requires Disable Read Cache is
always set to zero in the caching mode page. It results in invalid
argument error and the test case failure.

To avoid the failure, skip the cache types which disable read cache if
the test devices are SATA drives. To check the device, add a helper
function _test_dev_is_sata in scsi/rc.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
tests/scsi/006
tests/scsi/rc