[Lldb-commits] [PATCH] D32522: Test case for the issue raised in D32271

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon May 22 07:01:21 PDT 2017


labath added inline comments.


================
Comment at: packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py:47
+        exe = os.path.join('.','newdir','proc_attach')
+        self.addTearDownHook(lambda: shutil.rmtree(os.path.join(os.getcwd())))
+
----------------
emaste wrote:
> shouldn't this be ... `rmtree(os.path.join(os.getcwd(), 'newdir'))` instead?
Probably not because he does a os.chdir(newdir) below. However, that does not make this a good idea, as you will delete an unexpected directory if the test fails before you get a chance to chdir. I like the Ed's earlier suggestion to launch the process from a separate directory more than this.


Repository:
  rL LLVM

https://reviews.llvm.org/D32522





More information about the lldb-commits mailing list