From 1e2c69836342d9c288a6c58bd8cf81d6fb54d866 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 15 May 2020 17:00:45 -0700 Subject: [PATCH] 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 --- tests/srp/rc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 && -- 2.49.0