jankratochvil created this revision. jankratochvil added reviewers: JDevlieghere, labath. jankratochvil added a project: LLDB.
D55859 <https://reviews.llvm.org/D55859> and D63339 <https://reviews.llvm.org/D63339> prevented needless dependencies on system symbol files. This testcase was checked-in afterwards and it brings back one such unwanted dependency. Under some circumstances it may cause false FAILs and/or excessive resource usage to run the testcase. `clang-format` does not support `.py` so I have formatted it as I found most compatible. Also this is not a full testcase-style initialization, for example `--no-lldbinit` ignores `env("NO_LLDBINIT")` setting which `lldbtest.py` does implement: # If we spawn an lldb process for test (via pexpect), do not load the # init file unless told otherwise. if os.environ.get("NO_LLDBINIT") != "NO": self.lldbOption += " --no-lldbinit" But this is what `lldbpexpect.py` does - it also ignores `env("NO_LLDBINIT")`. Sure one could also fix `lldbpexpect.py` to unify the initialization more with `lldbtest.py` but I find that outside of the scope of this patch. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D79649 Files: lldb/test/API/functionalities/reproducers/attach/TestReproducerAttach.py Index: lldb/test/API/functionalities/reproducers/attach/TestReproducerAttach.py =================================================================== --- lldb/test/API/functionalities/reproducers/attach/TestReproducerAttach.py +++ lldb/test/API/functionalities/reproducers/attach/TestReproducerAttach.py @@ -47,9 +47,10 @@ # Use Popen because pexpect is overkill and spawnSubprocess is # asynchronous. capture = subprocess.Popen([ - lldbtest_config.lldbExec, '-b', '--capture', '--capture-path', - reproducer, '-o', 'proc att -n {}'.format(exe), '-o', - 'reproducer generate' + lldbtest_config.lldbExec, '-b', '--no-lldbinit', '--no-use-colors'] + + sum(map(lambda x: ['-O', x], self.setUpCommands()),[]) + + ['--capture', '--capture-path', reproducer, + '-o', 'proc att -n {}'.format(exe), '-o', 'reproducer generate' ], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
Index: lldb/test/API/functionalities/reproducers/attach/TestReproducerAttach.py =================================================================== --- lldb/test/API/functionalities/reproducers/attach/TestReproducerAttach.py +++ lldb/test/API/functionalities/reproducers/attach/TestReproducerAttach.py @@ -47,9 +47,10 @@ # Use Popen because pexpect is overkill and spawnSubprocess is # asynchronous. capture = subprocess.Popen([ - lldbtest_config.lldbExec, '-b', '--capture', '--capture-path', - reproducer, '-o', 'proc att -n {}'.format(exe), '-o', - 'reproducer generate' + lldbtest_config.lldbExec, '-b', '--no-lldbinit', '--no-use-colors'] + + sum(map(lambda x: ['-O', x], self.setUpCommands()),[]) + + ['--capture', '--capture-path', reproducer, + '-o', 'proc att -n {}'.format(exe), '-o', 'reproducer generate' ], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits