From nobody Mon Feb 9 00:55:09 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 503A941C2E4 for ; Wed, 4 Feb 2026 14:55:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770216917; cv=none; b=CrYkN/YMSoRZ6REFGqBa9cG0WtBYFLFXktaiTZ/338kPUXlozk106xPDI/TQEgVeBvDho5tw9Kn/70SCmnFSX52Z4QOUfb13IYWiQJPurBMbMP+nipgQcINSYVj4r/7M1MNhLdHKTKmyKkVessCcHjJjqNIoJqywWsPOA1Gk2P4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770216917; c=relaxed/simple; bh=iEhhcJ2x8m7qLdgs93Q1jzeQeoShFixGz5NGOxbtWK8=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WwQaw94Fl468+dFXFb31v8TbN7zT6ufGukadBdJ/Qz5gkJhGyMo0czmjFFR+OKGYlyV5Kk9ObhBFmeav99uvj6Zs5aOnbKbSI1S+1sHlpkmIAs+TcHPA9YUZ3PnKtAKWKRN0AViuxcJCsFAD+kVk13r/uUfSC/ApUdECgC1hLEs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=JjlOxFtJ; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="JjlOxFtJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1770216916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=y0JzYhi+/A6H34SSd4lFWPfJJhN4jIR9kEhWAeuzvLE=; b=JjlOxFtJEPp9YuHCiRixpPapAKDMlinkN1w7/TLXNHaEa2luUs9EkuywIC98pJweZ/Kfv8 /VlBhrJKCctabgnWr0EyTP/9pZoJFzljd1D2NgWKqmgI6BHt/8zZWlIBgepUp1B4LkT9UR me2V/sArsE93mkvy/rd378Aoou5sHJY= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-14-sCtI_f4lOR-AKj6iCwzPjA-1; Wed, 04 Feb 2026 09:55:14 -0500 X-MC-Unique: sCtI_f4lOR-AKj6iCwzPjA-1 X-Mimecast-MFC-AGG-ID: sCtI_f4lOR-AKj6iCwzPjA_1770216913 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E53A81955F3B; Wed, 4 Feb 2026 14:55:12 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.22.88.140]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6C78130001A5; Wed, 4 Feb 2026 14:55:10 +0000 (UTC) From: Wander Lairson Costa To: Steven Rostedt , Gabriele Monaco , Nam Cao , Wander Lairson Costa , linux-trace-kernel@vger.kernel.org (open list:RUNTIME VERIFICATION (RV)), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 16/20] rv/rvgen: extract node marker string to class constant Date: Wed, 4 Feb 2026 11:42:42 -0300 Message-ID: <20260204144914.104028-17-wander@redhat.com> In-Reply-To: <20260204144914.104028-1-wander@redhat.com> References: <20260204144914.104028-1-wander@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Content-Type: text/plain; charset="utf-8" Add a node_marker class constant to the Automata class to replace the hardcoded "{node" string literal used throughout the DOT file parsing logic. This follows the existing pattern established by the init_marker and invalid_state_str class constants in the same class. The "{node" string is used as a marker to identify node declaration lines in DOT files during state variable extraction and cursor positioning. Extracting it to a named constant improves code maintainability and makes the marker's purpose explicit. Signed-off-by: Wander Lairson Costa Reviewed-by: Gabriele Monaco --- tools/verification/rvgen/rvgen/automata.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/verification/rvgen/rvgen/automata.py b/tools/verificatio= n/rvgen/rvgen/automata.py index 17b012b868531..270a3d0bf4ce7 100644 --- a/tools/verification/rvgen/rvgen/automata.py +++ b/tools/verification/rvgen/rvgen/automata.py @@ -27,6 +27,7 @@ class Automata: =20 invalid_state_str =3D "INVALID_STATE" init_marker =3D "__init_" + node_marker =3D "{node" =20 def __init__(self, file_path, model_name=3DNone): self.__dot_path =3D file_path @@ -72,7 +73,7 @@ class Automata: for cursor, line in enumerate(self.__dot_lines): split_line =3D line.split() =20 - if len(split_line) and split_line[0] =3D=3D "{node": + if len(split_line) and split_line[0] =3D=3D self.node_marker: return cursor =20 raise AutomataError("Could not find a beginning state") @@ -87,9 +88,9 @@ class Automata: continue =20 if state =3D=3D 0: - if line[0] =3D=3D "{node": + if line[0] =3D=3D self.node_marker: state =3D 1 - elif line[0] !=3D "{node": + elif line[0] !=3D self.node_marker: break else: raise AutomataError("Could not find beginning event") @@ -111,7 +112,7 @@ class Automata: # process nodes for line in islice(self.__dot_lines, cursor, None): split_line =3D line.split() - if not split_line or split_line[0] !=3D "{node": + if not split_line or split_line[0] !=3D self.node_marker: break =20 raw_state =3D split_line[-1] --=20 2.52.0