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 602763DD53B for ; Tue, 26 May 2026 10:25:57 +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=1779791158; cv=none; b=rtcnqS1HU3Ue6+5LXf1vpXooNac5vcEFGsP0Gf+l6IK5J8UM1VDmO7ZHATZhm/YliUdpTxSHF6hKeaaiM+Y7UgAHKiMS9vUsoWgWtOe/HXs5EB6/F2KNEv74KvWOfYtpLwtHgdumNAdVwfWm2yQWA7EDYKr31HhgrBj4Qy+73fE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779791158; c=relaxed/simple; bh=xyWil9E/hfSTf4YL19B3p4uMvIYW8HK03xdRDohahEw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZqPgyP3QuDb9uDnlGYIP8a/aicggXBi7286AHvx8CeDYp167r3eoFX9MGt6iU1q5/niQ9UKnO6tNpcLhH+GLh0cZpVsXK+dvITaD4iBCugr4WSTVJcjWNmx+b5F80Q3E1YyrX2m294cKU7kQNLNGc3hv1w8ZM0kfJin2II04RGQ= 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=iwxzRwc5; 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="iwxzRwc5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779791156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xWyDT3+amO0hhbiASLQR0GkSPDynWEZVnuJh4CmBXZ8=; b=iwxzRwc5wDwl7MKjJzytT+yNbKpwfUciinw3SmEZdhTZ3esM5PGOILVF2PnywlekG/C1KO o75P/xJQ9RPI6WsDlGmw9l0+SAnVztNSeI3/4HNN/gHKm1sg40QrQpYs5eYW0e5Ffpf4V0 dZjFCZhdQqNZ46aeKj78dhZb/7cRxbA= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-681-oNcjpHB6NMSp5TubGu0bxA-1; Tue, 26 May 2026 06:25:53 -0400 X-MC-Unique: oNcjpHB6NMSp5TubGu0bxA-1 X-Mimecast-MFC-AGG-ID: oNcjpHB6NMSp5TubGu0bxA_1779791152 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6C8701800371; Tue, 26 May 2026 10:25:52 +0000 (UTC) Received: from fedora.brq.redhat.com (unknown [10.43.17.109]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3AB911956056; Tue, 26 May 2026 10:25:49 +0000 (UTC) From: Tomas Glozar To: Steven Rostedt , Tomas Glozar Cc: John Kacur , Luis Goncalves , Crystal Wood , Costa Shulyupin , Wander Lairson Costa , LKML , linux-trace-kernel Subject: [PATCH 4/4] rtla/tests: Add runtime tests for restoring continue flag Date: Tue, 26 May 2026 12:25:23 +0200 Message-ID: <20260526102523.2662391-4-tglozar@redhat.com> In-Reply-To: <20260526102523.2662391-1-tglozar@redhat.com> References: <20260526102523.2662391-1-tglozar@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: 8bit X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 In case an action preceding the continue action fails, not only the continue flag should not be set, it should be unset if it was set from a previous run of actions_perform(). Add a runtime test to both osnoise and timerlat tools that checks that this works properly by creating a temporary file. Signed-off-by: Tomas Glozar --- Depends on "rtla/tests: Extend runtime test coverage" patchset - https://lore.kernel.org/linux-trace-kernel/20260423130558.882022-1-tglozar@redhat.com/ tools/tracing/rtla/tests/osnoise.t | 2 ++ tools/tracing/rtla/tests/timerlat.t | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tools/tracing/rtla/tests/osnoise.t b/tools/tracing/rtla/tests/osnoise.t index 9c2f84a4187d..a7956ab605cd 100644 --- a/tools/tracing/rtla/tests/osnoise.t +++ b/tools/tracing/rtla/tests/osnoise.t @@ -65,6 +65,8 @@ check "top stop at failed action" \ "osnoise top -S 2 --on-threshold shell,command='echo -n abc; false' --on-threshold shell,command='echo -n defgh'" 2 "^abc" "defgh" check_top_q_hist "with continue" \ "osnoise TOOL -S 2 -d 5s --on-threshold shell,command='echo TestOutput' --on-threshold continue" 0 "^TestOutput$" +check_top_q_hist "with conditional continue" \ + "osnoise TOOL -S 2 --on-threshold shell,command='if [ -f a ]; then echo 2; exit 1; else echo -n 1; touch a; fi' --on-threshold continue" 2 "^12$" "^2$" check_top_hist "with trace output at end" \ "osnoise TOOL -d 1s --on-end trace" 0 "^ Saving trace to osnoise_trace.txt$" diff --git a/tools/tracing/rtla/tests/timerlat.t b/tools/tracing/rtla/tests/timerlat.t index f3e5f99e862b..19fd5af26ebb 100644 --- a/tools/tracing/rtla/tests/timerlat.t +++ b/tools/tracing/rtla/tests/timerlat.t @@ -94,6 +94,8 @@ check "top stop at failed action" \ "timerlat top -T 2 --on-threshold shell,command='echo -n abc; false' --on-threshold shell,command='echo -n defgh'" 2 "^abc" "defgh" check_top_q_hist "with continue" \ "timerlat TOOL -T 2 -d 5s --on-threshold shell,command='echo TestOutput' --on-threshold continue" 0 "^TestOutput$" +check_top_q_hist "with conditional continue" \ + "timerlat TOOL -T 2 --on-threshold shell,command='if [ -f a ]; then echo 2; exit 1; else echo -n 1; touch a; fi' --on-threshold continue" 2 "^12$" "^2$" check_top_hist "with trace output at end" \ "timerlat TOOL -d 1s --on-end trace" 0 "^ Saving trace to timerlat_trace.txt$" -- 2.54.0