Skip to content

Commit 6c16fc8

Browse files
[lldb][test] Remove full stop from expected error messages (llvm#193748)
I am about to update a bunch of uses of AppendErrorWithFormat to not have a full stop at the end, to confirm to https://llvm.org/docs/CodingStandards.html#error-and-warning-messages. Reviewing all those changes is going to be difficult so I am updating the tests first and then we can land the other changes in batches (because the tests will continue to pass as we do that). Note that I have only run the test suite on Linux AArch64, so there are probably more that need to be updated. We will catch those in CI or post-commit.
1 parent 248192d commit 6c16fc8

18 files changed

Lines changed: 39 additions & 43 deletions

File tree

lldb/test/API/commands/breakpoint/command/list/TestBreakpointCommandList.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@ def test_list_commands(self):
5252
self.expect(
5353
"breakpoint command list 2",
5454
error=True,
55-
startstr="error: '2' is not a currently valid breakpoint ID.",
55+
startstr="error: '2' is not a currently valid breakpoint ID",
5656
)

lldb/test/API/commands/command/container/TestContainerCommands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def container_add(self):
237237
self.expect(
238238
"test-multi test-multi-sub welcome friend",
239239
"did remove subcommand",
240-
substrs=["'test-multi-sub' does not have any subcommands."],
240+
substrs=["'test-multi-sub' does not have any subcommands"],
241241
error=True,
242242
)
243243
# We should have the new help:
@@ -262,6 +262,6 @@ def container_add(self):
262262
self.expect(
263263
"test-multi",
264264
"Root command gone",
265-
substrs=["'test-multi' is not a valid command."],
265+
substrs=["'test-multi' is not a valid command"],
266266
error=True,
267267
)

lldb/test/API/commands/command/delete/TestCommandDelete.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def test_delete_builtin(self):
1010
"command delete settings",
1111
error=True,
1212
substrs=[
13-
"'settings' is a permanent debugger command and cannot be removed."
13+
"'settings' is a permanent debugger command and cannot be removed"
1414
],
1515
)
1616

lldb/test/API/commands/command/invalid-args/TestInvalidArgsCommand.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def test_alias(self):
5454
"command alias blub foo",
5555
error=True,
5656
substrs=[
57-
"error: invalid command given to 'command alias'. 'foo' does not begin with a valid command. No alias created."
57+
"error: invalid command given to 'command alias'. 'foo' does not begin with a valid command. No alias created"
5858
],
5959
)
6060

@@ -87,7 +87,5 @@ def test_source(self):
8787
self.expect(
8888
"command source",
8989
error=True,
90-
substrs=[
91-
"'command source' takes exactly one executable filename argument."
92-
],
90+
substrs=["'command source' takes exactly one executable filename argument"],
9391
)

lldb/test/API/commands/expression/dont_allow_jit/TestAllowJIT.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def test_allow_jit_with_top_level(self):
9191
self.expect(
9292
"expr --allow-jit false --top-level -- int i;",
9393
error=True,
94-
substrs=["Can't disable JIT compilation for top-level expressions."],
94+
substrs=["Can't disable JIT compilation for top-level expressions"],
9595
)
9696

9797
self.build()

lldb/test/API/commands/frame/recognizer/TestFrameRecognizer.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ def test_frame_recognizer_1(self):
7373
self.expect(
7474
"frame recognizer delete 2",
7575
error=True,
76-
substrs=["error: '2' is not a valid recognizer id."],
76+
substrs=["error: '2' is not a valid recognizer id"],
7777
)
7878
self.expect(
7979
"frame recognizer delete 0",
8080
error=True,
81-
substrs=["error: '0' is not a valid recognizer id."],
81+
substrs=["error: '0' is not a valid recognizer id"],
8282
)
8383
# Recognizers should have the same state as above.
8484
self.expect(
@@ -448,45 +448,45 @@ def test_frame_recognizer_delete_invalid_arg(self):
448448
self.expect(
449449
"frame recognizer delete a",
450450
error=True,
451-
substrs=["error: 'a' is not a valid recognizer id."],
451+
substrs=["error: 'a' is not a valid recognizer id"],
452452
)
453453
self.expect(
454454
'frame recognizer delete ""',
455455
error=True,
456-
substrs=["error: '' is not a valid recognizer id."],
456+
substrs=["error: '' is not a valid recognizer id"],
457457
)
458458
self.expect(
459459
"frame recognizer delete -1",
460460
error=True,
461-
substrs=["error: '-1' is not a valid recognizer id."],
461+
substrs=["error: '-1' is not a valid recognizer id"],
462462
)
463463
self.expect(
464464
"frame recognizer delete 4294967297",
465465
error=True,
466-
substrs=["error: '4294967297' is not a valid recognizer id."],
466+
substrs=["error: '4294967297' is not a valid recognizer id"],
467467
)
468468

469469
@no_debug_info_test
470470
def test_frame_recognizer_info_invalid_arg(self):
471471
self.expect(
472472
"frame recognizer info a",
473473
error=True,
474-
substrs=["error: 'a' is not a valid frame index."],
474+
substrs=["error: 'a' is not a valid frame index"],
475475
)
476476
self.expect(
477477
'frame recognizer info ""',
478478
error=True,
479-
substrs=["error: '' is not a valid frame index."],
479+
substrs=["error: '' is not a valid frame index"],
480480
)
481481
self.expect(
482482
"frame recognizer info -1",
483483
error=True,
484-
substrs=["error: '-1' is not a valid frame index."],
484+
substrs=["error: '-1' is not a valid frame index"],
485485
)
486486
self.expect(
487487
"frame recognizer info 4294967297",
488488
error=True,
489-
substrs=["error: '4294967297' is not a valid frame index."],
489+
substrs=["error: '4294967297' is not a valid frame index"],
490490
)
491491

492492
@no_debug_info_test

lldb/test/API/commands/log/invalid-args/TestInvalidArgsLog.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ def test_enable_empty(self):
99
self.expect(
1010
"log enable",
1111
error=True,
12-
substrs=[
13-
"error: log enable takes a log channel and one or more log types."
14-
],
12+
substrs=["error: log enable takes a log channel and one or more log types"],
1513
)
1614

1715
@no_debug_info_test
@@ -20,7 +18,7 @@ def test_disable_empty(self):
2018
"log disable",
2119
error=True,
2220
substrs=[
23-
"error: log disable takes a log channel and one or more log types."
21+
"error: log disable takes a log channel and one or more log types"
2422
],
2523
)
2624

lldb/test/API/commands/process/signal/TestProcessSignal.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ def test_invalid_arg(self):
1515
self.expect(
1616
"process signal az",
1717
error=True,
18-
startstr="error: Invalid signal argument 'az'.",
18+
startstr="error: Invalid signal argument 'az'",
1919
)
2020
self.expect(
2121
"process signal 0x1ffffffff",
2222
error=True,
23-
startstr="error: Invalid signal argument '0x1ffffffff'.",
23+
startstr="error: Invalid signal argument '0x1ffffffff'",
2424
)
2525
self.expect(
2626
"process signal 0xffffffff",
2727
error=True,
28-
startstr="error: Invalid signal argument '0xffffffff'.",
28+
startstr="error: Invalid signal argument '0xffffffff'",
2929
)

lldb/test/API/commands/register/register_command/TestRegisters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ def test_write_unknown_register(self):
579579
self.expect(
580580
"register write blub 1",
581581
error=True,
582-
substrs=["error: Register not found for 'blub'."],
582+
substrs=["error: Register not found for 'blub'"],
583583
)
584584

585585
def test_info_unknown_register(self):
@@ -589,7 +589,7 @@ def test_info_unknown_register(self):
589589
self.expect(
590590
"register info blub",
591591
error=True,
592-
substrs=["error: No register found with name 'blub'."],
592+
substrs=["error: No register found with name 'blub'"],
593593
)
594594

595595
def test_info_many_registers(self):

lldb/test/API/commands/target/modules/search-paths/insert/TestTargetModulesSearchpathsInsert.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ def test_invalid_arg(self):
1414
self.expect(
1515
"target modules search-paths insert -1 a b",
1616
error=True,
17-
startstr="error: <index> parameter is not an integer: '-1'.",
17+
startstr="error: <index> parameter is not an integer: '-1'",
1818
)
1919

2020
self.expect(
2121
"target modules search-paths insert abcdefx a b",
2222
error=True,
23-
startstr="error: <index> parameter is not an integer: 'abcdefx'.",
23+
startstr="error: <index> parameter is not an integer: 'abcdefx'",
2424
)

0 commit comments

Comments
 (0)