diff options
Diffstat (limited to 'lldb/test/functionalities/watchpoint')
3 files changed, 9 insertions, 5 deletions
diff --git a/lldb/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py b/lldb/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py index 30ba801b318..cfc5f60e16e 100644 --- a/lldb/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py +++ b/lldb/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py @@ -75,7 +75,7 @@ class HelloWatchpointTestCase(TestBase): substrs = ['Watchpoint created', 'size = 4', 'type = w', '%s:%d' % (self.source, self.decl)]) else: - self.expect("watchpoint set -w write global", WATCHPOINT_CREATED, + self.expect("watchpoint set -w write -v global", WATCHPOINT_CREATED, substrs = ['Watchpoint created', 'size = 4', 'type = w', '%s:%d' % (self.source, self.decl)]) diff --git a/lldb/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py b/lldb/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py index de9016f5cb3..74fc12a481e 100644 --- a/lldb/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py +++ b/lldb/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py @@ -60,7 +60,7 @@ class WatchLocationUsingWatchpointSetTestCase(TestBase): # with offset as 7. # The main.cpp, by design, misbehaves by not following the agreed upon # protocol of only accessing the allowable index range of [0, 6]. - self.expect("watchpoint set -w write -x 1 g_char_ptr + 7", WATCHPOINT_CREATED, + self.expect("watchpoint set -w write -x 1 -e g_char_ptr + 7", WATCHPOINT_CREATED, substrs = ['Watchpoint created', 'size = 1', 'type = w']) self.runCmd("expr unsigned val = g_char_ptr[7]; val") self.expect(self.res.GetOutput().splitlines()[0], exe=False, diff --git a/lldb/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py b/lldb/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py index 3ff21478460..299e2aec9b6 100644 --- a/lldb/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py +++ b/lldb/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py @@ -51,9 +51,13 @@ class WatchpointSetErrorTestCase(TestBase): # No argument is an error. self.expect("watchpoint set", error=True, - substrs = ['specify your target variable', - 'or expression', - 'to watch for']) + startstr = 'error: invalid combination of options for the given command') + self.runCmd("watchpoint set -v -w read_write", check=False) + + # 'watchpoint set' now takes a mandatory '-v' or '-e' option to + # indicate watching for either variable or address. + self.expect("watchpoint set -w write global", error=True, + startstr = 'error: invalid combination of options for the given command') # Wrong size parameter is an error. self.expect("watchpoint set -x -128", error=True, |

