From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 6CA13E571 for ; Tue, 20 Jan 2026 13:11:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768914714; cv=none; b=AdExNgiZYCW157wBK7D/yCJ3wR2KEp6/ZxfoBm4lgcIs1qR+dxKHCYE/I+q4K4sorbAEqTokjoyTtA1T+09ER6qMLnxLrx6QbDl3yIHS9hZFLlxb+ZLCk4trrtdw02EtJNNiejvP+MOFd9Wfl5B4/NmGRy21NCZFybKS8lfZ5Tc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768914714; c=relaxed/simple; bh=IjmP9Ryi85s9+rZFklMkA94sn+toExpDe2wDripnhfc=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=fgbuvKpOYhN7jqGJHlkpOOsSvx65JmAn0RptbjNLn6gZRJEjSueriJ2YljG6CbxEscSRxAUiDzppx8aXnmt6HKDaW6j+cFevYDobvEGdmyVtJ/i5y2GJQWiekbuan4xlhhaFWaq5iZ2pnSbR9+hbKQqRhBgW2robA+ppzRxL40U= 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=JlVpGUgX; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=eQY8+nRn; arc=none smtp.client-ip=170.10.129.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="JlVpGUgX"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="eQY8+nRn" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1768914711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=IjmP9Ryi85s9+rZFklMkA94sn+toExpDe2wDripnhfc=; b=JlVpGUgXhudZELYlseStpguo5UR0JooToeaDL2+jLfFgEbzKBnGTd5npw27ePUZLYM8SyM r9rXyyu5uWLgGH6VmN6Umc1q5zNWcd0bjJMkBVK53aRffNOI3JE0aDR8r+XYXIRJTf5Ab9 lkLp/cxUCsV1Pdhqx/I+q7Ce8iHvsck= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-441-vc2uY0TvMemOTrutfTXLyg-1; Tue, 20 Jan 2026 08:11:50 -0500 X-MC-Unique: vc2uY0TvMemOTrutfTXLyg-1 X-Mimecast-MFC-AGG-ID: vc2uY0TvMemOTrutfTXLyg_1768914709 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-47edf8ba319so47128045e9.2 for ; Tue, 20 Jan 2026 05:11:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1768914709; x=1769519509; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id:from:to :cc:subject:date:message-id:reply-to; bh=IjmP9Ryi85s9+rZFklMkA94sn+toExpDe2wDripnhfc=; b=eQY8+nRngqdpgF0owwbn2g3gbex/74yGFqpWbrHD5GhQ8peJYr5+ijvOANZQUy8UUE Rx+4ZAFXsoLJA+R0uJu9R/lj6qC9/TWvXwxxeoDq+vvAhtxnLLCm5Byv0t6j5q2AE/pK 5Z/WBQel+gSNvWYbQKbxjmbsTdlDlBY1vVDGoD5cUg1ElE3A02JH97hFqfQkB7/ek2Uq 7zsvM95g70uvZ/OtWXnvVY9v6SAYAjUV21u9OibEl31Rlh/opDveBeZSA21SvrZSiA6x cezroggq73X2RarWCLd4xyj/R60fREM7vSwHEN++zsoQ0cFKrPyiCmaMbQPWZayq5oOz M2Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768914709; x=1769519509; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IjmP9Ryi85s9+rZFklMkA94sn+toExpDe2wDripnhfc=; b=K7f7zWajJngO3X/HVeO3BuPRJoPv8tXjk3h3fN33FdM2FfGe3gaRpNpFAb38ArRWD+ yYLTN2IHxRNgJ954xXrPfgSURvfT18geAd3mF2bogrcNnut/E5pqkyr/OXNcnqjaqfqp KyRdNkDgRMD0P7GyNyKsNG6dT0zG6+kt5skVQVrn43UkNz5xawexC2lN8EO9hEGTtEcD C1/CN+9woqEaKYbn0MAgCadS3MGaP/479L3hhnK7QnpVUELabx1j6ZBmN24Mz8lOOy4k +yf7QA6F1rxv4i1dVXsBQvgBkTdsorK/zcTH+lCPTsv+kT74ZipijIN+z85BaOBu6yWG sfEg== X-Forwarded-Encrypted: i=1; AJvYcCVxazuO58p9sf7VfbUMr4jjhkiXVWlRAvrYYNT40nkjDmNTKkZdMJ29b2YHLro9aVSHLHw+HU8NUZutX54=@vger.kernel.org X-Gm-Message-State: AOJu0YzQkJd5438MHAsjGEpMyWIiwzhrrGyR6grI/TALwx1Yt7lg5Lhp YW+R0nQw0tQR3enmfm+ZfQzPfBt96YHy9sIqSpwM8V5u5PNIWKsN5ACysdtEqsPcknVsRIM4dKE DOAbWBl4dNmFBeaW1C6Dx3BPmsc5oEzCtVbbXlh8aGZ2cjLxRs/bHKQl9Pnzjz3AQSg== X-Gm-Gg: AY/fxX5RCzuYTkb4TEGklcft11fmtaSsUHJadYuTBgzeXHKISkHwtwWcfXCauKCo7sG A/lduSSPAPbHWmpLDZHFqzqDcWa2AyyTnTmS+E2jmlWO/7IXMLhkjrKbx/0ibIQACZ8QOZVr+Sm DX+3hclZLuj/LGTGMe/FX/ahcNdz/ZQfkFw5qzgzn4TIsAYBq95+3//VjqISm/X1BePLDf2OcXk RdLI4pjLxKP+B96Of4UJbtAl6c7AEdHP+gKRlDz5oYMMVLvI+AWfbDIldABmBfQssZY2obbSa3t 9OKsCtSu9kvELamdIAenFhhzdFmrQCa8WBRblW8ju+4I2xGBsr7jEzMd+abF3tgQyDFgNE0mZ81 8iw5KlerBcD1cEFyLG2s6KrsLAO2PbG/sL9sclXCw0qBNFhdNw6sBLuvH+C3+oiJAskEecu07Y/ z3pWd2CvNz X-Received: by 2002:a05:600c:1f88:b0:47d:18b0:bb9a with SMTP id 5b1f17b1804b1-4803e801d8dmr22531765e9.33.1768914708834; Tue, 20 Jan 2026 05:11:48 -0800 (PST) X-Received: by 2002:a05:600c:1f88:b0:47d:18b0:bb9a with SMTP id 5b1f17b1804b1-4803e801d8dmr22531325e9.33.1768914708295; Tue, 20 Jan 2026 05:11:48 -0800 (PST) Received: from gmonaco-thinkpadt14gen3.rmtit.csb (185-132-178-103.hosted-by-worldstream.net. [185.132.178.103]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47f428b954esm302419555e9.7.2026.01.20.05.11.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jan 2026 05:11:47 -0800 (PST) Message-ID: Subject: Re: [PATCH 26/26] rv/rvgen: extract node marker string to class constant From: Gabriele Monaco To: Wander Lairson Costa Cc: Steven Rostedt , Nam Cao , open list , "open list:RUNTIME VERIFICATION (RV)" Date: Tue, 20 Jan 2026 14:11:46 +0100 In-Reply-To: <85c7d4762464e6a50b4318f4ea56a70202a4b287.camel@redhat.com> References: <20260119205601.105821-1-wander@redhat.com> <20260119205601.105821-27-wander@redhat.com> <0383d9a3fdaeb2b66e48a7857791bcbfe324958d.camel@redhat.com> <85c7d4762464e6a50b4318f4ea56a70202a4b287.camel@redhat.com> Autocrypt: addr=gmonaco@redhat.com; prefer-encrypt=mutual; keydata=mDMEZuK5YxYJKwYBBAHaRw8BAQdAmJ3dM9Sz6/Hodu33Qrf8QH2bNeNbOikqYtxWFLVm0 1a0JEdhYnJpZWxlIE1vbmFjbyA8Z21vbmFjb0BrZXJuZWwub3JnPoiZBBMWCgBBFiEEysoR+AuB3R Zwp6j270psSVh4TfIFAmjKX2MCGwMFCQWjmoAFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgk Q70psSVh4TfIQuAD+JulczTN6l7oJjyroySU55Fbjdvo52xiYYlMjPG7dCTsBAMFI7dSL5zg98I+8 cXY1J7kyNsY6/dcipqBM4RMaxXsOtCRHYWJyaWVsZSBNb25hY28gPGdtb25hY29AcmVkaGF0LmNvb T6InAQTFgoARAIbAwUJBaOagAULCQgHAgIiAgYVCgkICwIEFgIDAQIeBwIXgBYhBMrKEfgLgd0WcK eo9u9KbElYeE3yBQJoymCyAhkBAAoJEO9KbElYeE3yjX4BAJ/ETNnlHn8OjZPT77xGmal9kbT1bC1 7DfrYVISWV2Y1AP9HdAMhWNAvtCtN2S1beYjNybuK6IzWYcFfeOV+OBWRDQ== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.2 (3.58.2-1.fc43) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Tue, 2026-01-20 at 13:36 +0100, Gabriele Monaco wrote: > On Tue, 2026-01-20 at 08:34 -0300, Wander Lairson Costa wrote: > > On Tue, Jan 20, 2026 at 10:03:20AM +0100, Gabriele Monaco wrote: > > > On Mon, 2026-01-19 at 17:46 -0300, Wander Lairson Costa wrote: > > > > Add a node_marker class constant to the Automata class to replace t= he > > > > hardcoded "{node" string literal used throughout the DOT file parsi= ng > > > > logic. This follows the existing pattern established by the init_ma= rker > > > > and invalid_state_str class constants in the same class. > > > >=20 > > > > 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. > > > >=20 > > > > Signed-off-by: Wander Lairson Costa > > >=20 > > > Looks fine for me, thanks! > > >=20 > > > I wonder if we could merge this patch with 15/26 that is introducing = a > > > very > > > similar change on init_marker. > >=20 > > The idea was to make each patch doing one thing to make the reviewer's > > life easier (I think I broke my own rule in a couple of patch). But if > > there is a strong feeling about the merge, I could merged them in a > > possible v2 patch series. > >=20 >=20 > Yeah I get the idea, I guess I could just pick the most obvious patches a= nd > send > a PR to Steve before the merge window, so I can see directly if it makes = sense > to squash them and you don't need to send them all in the v2. Screamed victory too fast.. I tried the patches on the latest version of th= e tree (which reached already linux-next) and they're have several conflicts. I don't have time to rebase them one by one right now, let's continue with = this series as a whole. As a rule of thumb, considering these patches get first reviewed, then PR-e= d to Steve and then to Linus, I'd favour to lower the number if possible, but fe= el free to choose where it makes sense for them to stay separate. Thanks, Gabriele >=20 > I'm leaving the longer or trickier ones for the next cycle so that I can = test > them a bit better and perhaps get some rvgen selftest help with that. Als= o for > some it's better to wait for Nam's comments. >=20 > Will let you know the ones I pick. Thanks again for the extensive work! >=20 > Gabriele >=20 > > >=20 > > > Anyway: > > >=20 > > > Reviewed-by: Gabriele Monaco > > >=20 > > > > --- > > > > =C2=A0tools/verification/rvgen/rvgen/automata.py | 9 +++++---- > > > > =C2=A01 file changed, 5 insertions(+), 4 deletions(-) > > > >=20 > > > > diff --git a/tools/verification/rvgen/rvgen/automata.py > > > > b/tools/verification/rvgen/rvgen/automata.py > > > > index a6889d0c26c3f..5f23db1855cd3 100644 > > > > --- a/tools/verification/rvgen/rvgen/automata.py > > > > +++ b/tools/verification/rvgen/rvgen/automata.py > > > > @@ -29,6 +29,7 @@ class Automata: > > > > =C2=A0 > > > > =C2=A0=C2=A0=C2=A0=C2=A0 invalid_state_str =3D "INVALID_STATE" > > > > =C2=A0=C2=A0=C2=A0=C2=A0 init_marker =3D "__init_" > > > > +=C2=A0=C2=A0=C2=A0 node_marker =3D "{node" > > > > =C2=A0 > > > > =C2=A0=C2=A0=C2=A0=C2=A0 def __init__(self, file_path, model_name= =3DNone): > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self.__dot_path = =3D file_path > > > > @@ -76,7 +77,7 @@ class Automata: > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 for cursor, line i= n enumerate(self.__dot_lines): > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 split_line =3D line.split() > > > > =C2=A0 > > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= if len(split_line) and split_line[0] =3D=3D "{node": > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= if len(split_line) and split_line[0] =3D=3D self.node_marker: > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return cursor > > > > =C2=A0 > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 raise AutomataErro= r("Could not find a beginning state") > > > > @@ -91,9 +92,9 @@ class Automata: > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 continue > > > > =C2=A0 > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 if state =3D=3D 0: > > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 if line[0] =3D=3D "{node": > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 if line[0] =3D=3D self.node_marker: > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 state =3D 1 > > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= elif line[0] !=3D "{node": > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= elif line[0] !=3D self.node_marker: > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 break > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 else: > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 raise AutomataError("Could not find beginning event") > > > > @@ -116,7 +117,7 @@ class Automata: > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # process nodes > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 for line in islice= (self.__dot_lines, cursor, None): > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 split_line =3D line.split() > > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= if not split_line or split_line[0] !=3D "{node": > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= if not split_line or split_line[0] !=3D self.node_marker: > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 break > > > > =C2=A0 > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 raw_state =3D split_line[-1]