Skip to contentSkip to conversation

test: Account again for variations in error messages

PATCH In review [email protected] 2 participants 2 messages Oct 10, 2025 – Oct 13, 2025

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 test: Account again for variations in error messages

From: Eugene Loh <[email protected]>

In commit 944dac095 ("test: Account for variations in error messages"), an attempt was made to account for variations in error messages.

However, it was applied to the branch after commit 49e646183 ("test: dupstruct: fix extra duplicate identifier case"), and conflict resolution was not consistent. The earlier patch "standardized" messages by applying an optional "enumerator" where that label was missing; the subsequent patch did the opposite. Subsequently, some logic got messed up.

Fix up the logic. In particular, standardize on the newer error message (with the "enumerator" label).

---
 test/utils/libctf.r.p | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
test/utils/libctf.r.p +1 -1
index 8a6fd8b13..504d4b59e 100755
@@ -16,7 +16,7 @@
 /\[D_DECL_IDRED\] line [1-9][0-9]*: identifier redeclared: [a-zA-Z]*$/ {
 	sub(/\[D_DECL_IDRED\] line [1-9][0-9]*: .*$/, "expected error");
 }
-/\[D_UNKNOWN\] line [1-9][0-9]*: failed to define enumerator '[a-zA-Z]*': Duplicate member or variable name$/ {
+/\[D_UNKNOWN\] line [1-9][0-9]*: failed to define enumerator '[a-zA-Z]*': Duplicate member, enumerator, or variable name$/ {
 	sub(/\[D_UNKNOWN\] line [1-9][0-9]*: .*$/, "expected error");
 }
 
Signature · 1 line
2.47.3
Reviewed-by on v2 1/1
#1 lore raw
Quoted 12 lines · On Thu, Oct 09, 2025 at 11:50:03PM -0400, [email protected] wrote:

From: Eugene Loh <[email protected]>

In commit 944dac095 ("test: Account for variations in error messages"), an attempt was made to account for variations in error messages.

However, it was applied to the branch after commit 49e646183 ("test: dupstruct: fix extra duplicate identifier case"), and conflict resolution was not consistent. The earlier patch "standardized" messages by applying an optional "enumerator" where that label was missing; the subsequent patch did the opposite. Subsequently, some logic got messed up.

Quoted 4 lines

Fix up the logic. In particular, standardize on the newer error message (with the "enumerator" label).

Quoted 20 lines
---
 test/utils/libctf.r.p | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
test/utils/libctf.r.p +1 -1
index 8a6fd8b13..504d4b59e 100755
@@ -16,7 +16,7 @@
 /\[D_DECL_IDRED\] line [1-9][0-9]*: identifier redeclared: [a-zA-Z]*$/ {
 	sub(/\[D_DECL_IDRED\] line [1-9][0-9]*: .*$/, "expected error");
 }
-/\[D_UNKNOWN\] line [1-9][0-9]*: failed to define enumerator '[a-zA-Z]*': Duplicate member or variable name$/ {
+/\[D_UNKNOWN\] line [1-9][0-9]*: failed to define enumerator '[a-zA-Z]*': Duplicate member, enumerator, or variable name$/ {
 	sub(/\[D_UNKNOWN\] line [1-9][0-9]*: .*$/, "expected error");
 }
 
Signature · 1 line
2.47.3