[Lldb-commits] [PATCH] D111899: LLDB tests modification for hardware breakpoints

2021-10-29 Thread Nikolay Chokoev via Phabricator via lldb-commits
georgiev updated this revision to Diff 383284.

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

https://reviews.llvm.org/D111899

Files:
  lldb/packages/Python/lldbsuite/test/lldbutil.py
  lldb/test/API/commands/apropos/with-process/TestAproposWithProcess.py
  lldb/test/API/commands/command/nested_alias/TestNestedAlias.py
  
lldb/test/API/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
  
lldb/test/API/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py
  
lldb/test/API/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
  lldb/test/API/functionalities/dead-strip/TestDeadStrip.py
  lldb/test/API/functionalities/load_unload/TestLoadUnload.py
  lldb/test/API/functionalities/memory/cache/TestMemoryCache.py
  lldb/test/API/functionalities/memory/find/TestMemoryFind.py
  lldb/test/API/functionalities/memory/read/TestMemoryRead.py
  lldb/test/API/lang/c/anonymous/TestAnonymous.py
  lldb/test/API/lang/c/array_types/TestArrayTypes.py
  lldb/test/API/lang/c/conflicting-symbol/TestConflictingSymbol.py
  lldb/test/API/lang/c/const_variables/TestConstVariables.py
  lldb/test/API/lang/c/enum_types/TestEnumTypes.py
  lldb/test/API/lang/c/forward/TestForwardDeclaration.py
  lldb/test/API/lang/c/function_types/TestFunctionTypes.py
  lldb/test/API/lang/c/global_variables/TestGlobalVariables.py
  lldb/test/API/lang/c/local_variables/TestLocalVariables.py
  lldb/test/API/lang/c/modules/TestCModules.py
  lldb/test/API/lang/c/register_variables/TestRegisterVariables.py
  lldb/test/API/lang/c/set_values/TestSetValues.py
  lldb/test/API/lang/c/shared_lib/TestSharedLib.py
  
lldb/test/API/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
  lldb/test/API/lang/cpp/class_types/TestClassTypes.py
  lldb/test/API/lang/cpp/inlines/TestInlines.py
  lldb/test/API/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py
  lldb/test/API/lang/cpp/signed_types/TestSignedTypes.py
  lldb/test/API/lang/objc/conflicting-definition/TestConflictingDefinition.py
  lldb/test/API/lang/objc/forward-decl/TestForwardDecl.py
  lldb/test/API/lang/objc/hidden-ivars/TestHiddenIvars.py
  lldb/test/API/lang/objc/modules-auto-import/TestModulesAutoImport.py
  lldb/test/API/lang/objc/modules-incomplete/TestIncompleteModules.py
  lldb/test/API/lang/objc/modules/TestObjCModules.py
  lldb/test/API/lang/objc/objc-new-syntax/ObjCNewSyntaxTest.py
  lldb/test/API/lang/objc/real-definition/TestRealDefinition.py
  
lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py

Index: lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
===
--- lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
+++ lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
@@ -57,8 +57,7 @@
  'stop reason = breakpoint'])
 
 # The breakpoint should have a hit count of 1.
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
 
 d1 = self.frame().FindVariable("d1")
 d1.SetPreferSyntheticValue(True)
Index: lldb/test/API/lang/objc/real-definition/TestRealDefinition.py
===
--- lldb/test/API/lang/objc/real-definition/TestRealDefinition.py
+++ lldb/test/API/lang/objc/real-definition/TestRealDefinition.py
@@ -32,14 +32,12 @@
  'stop reason = breakpoint'])
 
 # Run and stop at Foo
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
 
 self.runCmd("continue", RUN_SUCCEEDED)
 
 # Run at stop at main
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
 
 # This should display correctly.
 self.expect(
@@ -69,14 +67,12 @@
  'stop reason = breakpoint'])
 
 # Run and stop at Foo
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
 
 self.runCmd("continue", RUN_SUCCEEDED)
 
 # Run at stop at main
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
 
 # This should display correctly.
 self.expect(
Index: lldb/test/API/lang/objc/objc-new-syntax/ObjCNewSyntaxTest.py

[Lldb-commits] [PATCH] D111899: LLDB tests modification for hardware breakpoints

2021-10-29 Thread Nikolay Chokoev via Phabricator via lldb-commits
georgiev updated this revision to Diff 383282.

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

https://reviews.llvm.org/D111899

Files:
  lldb/packages/Python/lldbsuite/test/lldbutil.py
  lldb/test/API/commands/apropos/with-process/TestAproposWithProcess.py
  lldb/test/API/commands/command/nested_alias/TestNestedAlias.py
  
lldb/test/API/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
  
lldb/test/API/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py
  
lldb/test/API/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
  lldb/test/API/functionalities/dead-strip/TestDeadStrip.py
  lldb/test/API/functionalities/load_unload/TestLoadUnload.py
  lldb/test/API/functionalities/memory/cache/TestMemoryCache.py
  lldb/test/API/functionalities/memory/find/TestMemoryFind.py
  lldb/test/API/functionalities/memory/read/TestMemoryRead.py
  lldb/test/API/lang/c/anonymous/TestAnonymous.py
  lldb/test/API/lang/c/array_types/TestArrayTypes.py
  lldb/test/API/lang/c/conflicting-symbol/TestConflictingSymbol.py
  lldb/test/API/lang/c/const_variables/TestConstVariables.py
  lldb/test/API/lang/c/enum_types/TestEnumTypes.py
  lldb/test/API/lang/c/forward/TestForwardDeclaration.py
  lldb/test/API/lang/c/function_types/TestFunctionTypes.py
  lldb/test/API/lang/c/global_variables/TestGlobalVariables.py
  lldb/test/API/lang/c/local_variables/TestLocalVariables.py
  lldb/test/API/lang/c/modules/TestCModules.py
  lldb/test/API/lang/c/register_variables/TestRegisterVariables.py
  lldb/test/API/lang/c/set_values/TestSetValues.py
  lldb/test/API/lang/c/shared_lib/TestSharedLib.py
  
lldb/test/API/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
  lldb/test/API/lang/cpp/class_types/TestClassTypes.py
  lldb/test/API/lang/cpp/inlines/TestInlines.py
  lldb/test/API/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py
  lldb/test/API/lang/cpp/signed_types/TestSignedTypes.py
  lldb/test/API/lang/objc/conflicting-definition/TestConflictingDefinition.py
  lldb/test/API/lang/objc/forward-decl/TestForwardDecl.py
  lldb/test/API/lang/objc/hidden-ivars/TestHiddenIvars.py
  lldb/test/API/lang/objc/modules-auto-import/TestModulesAutoImport.py
  lldb/test/API/lang/objc/modules-incomplete/TestIncompleteModules.py
  lldb/test/API/lang/objc/modules/TestObjCModules.py
  lldb/test/API/lang/objc/objc-new-syntax/ObjCNewSyntaxTest.py
  lldb/test/API/lang/objc/real-definition/TestRealDefinition.py
  
lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py

Index: lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
===
--- lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
+++ lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
@@ -57,8 +57,7 @@
  'stop reason = breakpoint'])
 
 # The breakpoint should have a hit count of 1.
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
 
 d1 = self.frame().FindVariable("d1")
 d1.SetPreferSyntheticValue(True)
Index: lldb/test/API/lang/objc/real-definition/TestRealDefinition.py
===
--- lldb/test/API/lang/objc/real-definition/TestRealDefinition.py
+++ lldb/test/API/lang/objc/real-definition/TestRealDefinition.py
@@ -32,14 +32,12 @@
  'stop reason = breakpoint'])
 
 # Run and stop at Foo
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
 
 self.runCmd("continue", RUN_SUCCEEDED)
 
 # Run at stop at main
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
 
 # This should display correctly.
 self.expect(
@@ -69,14 +67,12 @@
  'stop reason = breakpoint'])
 
 # Run and stop at Foo
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
 
 self.runCmd("continue", RUN_SUCCEEDED)
 
 # Run at stop at main
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
 
 # This should display correctly.
 self.expect(
Index: lldb/test/API/lang/objc/objc-new-syntax/ObjCNewSyntaxTest.py

[Lldb-commits] [PATCH] D111899: LLDB tests modification for hardware breakpoints

2021-10-20 Thread Nikolay Chokoev via Phabricator via lldb-commits
georgiev updated this revision to Diff 380922.
georgiev added a comment.

Diff update


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

https://reviews.llvm.org/D111899

Files:
  lldb/packages/Python/lldbsuite/test/lldbutil.py
  lldb/test/API/commands/apropos/with-process/TestAproposWithProcess.py
  lldb/test/API/commands/command/nested_alias/TestNestedAlias.py
  
lldb/test/API/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
  
lldb/test/API/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
  lldb/test/API/functionalities/dead-strip/TestDeadStrip.py
  lldb/test/API/functionalities/load_unload/TestLoadUnload.py
  lldb/test/API/functionalities/memory/cache/TestMemoryCache.py
  lldb/test/API/functionalities/memory/find/TestMemoryFind.py
  lldb/test/API/functionalities/memory/read/TestMemoryRead.py
  lldb/test/API/lang/c/anonymous/TestAnonymous.py
  lldb/test/API/lang/c/array_types/TestArrayTypes.py
  lldb/test/API/lang/c/bitfields/TestBitfields.py
  lldb/test/API/lang/c/conflicting-symbol/TestConflictingSymbol.py
  lldb/test/API/lang/c/const_variables/TestConstVariables.py
  lldb/test/API/lang/c/enum_types/TestEnumTypes.py
  lldb/test/API/lang/c/forward/TestForwardDeclaration.py
  lldb/test/API/lang/c/function_types/TestFunctionTypes.py
  lldb/test/API/lang/c/global_variables/TestGlobalVariables.py
  lldb/test/API/lang/c/local_variables/TestLocalVariables.py
  lldb/test/API/lang/c/modules/TestCModules.py
  lldb/test/API/lang/c/register_variables/TestRegisterVariables.py
  lldb/test/API/lang/c/set_values/TestSetValues.py
  lldb/test/API/lang/c/shared_lib/TestSharedLib.py
  
lldb/test/API/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
  lldb/test/API/lang/cpp/bitfields/TestCppBitfields.py
  lldb/test/API/lang/cpp/class_types/TestClassTypes.py
  lldb/test/API/lang/cpp/enum_types/TestCPP11EnumTypes.py
  lldb/test/API/lang/cpp/inlines/TestInlines.py
  lldb/test/API/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py
  lldb/test/API/lang/cpp/signed_types/TestSignedTypes.py
  lldb/test/API/lang/objc/conflicting-definition/TestConflictingDefinition.py
  lldb/test/API/lang/objc/forward-decl/TestForwardDecl.py
  lldb/test/API/lang/objc/hidden-ivars/TestHiddenIvars.py
  lldb/test/API/lang/objc/modules-auto-import/TestModulesAutoImport.py
  lldb/test/API/lang/objc/modules-incomplete/TestIncompleteModules.py
  lldb/test/API/lang/objc/modules/TestObjCModules.py
  lldb/test/API/lang/objc/objc-new-syntax/ObjCNewSyntaxTest.py
  lldb/test/API/lang/objc/real-definition/TestRealDefinition.py
  
lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py

Index: lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
===
--- lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
+++ lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
@@ -40,8 +40,7 @@
  'stop reason = breakpoint'])
 
 # The breakpoint should have a hit count of 1.
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
 
 d1 = self.frame().FindVariable("d1")
 d1.SetPreferSyntheticValue(True)
Index: lldb/test/API/lang/objc/real-definition/TestRealDefinition.py
===
--- lldb/test/API/lang/objc/real-definition/TestRealDefinition.py
+++ lldb/test/API/lang/objc/real-definition/TestRealDefinition.py
@@ -33,14 +33,12 @@
  'stop reason = breakpoint'])
 
 # Run and stop at Foo
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
 
 self.runCmd("continue", RUN_SUCCEEDED)
 
 # Run at stop at main
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
 
 # This should display correctly.
 self.expect(
@@ -71,14 +69,12 @@
  'stop reason = breakpoint'])
 
 # Run and stop at Foo
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
 
 self.runCmd("continue", RUN_SUCCEEDED)
 
 # Run at stop at main
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
 
 # This should display 

[Lldb-commits] [PATCH] D111899: LLDB tests modification for hardware breakpoints

2021-10-20 Thread Nikolay Chokoev via Phabricator via lldb-commits
georgiev updated this revision to Diff 380919.
georgiev added a comment.

Added breakpoint resolved check.
Addressed some of the comments.


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

https://reviews.llvm.org/D111899

Files:
  lldb/packages/Python/lldbsuite/test/lldbutil.py
  lldb/test/API/commands/apropos/with-process/TestAproposWithProcess.py
  lldb/test/API/commands/command/nested_alias/TestNestedAlias.py
  
lldb/test/API/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
  
lldb/test/API/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
  lldb/test/API/functionalities/dead-strip/TestDeadStrip.py
  lldb/test/API/functionalities/load_unload/TestLoadUnload.py
  lldb/test/API/functionalities/memory/cache/TestMemoryCache.py
  lldb/test/API/functionalities/memory/find/TestMemoryFind.py
  lldb/test/API/functionalities/memory/read/TestMemoryRead.py
  lldb/test/API/lang/c/anonymous/TestAnonymous.py
  lldb/test/API/lang/c/array_types/TestArrayTypes.py
  lldb/test/API/lang/c/bitfields/TestBitfields.py
  lldb/test/API/lang/c/conflicting-symbol/TestConflictingSymbol.py
  lldb/test/API/lang/c/const_variables/TestConstVariables.py
  lldb/test/API/lang/c/enum_types/TestEnumTypes.py
  lldb/test/API/lang/c/forward/TestForwardDeclaration.py
  lldb/test/API/lang/c/function_types/TestFunctionTypes.py
  lldb/test/API/lang/c/global_variables/TestGlobalVariables.py
  lldb/test/API/lang/c/local_variables/TestLocalVariables.py
  lldb/test/API/lang/c/modules/TestCModules.py
  lldb/test/API/lang/c/register_variables/TestRegisterVariables.py
  lldb/test/API/lang/c/set_values/TestSetValues.py
  lldb/test/API/lang/c/shared_lib/TestSharedLib.py
  
lldb/test/API/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
  lldb/test/API/lang/cpp/bitfields/TestCppBitfields.py
  lldb/test/API/lang/cpp/class_types/TestClassTypes.py
  lldb/test/API/lang/cpp/enum_types/TestCPP11EnumTypes.py
  lldb/test/API/lang/cpp/inlines/TestInlines.py
  lldb/test/API/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py
  lldb/test/API/lang/cpp/signed_types/TestSignedTypes.py
  lldb/test/API/lang/objc/conflicting-definition/TestConflictingDefinition.py
  lldb/test/API/lang/objc/forward-decl/TestForwardDecl.py
  lldb/test/API/lang/objc/hidden-ivars/TestHiddenIvars.py
  lldb/test/API/lang/objc/modules-auto-import/TestModulesAutoImport.py
  lldb/test/API/lang/objc/modules-incomplete/TestIncompleteModules.py
  lldb/test/API/lang/objc/modules/TestObjCModules.py
  lldb/test/API/lang/objc/objc-new-syntax/ObjCNewSyntaxTest.py
  lldb/test/API/lang/objc/real-definition/TestRealDefinition.py
  
lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py

Index: lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
===
--- lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
+++ lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
@@ -40,8 +40,7 @@
  'stop reason = breakpoint'])
 
 # The breakpoint should have a hit count of 1.
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
 
 d1 = self.frame().FindVariable("d1")
 d1.SetPreferSyntheticValue(True)
Index: lldb/test/API/lang/objc/real-definition/TestRealDefinition.py
===
--- lldb/test/API/lang/objc/real-definition/TestRealDefinition.py
+++ lldb/test/API/lang/objc/real-definition/TestRealDefinition.py
@@ -33,14 +33,12 @@
  'stop reason = breakpoint'])
 
 # Run and stop at Foo
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
 
 self.runCmd("continue", RUN_SUCCEEDED)
 
 # Run at stop at main
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
 
 # This should display correctly.
 self.expect(
@@ -71,14 +69,12 @@
  'stop reason = breakpoint'])
 
 # Run and stop at Foo
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
 
 self.runCmd("continue", RUN_SUCCEEDED)
 
 # Run at stop at main
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+lldbutil.check_breakpoint(self, bpno = 1, 

[Lldb-commits] [PATCH] D111899: LLDB tests modification for hardware breakpoints

2021-10-19 Thread Nikolay Chokoev via Phabricator via lldb-commits
georgiev updated this revision to Diff 380714.
georgiev added a comment.

A new lldbutil function to test the breakpoint - check_breakpoint.


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

https://reviews.llvm.org/D111899

Files:
  lldb/packages/Python/lldbsuite/test/lldbutil.py
  lldb/test/API/commands/apropos/with-process/TestAproposWithProcess.py
  lldb/test/API/commands/command/nested_alias/TestNestedAlias.py
  
lldb/test/API/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
  
lldb/test/API/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
  lldb/test/API/functionalities/breakpoint/cpp_exception/Makefile
  lldb/test/API/functionalities/dead-strip/TestDeadStrip.py
  lldb/test/API/functionalities/load_unload/TestLoadUnload.py
  lldb/test/API/functionalities/memory/cache/TestMemoryCache.py
  lldb/test/API/functionalities/memory/find/TestMemoryFind.py
  lldb/test/API/functionalities/memory/read/TestMemoryRead.py
  lldb/test/API/lang/c/anonymous/TestAnonymous.py
  lldb/test/API/lang/c/array_types/TestArrayTypes.py
  lldb/test/API/lang/c/bitfields/TestBitfields.py
  lldb/test/API/lang/c/conflicting-symbol/TestConflictingSymbol.py
  lldb/test/API/lang/c/const_variables/TestConstVariables.py
  lldb/test/API/lang/c/enum_types/TestEnumTypes.py
  lldb/test/API/lang/c/forward/TestForwardDeclaration.py
  lldb/test/API/lang/c/function_types/TestFunctionTypes.py
  lldb/test/API/lang/c/global_variables/TestGlobalVariables.py
  lldb/test/API/lang/c/local_variables/TestLocalVariables.py
  lldb/test/API/lang/c/modules/TestCModules.py
  lldb/test/API/lang/c/register_variables/TestRegisterVariables.py
  lldb/test/API/lang/c/set_values/TestSetValues.py
  lldb/test/API/lang/c/shared_lib/TestSharedLib.py
  
lldb/test/API/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
  lldb/test/API/lang/cpp/bitfields/TestCppBitfields.py
  lldb/test/API/lang/cpp/class_types/TestClassTypes.py
  lldb/test/API/lang/cpp/enum_types/TestCPP11EnumTypes.py
  lldb/test/API/lang/cpp/inlines/TestInlines.py
  lldb/test/API/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py
  lldb/test/API/lang/cpp/signed_types/TestSignedTypes.py
  lldb/test/API/lang/objc/conflicting-definition/TestConflictingDefinition.py
  lldb/test/API/lang/objc/forward-decl/TestForwardDecl.py
  lldb/test/API/lang/objc/hidden-ivars/TestHiddenIvars.py
  lldb/test/API/lang/objc/modules-auto-import/TestModulesAutoImport.py
  lldb/test/API/lang/objc/modules-incomplete/TestIncompleteModules.py
  lldb/test/API/lang/objc/modules/TestObjCModules.py
  lldb/test/API/lang/objc/objc-new-syntax/ObjCNewSyntaxTest.py
  lldb/test/API/lang/objc/real-definition/TestRealDefinition.py
  
lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py

Index: lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
===
--- lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
+++ lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
@@ -40,8 +40,7 @@
  'stop reason = breakpoint'])
 
 # The breakpoint should have a hit count of 1.
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
 
 d1 = self.frame().FindVariable("d1")
 d1.SetPreferSyntheticValue(True)
Index: lldb/test/API/lang/objc/real-definition/TestRealDefinition.py
===
--- lldb/test/API/lang/objc/real-definition/TestRealDefinition.py
+++ lldb/test/API/lang/objc/real-definition/TestRealDefinition.py
@@ -33,14 +33,12 @@
  'stop reason = breakpoint'])
 
 # Run and stop at Foo
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
 
 self.runCmd("continue", RUN_SUCCEEDED)
 
 # Run at stop at main
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
 
 # This should display correctly.
 self.expect(
@@ -71,14 +69,12 @@
  'stop reason = breakpoint'])
 
 # Run and stop at Foo
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
 
 self.runCmd("continue", RUN_SUCCEEDED)
 
 # Run at stop at main
-self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count 

[Lldb-commits] [PATCH] D111899: LLDB tests modification for hardware breakpoints

2021-10-18 Thread Nikolay Chokoev via Phabricator via lldb-commits
georgiev added a comment.

What about the case when we have a logical BP with more than one location? the 
locations may have different hit count.
In particular we have a test like:
patterns=[

  "1\.1: .+ unresolved, hit count = 0 +Options: disabled",
  "1\.2: .+ resolved,( hardware,)? hit count = 1",
  "1\.3: .+ resolved,( hardware,)? hit count = 1"])


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

https://reviews.llvm.org/D111899

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D111899: LLDB tests modification for hardware breakpoints

2021-10-15 Thread Nikolay Chokoev via Phabricator via lldb-commits
georgiev created this revision.
georgiev added a reviewer: LLDB.
georgiev requested review of this revision.

LLDB now shows additional string 'hardware' when a hardware breakpoint is hit. 
Current test fail for those kind of breakpoints, as they match exact string, 
which doesn't include 'hardware'.
The proposed solution is a regex match with an optional include of 'hardware' 
string (zero or one).


https://reviews.llvm.org/D111899

Files:
  lldb/test/API/commands/apropos/with-process/TestAproposWithProcess.py
  lldb/test/API/commands/command/nested_alias/TestNestedAlias.py
  
lldb/test/API/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
  
lldb/test/API/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
  lldb/test/API/functionalities/breakpoint/cpp_exception/Makefile
  lldb/test/API/functionalities/dead-strip/TestDeadStrip.py
  lldb/test/API/functionalities/load_unload/TestLoadUnload.py
  lldb/test/API/functionalities/memory/cache/TestMemoryCache.py
  lldb/test/API/functionalities/memory/find/TestMemoryFind.py
  lldb/test/API/functionalities/memory/read/TestMemoryRead.py
  lldb/test/API/lang/c/anonymous/TestAnonymous.py
  lldb/test/API/lang/c/array_types/TestArrayTypes.py
  lldb/test/API/lang/c/bitfields/TestBitfields.py
  lldb/test/API/lang/c/conflicting-symbol/TestConflictingSymbol.py
  lldb/test/API/lang/c/const_variables/TestConstVariables.py
  lldb/test/API/lang/c/enum_types/TestEnumTypes.py
  lldb/test/API/lang/c/forward/TestForwardDeclaration.py
  lldb/test/API/lang/c/function_types/TestFunctionTypes.py
  lldb/test/API/lang/c/global_variables/TestGlobalVariables.py
  lldb/test/API/lang/c/local_variables/TestLocalVariables.py
  lldb/test/API/lang/c/modules/TestCModules.py
  lldb/test/API/lang/c/register_variables/TestRegisterVariables.py
  lldb/test/API/lang/c/set_values/TestSetValues.py
  lldb/test/API/lang/c/shared_lib/TestSharedLib.py
  
lldb/test/API/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
  lldb/test/API/lang/cpp/bitfields/TestCppBitfields.py
  lldb/test/API/lang/cpp/class_types/TestClassTypes.py
  lldb/test/API/lang/cpp/enum_types/TestCPP11EnumTypes.py
  lldb/test/API/lang/cpp/inlines/TestInlines.py
  lldb/test/API/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py
  lldb/test/API/lang/cpp/signed_types/TestSignedTypes.py
  lldb/test/API/lang/objc/conflicting-definition/TestConflictingDefinition.py
  lldb/test/API/lang/objc/forward-decl/TestForwardDecl.py
  lldb/test/API/lang/objc/hidden-ivars/TestHiddenIvars.py
  lldb/test/API/lang/objc/modules-auto-import/TestModulesAutoImport.py
  lldb/test/API/lang/objc/modules-incomplete/TestIncompleteModules.py
  lldb/test/API/lang/objc/modules/TestObjCModules.py
  lldb/test/API/lang/objc/objc-new-syntax/ObjCNewSyntaxTest.py
  lldb/test/API/lang/objc/real-definition/TestRealDefinition.py
  
lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py

Index: lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
===
--- lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
+++ lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
@@ -41,7 +41,7 @@
 
 # The breakpoint should have a hit count of 1.
 self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+patterns=[' resolved,( hardware,)? hit count = 1'])
 
 d1 = self.frame().FindVariable("d1")
 d1.SetPreferSyntheticValue(True)
Index: lldb/test/API/lang/objc/real-definition/TestRealDefinition.py
===
--- lldb/test/API/lang/objc/real-definition/TestRealDefinition.py
+++ lldb/test/API/lang/objc/real-definition/TestRealDefinition.py
@@ -34,13 +34,13 @@
 
 # Run and stop at Foo
 self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+patterns=[' resolved,( hardware,)? hit count = 1'])
 
 self.runCmd("continue", RUN_SUCCEEDED)
 
 # Run at stop at main
 self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+patterns=[' resolved,( hardware,)? hit count = 1'])
 
 # This should display correctly.
 self.expect(
@@ -72,13 +72,13 @@
 
 # Run and stop at Foo
 self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+patterns=[' resolved,( hardware,)? hit count = 1'])
 
 self.runCmd("continue", RUN_SUCCEEDED)
 
 # Run at stop at main
 self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-substrs=[' resolved, hit count = 1'])
+patterns=['