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.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 6867E3C3440 for ; Mon, 30 Mar 2026 11:10:46 +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=1774869051; cv=none; b=t+SleK2IFiB9OM7dAL5PTaTI88lVjgtBJ2lEiJ9L0rO1pwyLvRlAARri/B+6wylvn1NGrCT0XNh89ZiWSzNG/7PRi0v1uMEYiP1W/1pD4hj9VgZo0rnei2iK7n8/5LM6ITXvYadDuh+ld218xWCBAhWVe9cdLy+HNl5i7yEk87s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774869051; c=relaxed/simple; bh=a4n9PftMlNB7rKCCoh4xp0siqrVkP4yQIWAE2+E6GTo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:content-type; b=Bakl7Xf1pKnP/JPgpbZVi2XGqS1CKdu9NMyFUUiqpwDjemWXqWP4z5+Obg29p6zQN7hdV5+WEGA93I0QK2YgNO4L8QW+J9+JVaRfBpKkzp6PPf6O1vjQxwtd0PZZDgKep1NEnbZIgbKaqW79c87wDW3wJ9NAJvf85kWVbRU9keI= 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=ACN4cByX; 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="ACN4cByX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1774869044; 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; bh=OM0bJl9pG+Ua9ksmvzAhJaJKkad1m2QdACt5Oaei3vM=; b=ACN4cByXphRgMC+gYZ3h21XT7bJ90ZC7n/v+6GaJiUXbf6PjpSDO5vFS9HlsnKLT/P1QIb UOZHPI73o6FhURKimySgdySRX6OBuXKks0wQiq8UZfUuNGy/cso6wySuKqa5QVyKUQjhM4 w353SmjDbRrsHFnAbA4MjS2f8bgvaXs= Received: from mx-prod-mc-01.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-378-srDe_JSZOLaLIpodAL4ypQ-1; Mon, 30 Mar 2026 07:10:40 -0400 X-MC-Unique: srDe_JSZOLaLIpodAL4ypQ-1 X-Mimecast-MFC-AGG-ID: srDe_JSZOLaLIpodAL4ypQ_1774869037 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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 48AED195423B; Mon, 30 Mar 2026 11:10:37 +0000 (UTC) Received: from gmonaco-thinkpadt14gen3.rmtit.csb (unknown [10.44.33.13]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D272030001A1; Mon, 30 Mar 2026 11:10:33 +0000 (UTC) From: Gabriele Monaco To: linux-kernel@vger.kernel.org, Steven Rostedt , Nam Cao , Juri Lelli , Gabriele Monaco , linux-trace-kernel@vger.kernel.org Cc: Tomas Glozar , Clark Williams , John Kacur Subject: [PATCH v8 03/12] verification/rvgen: Allow spaces in and events strings Date: Mon, 30 Mar 2026 13:10:01 +0200 Message-ID: <20260330111010.153663-4-gmonaco@redhat.com> In-Reply-To: <20260330111010.153663-1-gmonaco@redhat.com> References: <20260330111010.153663-1-gmonaco@redhat.com> Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-MFC-PROC-ID: 3MjFnPj8T6xuHwTgCT_tXbRqD-Usy45znXtkbdI2d5I_1774869037 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true Currently the automata parser assumes event strings don't have any space, this stands true for event names, but can be a wrong assumption if we want to store other information in the event strings (e.g. constraints for hybrid automata). Adapt the parser logic to allow spaces in the event strings. Reviewed-by: Nam Cao Signed-off-by: Gabriele Monaco --- tools/verification/rvgen/rvgen/automata.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/verification/rvgen/rvgen/automata.py b/tools/verification/rvgen/rvgen/automata.py index 3f06aef8d4fd..34a2e2a6b217 100644 --- a/tools/verification/rvgen/rvgen/automata.py +++ b/tools/verification/rvgen/rvgen/automata.py @@ -127,14 +127,13 @@ class Automata: # ------------ event is here ------------^^^^^ if self.__dot_lines[cursor].split()[1] == "->": line = self.__dot_lines[cursor].split() - event = line[-2].replace('"','') + event = "".join(line[line.index("label")+2:-1]).replace('"', '') # when a transition has more than one lables, they are like this # "local_irq_enable\nhw_local_irq_enable_n" # so split them. - event = event.replace("\\n", " ") - for i in event.split(): + for i in event.split("\\n"): events.append(i) cursor += 1 @@ -167,8 +166,8 @@ class Automata: line = self.__dot_lines[cursor].split() origin_state = line[0].replace('"','').replace(',','_') dest_state = line[2].replace('"','').replace(',','_') - possible_events = line[-2].replace('"','').replace("\\n", " ") - for event in possible_events.split(): + possible_events = "".join(line[line.index("label")+2:-1]).replace('"', '') + for event in possible_events.split("\\n"): matrix[states_dict[origin_state]][events_dict[event]] = dest_state cursor += 1 -- 2.53.0