[Lldb-commits] [PATCH] D75537: Clear all settings during a test's setUp

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 9 05:52:21 PDT 2020


labath added inline comments.


================
Comment at: lldb/source/Commands/CommandObjectSettings.cpp:1119-1122
+    if (m_options.m_clear_all) {
+      GetDebugger().GetValueProperties()->Clear();
+      return result.Succeeded();
+    }
----------------
What will happen if I pass both `--all` and an actual setting argument. I think that should be an error.


================
Comment at: lldb/test/API/commands/settings/TestSettings.py:545-548
+        # Apply Setup commands again.
+        for s in self.setUpCommands():
+            self.runCmd(s)
+
----------------
This dependence on setUpCommands looks weird. Any way we can get rid of that? Maybe if we check the exact four settings that you modified before `clear --all` and verifying they have the correct (hardcoded) value? (and maybe not use the term-width setting, since the default value of that is unpredictable)


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75537/new/

https://reviews.llvm.org/D75537





More information about the lldb-commits mailing list