From 9d485b40bbc4d25dc9df19ee83b65399df632d39 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Thu, 2 May 2024 18:40:39 +0200 Subject: [PATCH] tools: fix get_asan_state() in tools/test.py The output of `node -p process.config.variables.asan` includes a newline character so it's never exactly "1", which means asan is always "off" for the status files. This fixes the detection by stripping whitespaces from the output. PR-URL: https://github.com/nodejs/node/pull/52766 Reviewed-By: Rafael Gonzaga --- tools/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test.py b/tools/test.py index a0238c0da93cec..af88bc55cc0bfb 100755 --- a/tools/test.py +++ b/tools/test.py @@ -1613,7 +1613,7 @@ def get_env_type(vm, options_type, context): def get_asan_state(vm, context): - asan = Execute([vm, '-p', 'process.config.variables.asan'], context).stdout + asan = Execute([vm, '-p', 'process.config.variables.asan'], context).stdout.strip() return "on" if asan == "1" else "off"