From: Bart Van Assche Date: Sat, 16 May 2020 00:00:45 +0000 (-0700) Subject: tests/srp/rc: Make the SRP tests pass against kernel v5.7 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=1e2c69836342d9c288a6c58bd8cf81d6fb54d866;p=users%2Fsagi%2Fblktests.git tests/srp/rc: Make the SRP tests pass against kernel v5.7 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 --- diff --git a/tests/srp/rc b/tests/srp/rc index 07fa5e3..3b82363 100755 --- a/tests/srp/rc +++ b/tests/srp/rc @@ -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 &&