[Tarantool-patches] [PATCH v2 luajit 1/6] test: introduce tests for debugging extensions

Sergey Kaplun skaplun at tarantool.org
Tue May 26 17:41:15 MSK 2026


Hi, Evgeniy!
Thanks for the review!
Fixed your comment and force-pushed the branch.

On 26.05.26, Evgeniy Temirgaleev wrote:
> Hi, Sergey!
> 
> Thanks for the patch. Please, consider my suggestion: the debugger-aware «constants» are defined in one block per debugger.
> 
> diff --git a/test/tarantool-debugger-tests/debug-extension-tests.py b/test/tarantool-debugger-tests/debug-extension-tests.py
> index 30a2c478..f4414f4d 100644
> --- a/test/tarantool-debugger-tests/debug-extension-tests.py
> +++ b/test/tarantool-debugger-tests/debug-extension-tests.py
> @@ -19,9 +19,6 @@ LLDB = 'lldb' in DEBUGGER
> EXTENSION = EXTENSION_PATH + '/luajit_dbg.py'
> TIMEOUT = 10
> 
> -# Don't run any initialization scripts.
> -RUN_CMD_FILE = []
> -
> if LLDB:
> RUN_CMD_FILE = [
> '--batch',
> @@ -30,15 +27,15 @@ if LLDB:
> '--source-quietly',
> '--source'
> ]
> +    INFERIOR_ARGS = '--'
> +    PROCESS_RUN = 'process launch'
> +    LOAD_EXTENSION = 'command script import {ext}'.format(ext=EXTENSION)
> else:
> # GDB.
> RUN_CMD_FILE = ['--batch', '--nx', '--quiet', '--command']
> -
> -INFERIOR_ARGS = '--' if LLDB else '--args'
> -PROCESS_RUN = 'process launch' if LLDB else 'r'
> -LOAD_EXTENSION = (
> -    'command script import {ext}' if LLDB else 'source {ext}'
> -).format(ext=EXTENSION)
> +    INFERIOR_ARGS = '--args'
> +    PROCESS_RUN = 'r'
> +    LOAD_EXTENSION = 'source {ext}'.format(ext=EXTENSION)

Fixed. See the iterative patch below:

===================================================================
diff --git a/test/tarantool-debugger-tests/debug-extension-tests.py b/test/tarantool-debugger-tests/debug-extension-tests.py
index 30a2c478..f337f0e9 100644
--- a/test/tarantool-debugger-tests/debug-extension-tests.py
+++ b/test/tarantool-debugger-tests/debug-extension-tests.py
@@ -19,10 +19,11 @@ LLDB = 'lldb' in DEBUGGER
 EXTENSION = EXTENSION_PATH + '/luajit_dbg.py'
 TIMEOUT = 10
 
-# Don't run any initialization scripts.
-RUN_CMD_FILE = []
-
 if LLDB:
+    INFERIOR_ARGS = '--'
+    LOAD_EXTENSION = 'command script import ' + EXTENSION
+    PROCESS_RUN = 'process launch'
+    # Don't run any initialization scripts.
     RUN_CMD_FILE = [
         '--batch',
         '--no-lldbinit',
@@ -32,15 +33,12 @@ if LLDB:
     ]
 else:
     # GDB.
+    INFERIOR_ARGS = '--args'
+    LOAD_EXTENSION = 'source ' + EXTENSION
+    PROCESS_RUN = 'run'
+    # Don't run any initialization scripts.
     RUN_CMD_FILE = ['--batch', '--nx', '--quiet', '--command']
 
-INFERIOR_ARGS = '--' if LLDB else '--args'
-PROCESS_RUN = 'process launch' if LLDB else 'r'
-LOAD_EXTENSION = (
-    'command script import {ext}' if LLDB else 'source {ext}'
-).format(ext=EXTENSION)
-
-
 RX_ADDR = r'0x[a-f0-9]+'
 RX_HASH = RX_ADDR  # The same pattern for hexademic values.
 RX_FRAME = r'\[(S|\s)(B|\s)(T|\s)(M|\s)\]'
===================================================================

> 
> --
> Best regards,
> Evgeniy Temirgaleev
> 
> > 

<snipped>

-- 
Best regards,
Sergey Kaplun


More information about the Tarantool-patches mailing list