diff --git a/test/lit.cfg b/test/lit.cfg
index a5bb350..8d1febc 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -245,7 +245,7 @@ if execute_external:
     config.available_features.add('shell')
 
 # Exclude MSYS due to transforming '/' to 'X:/mingwroot/'.
-if not platform.system() in ['Windows'] or lit.getBashPath() == '':
+if not 'MSYSTEM' in os.environ or not platform.system() in ['Windows']:
     config.available_features.add('shell-preserves-root')
 
 # ANSI escape sequences in non-dumb terminal
