]> www.infradead.org Git - users/hch/blktests.git/commitdiff
tests/srp/rc: Make the SRP tests pass against kernel v5.7
authorBart Van Assche <bvanassche@acm.org>
Sat, 16 May 2020 00:00:45 +0000 (17:00 -0700)
committerOmar Sandoval <osandov@osandov.com>
Mon, 15 Jun 2020 22:30:44 +0000 (15:30 -0700)
Linux kernel commit 569334014370 ("scsi: core: Delete scsi_use_blk_mq")
removed the use_blk_mq sysfs attribute. Hence only write into the
use_blk_mq sysfs attribute if it exists.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
tests/srp/rc

index 07fa5e3a5f266cd221276ef0f81bab96e19e8e47..3b82363f4eee3398bfc63835a8d92eec2599af94 100755 (executable)
@@ -102,7 +102,9 @@ use_blk_mq() {
        )
        (
                cd /sys/module/scsi_mod/parameters || return $?
-               echo "$scsi_mode" >use_blk_mq || return $?
+               if [ -e use_blk_mq ]; then
+                       echo "$scsi_mode" >use_blk_mq || return $?
+               fi
        )
 
        log_out &&