Skip to contentSkip to conversation

scsi: core: really include kunit tests with SCSI_LIB_KUNIT_TEST

PATCH Applied Lukas Bulwahn 3 participants 3 messages Feb 7, 2024 – Feb 13, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: core: really include kunit tests with SCSI_LIB_KUNIT_TEST

Commit 25a1f7a0a1fe ("scsi: core: Add kunit tests for scsi_check_passthrough()") adds the config SCSI_LIB_KUNIT_TEST and corresponding tests. Due to naming confusion, the actual tests would only be included when the non-existing config SCSI_KUNIT_TEST is enabled (note this missing 'LIB' in the config name). So, they are basically dead right now.

Adjust the name to actual existing config.

---
 drivers/scsi/scsi_lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/scsi_lib.c +1 -1
index 23719b903259..0315a0dc3406 100644
@@ -3428,6 +3428,6 @@ void scsi_build_sense(struct scsi_cmnd *scmd, int desc, u8 key, u8 asc, u8 ascq)
 }
 EXPORT_SYMBOL_GPL(scsi_build_sense);
 
-#ifdef CONFIG_SCSI_KUNIT_TEST
+#ifdef CONFIG_SCSI_LIB_KUNIT_TEST
 #include "scsi_lib_test.c"
 #endif
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 19 lines · Lukas Bulwahn

Commit 25a1f7a0a1fe ("scsi: core: Add kunit tests for scsi_check_passthrough()") adds the config SCSI_LIB_KUNIT_TEST and corresponding tests. Due to naming confusion, the actual tests would only be included when the non-existing config SCSI_KUNIT_TEST is enabled (note this missing 'LIB' in the config name). So, they are basically dead right now.

Adjust the name to actual existing config.

---
 drivers/scsi/scsi_lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/scsi_lib.c +0 -0
index 23719b903259..0315a0dc3406 100644

drivers/scsi/scsi_lib.c void scsi_build_sense(struct scsi_cmnd *scmd, int desc, u8 key, u8 asc, u8 ascq) · line 3433

Quoted 7 lines
drivers/scsi/scsi_lib.c +1 -1
@@ -3428,6 +3428,6 @@ void scsi_build_sense(struct scsi_cmnd *scmd, int desc, u8 key, u8 asc, u8 ascq)
 }
 EXPORT_SYMBOL_GPL(scsi_build_sense);
 
-#ifdef CONFIG_SCSI_KUNIT_TEST
+#ifdef CONFIG_SCSI_LIB_KUNIT_TEST
 #include "scsi_lib_test.c"
 #endif

I tried to sneak a rename in last minute and messed that up. Thanks.

#2 lore raw
In reply to Lukas Bulwahn

Lukas,

Quoted 8 lines

Commit 25a1f7a0a1fe ("scsi: core: Add kunit tests for scsi_check_passthrough()") adds the config SCSI_LIB_KUNIT_TEST and corresponding tests. Due to naming confusion, the actual tests would only be included when the non-existing config SCSI_KUNIT_TEST is enabled (note this missing 'LIB' in the config name). So, they are basically dead right now.

Adjust the name to actual existing config.

Applied to 6.9/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering