diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index e2a617e09ab78c33e7512c5d6e09d477e6a193e8..de3f7c151320067f144fc48d5a9599b8cfddaecf 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1728,10 +1728,11 @@ config TEST_LIST_SORT
 	  If unsure, say N.
 
 config TEST_SORT
-	bool "Array-based sort test"
-	depends on DEBUG_KERNEL
+	tristate "Array-based sort test"
+	depends on DEBUG_KERNEL || m
 	help
-	  This option enables the self-test function of 'sort()' at boot.
+	  This option enables the self-test function of 'sort()' at boot,
+	  or at module load time.
 
 	  If unsure, say N.