public inbox for dtrace@lists.linux.dev
 help / color / mirror / Atom feed
From: eugene.loh@oracle.com
To: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: [PATCH] test: Account again for variations in error messages
Date: Thu,  9 Oct 2025 23:13:38 -0400	[thread overview]
Message-ID: <20251010031338.4016-1-eugene.loh@oracle.com> (raw)

From: Eugene Loh <eugene.loh@oracle.com>

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 shorter error
message (without the "enumerator" label) and adjust one .r file
accordingly.

Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
---
 test/unittest/types/err.D_UNKNOWN.dupstruct.r | 2 +-
 test/utils/libctf.r.p                         | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/unittest/types/err.D_UNKNOWN.dupstruct.r b/test/unittest/types/err.D_UNKNOWN.dupstruct.r
index 762b24f4c..7afa74aa7 100644
--- a/test/unittest/types/err.D_UNKNOWN.dupstruct.r
+++ b/test/unittest/types/err.D_UNKNOWN.dupstruct.r
@@ -1,2 +1,2 @@
 -- @@stderr --
-dtrace: failed to compile script test/unittest/types/err.D_UNKNOWN.dupstruct.d: [D_UNKNOWN] line 17: failed to define member 'x': Duplicate member, enumerator, or variable name
+dtrace: failed to compile script test/unittest/types/err.D_UNKNOWN.dupstruct.d: [D_UNKNOWN] line 17: failed to define member 'x': Duplicate member or variable name
diff --git a/test/utils/libctf.r.p b/test/utils/libctf.r.p
index 8a6fd8b13..b7c8a5e04 100755
--- a/test/utils/libctf.r.p
+++ b/test/utils/libctf.r.p
@@ -3,10 +3,10 @@
 # http://oss.oracle.com/licenses/upl.
 
 # Possible 'enumerator' label.
-/Duplicate member or variable name/ { sub(/Duplicate member/, "&, enumerator,"); }
+/Duplicate member, enumerator, or variable name/ { sub(/ber, enumerator, or var/, "ber or var"); }
 
 # Possible trailing '.'.
-/Duplicate member, enumerator, or variable name\.$/ { sub(/\.$/, ""); }
+/Duplicate member or variable name\.$/ { sub(/\.$/, ""); }
 /Member name not found\.$/ { sub(/\.$/, ""); }
 
 # Could be union or struct.
-- 
2.47.3


             reply	other threads:[~2025-10-10  3:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-10  3:13 eugene.loh [this message]
2025-10-10  3:21 ` [PATCH] test: Account again for variations in error messages Kris Van Hees

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251010031338.4016-1-eugene.loh@oracle.com \
    --to=eugene.loh@oracle.com \
    --cc=dtrace-devel@oss.oracle.com \
    --cc=dtrace@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox