From nobody Mon Jun 8 04:20:18 2026 Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A48D3E5A2E for ; Tue, 2 Jun 2026 15:52:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780415548; cv=none; b=WX67ttOihDYZ4lxbnJV8oST1K0bd286RlI/bu4wKb1zGutY8Ju8aToNw+9Rgga9WpXT0JOCvj88V7z6p/Wb/ETPLQzxh+V6dM85j+Xuyg8MdP3eF7+A/P+Ufo1Xy6B+lOOEfNuhDn/0GTmPoazJfN1EiKd9N2+GkmLNWYCblrxo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780415548; c=relaxed/simple; bh=FYckr4FFZBlaLk+9y89W4SP3wfP6O5lMdB+oeUjRrYo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Nfyo+PIbrIKfEgyo2QZtMB2bibrumgoIOF5oIuHXsKIbTX2mcDliUvOC5Dx+vwJcH0zcb0uWP6MJs6UIWvtj2oNcfvwKCfoNH4gC/ZWZEtg+MSIEubfpf9Dv95oFpuS5Jn2FDCBMeMXPA6y2/3/LNFoQDKTiTEU7q49e1p6rSL8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=fTJ8SgZP; arc=none smtp.client-ip=209.85.160.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fTJ8SgZP" Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-5176bbb9384so8679131cf.1 for ; Tue, 02 Jun 2026 08:52:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780415546; x=1781020346; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=GS7uQD7/dVRcIOKlI8X91PbNQiNSL1LkFvltxQgrYVM=; b=fTJ8SgZPZSrvzTLLgCael4g/dVYyM1BB2Jlr3GYcWGhN7R96G9kzZKla3Htbxsp0Nh /8+hHlwR2PmFYVPs5djWU6f/hcXKTVZ98h9hULiP68kTtGkN9LGlzKVaXfld8qX02QPw Tjapw/PnwRnD25Gw5Jgvmph875vfT/Ft1fYrDgyPmWgS7XVatBSz8mUKc/V/AmVwMO+C s2kKBtNiTWE1bcEBakAOyVqLgsuIdRyVeVGLfMWHvhY6SyIxwrPGg/m/VPiiflVykIE6 QgKVhP/NnO6oGMf0zGXLVeeaySOKCD7/bF65or14RnyO4BZUL6gnvkvN/agJQUOx9ZhT OV2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780415546; x=1781020346; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GS7uQD7/dVRcIOKlI8X91PbNQiNSL1LkFvltxQgrYVM=; b=IDyYDRuJzc6v0BU3CcEEC2RQaM7WHxTNLQacWvAQvQCenJ1wwAgKMz2jYFBJDaM7dr aGyZcSVf5G6TmQiMljr6dW7KkS7wBG+6IAMpeuNRxdsqss/LTXEDmB9OAJ0eAcjzwGQ2 vrlPQ9qUMSx8CSYUqctAJHF5YlVt54ffRfO7GClr8UVkVadYrSbXpK6Xzna0d5CtQdFe rNVfjc/AQjsh0jUnezvytS6BlKTyqq2rOgpPnTFpAciV274Q/MMq/1LYmwaOdPpI/P05 sNcP3lvxDVm3LEJfi0pRv7S2ZoLKmLkc4KnC/e7Dsmsx8JOUH8KUFnVR3B95lDH6LklE wPXQ== X-Forwarded-Encrypted: i=1; AFNElJ9yrmtWnszRDLWpq762UfWG9E9qIy9vGXMLGfkEIsCsxzkBXXKxsOZ75KnHhvKmFK7UHTJuTtNZLCuF6Ig=@vger.kernel.org X-Gm-Message-State: AOJu0YwcEwP2wyfFNpDrxfj0BrxHfCXwMEZxcieBiFoO5Zz6EdlhitYO +23fu9qlHib1pYh5wPoNyRiYosE4xMg3bQRph4TwKcMzhkkbMbUz/cef X-Gm-Gg: Acq92OGAW0D/24gzTteUtjRnNPfCb/kHxY+Ida8B1uqj/G83ml6AlbHHzaeFwySreCD LawBh9mXV/sXwssdATkBZil29OYCb/g4ldVB4s6bLdg//x4CMsGFAlxhwuuLM1oDuW9+MfMeRDp J0VDsi9puAaWKDKBZrkyKqBpMZ5XdTja+KBNcuNAswgLgU4ukTZSdGra9FVBRNWYrbYCBAvy3V+ WPsjXWaycPZ4Pb/t8pZ2a/Ak7hiEvooD0xug76pGtejQo9BDZJ3AVDht4JTaNRZ3DND3+zqZR5R fne5U3A+kN7wtUycjCDqBflIEJEy3l6z9P1H08kip2tauYQKz15Tq35nsfuPVjE6/ISzh0z7Fa/ xw/XiKNYDGxD1zzIuDR1CC04FNKoradLdi06FFaxSXTMvU00YSBFn3NTzm+jwAXtfs4/Fzu4690 uwyjvoAD9TdHfU5KDWS75LjnyVFcowZuojA4kMUHRjrXODVSOLTqQ1HpW/uBQK+ElfQWYcsDZMz 1J5mDU6heKCiv4jHSHtsl7Fwh1lnQ== X-Received: by 2002:a05:622a:c6:b0:517:63a6:e1bb with SMTP id d75a77b69052e-51763a6e8d3mr81558651cf.39.1780415546238; Tue, 02 Jun 2026 08:52:26 -0700 (PDT) Received: from Cumhall.redhat.com ([216.209.112.32]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-51775e27cc7sm1520351cf.29.2026.06.02.08.52.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2026 08:52:25 -0700 (PDT) Sender: John Kacur From: John Kacur To: linux-trace-kernel@vger.kernel.org Cc: Steven Rostedt , Tomas Glozar , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] rtla/timerlat: Add tests for option parsing with attached arguments Date: Tue, 2 Jun 2026 11:52:08 -0400 Message-ID: <20260602155210.60439-2-jkacur@redhat.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260602155210.60439-1-jkacur@redhat.com> References: <20260602155210.60439-1-jkacur@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 Content-Type: text/plain; charset="utf-8" Add tests to verify that numeric arguments work correctly with both attached and detached formats: -p 100 (short with space) -p100 (short without space) --period=3D100 (long with =3D) --period 100 (long with space) These tests prevent regression of the bug fixed in commit eefa8af46ff7 ("rtla/timerlat: Fix parsing of short options with attached arguments") where -p100 was incorrectly parsed as multiple separate options. The tests verify that: 1. All four argument formats succeed (exit code 0) 2. None trigger the "no-irq and no-thread" error that occurred when the bug was present Assisted-by: Claude:claude-sonnet-4-5 Signed-off-by: John Kacur --- tools/tracing/rtla/tests/timerlat.t | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/tracing/rtla/tests/timerlat.t b/tools/tracing/rtla/tests= /timerlat.t index fd4935fd7b49..1a63301f5d70 100644 --- a/tools/tracing/rtla/tests/timerlat.t +++ b/tools/tracing/rtla/tests/timerlat.t @@ -42,6 +42,16 @@ check "verify -c/--cpus" \ check "hist test in nanoseconds" \ "timerlat hist -i 2 -c 0 -n -d 10s" 2 "ns" =20 +# Option parsing tests - verify attached numeric arguments work correctly +check "verify -p with space" \ + "timerlat hist -p 100 -c 0 -d 1s" 0 "" "no-irq and no-thread" +check "verify -p without space (attached argument)" \ + "timerlat hist -p100 -c 0 -d 1s" 0 "" "no-irq and no-thread" +check "verify --period with equals" \ + "timerlat hist --period=3D100 -c 0 -d 1s" 0 "" "no-irq and no-thread" +check "verify --period with space" \ + "timerlat hist --period 100 -c 0 -d 1s" 0 "" "no-irq and no-thread" + # Actions tests check "trace output through -t" \ "timerlat hist -T 2 -t" 2 "^ Saving trace to timerlat_trace.txt$" --=20 2.54.0 From nobody Mon Jun 8 04:20:18 2026 Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 634D33F1ACE for ; Tue, 2 Jun 2026 15:52:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780415549; cv=none; b=W+QOuVSZQ3qUIr+HAPtNsB1CuJSHH1/WUiy+h3B9u26oCSahV/5xP0yzEaios9hboV2euSZzkfLm4887OxP0aoU6p40/jsOafg5jNC+iUTCXpxEpY0+GDccdUA8vSWH8PcfTXgcMcgNY5Ilvvz4l6ZM0UpBnG52KPArvNg6cvPs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780415549; c=relaxed/simple; bh=GwT9o00dmaLqOv61Un1yDWpqIcsCAtOZcLhfVIcYHpI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QqLz6kKuS4AcNM0r9gI4vRXjswP/hZgdfZdvAa/yKHF6DXn2xi/Oyy4iBNN1KqqrGo3lF8dGC/MS9sJUWivv4WmTiKIbtJYvs9iTHjpnE2NIVnkqhGlJNcI2rcaSREBTLU2cAlrAKiA0FDunKUkXyP0Bu3clagWfUUfelkcbtWw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=C8FdeZre; arc=none smtp.client-ip=209.85.160.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="C8FdeZre" Received: by mail-qt1-f176.google.com with SMTP id d75a77b69052e-517760dc3c2so500821cf.3 for ; Tue, 02 Jun 2026 08:52:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780415547; x=1781020347; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=BzVQlUS6Ma27cMpUQ+7FK5Q0dPa4ejPpWzIeqaSTbGc=; b=C8FdeZresXpX7RR+sTmfJxQtbZaxg3GKb+78FnRrOXIahPM7dUOzs0r/mVBZ1JFPmn eISxfntHtLTFHesDKr4+l5jdCzrnGgvh7DEhgKgPqWgD6a0Hqu+ZsMrffTzU1l8mnCqz 4ULDDZpD/L/oo3Ob+lUma/NIgaJouknHzPTwXY/MtRQH2Px+oMmjRKFDWE1FEdVGWtA2 imNnnVnCkxkPw0XbK9co46nq1sCW8ByJ3uWCNabnqB+xsRxl5yIlrQWirMi2D/vqck3I TdDKwoMyvacT8wy/hWYrki1IFDmExo/is2y0MIHWqm8WBVUdKTn4VrV3i73xoRsOSwJa hPyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780415547; x=1781020347; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BzVQlUS6Ma27cMpUQ+7FK5Q0dPa4ejPpWzIeqaSTbGc=; b=L/Z8kGhze7OSfASKLZ6GTlVZ/8Q074PkzrFf3f4IMFE1hjT8aucZA9xvf+lkV93bp3 9NcbtkjX7VGLDS7gdyM5QATsa4yS3AN8TM7hJIMKeg5kesmfSyPEN9Hd3tvx/7msfrY9 /YPMhiW2zgv8X1uE9DNVVPbTt+RrxxU4qF8xrZscfQXpQ8vVQ9os7xS4iC8GVspC6y0M 8BXn94qWDkcNn15pD3MwPK1qCLZuNrn++Xl3s86st3qezWubC/cgL/T5OLW2gqJU70j3 X7xFKDbd8XCcIx3LkwKnXJSn1OQzyNvSq4ziZaDMLcQDkFD5ELlIITSHyKWpWQ8dtudH 38yA== X-Forwarded-Encrypted: i=1; AFNElJ97gUlDZ/ooj6/43BohfihPoV5qc/SQy/rqrUjmk4BnWFfPqeUAyT/9ITU+yotT/5Csw5T0Hq8hTE8yiNk=@vger.kernel.org X-Gm-Message-State: AOJu0YxxHJXxYSrhsgUd7rdgQ7kcf3X+6zlRk+7AFVPvhFqv94hGA0Nh PUYB7Hjhjl/7fGVrc8Z4PkJVjY7Zr7G9SX1/kizVA54+kPtbr/zCVsMubn8Uhw== X-Gm-Gg: Acq92OHkPsoDwgQq3+U7xz+rjTlzO7J/3nc00uFcKPaiWStCZjLBuLgIYiRfvR1h2SJ j0UyxQWdHe8E5zev23YmVioUMZXHVa9BCSTC81HJ9/xSqwQNokluG1eqnkcjzkMdupgwbk+SJNL 3svlBiIV9gv/i+PvlE1oV23ahv0lYw9/Jpr7OcaZkV4jRPfha8qDhV2Deo1n2FgxAXOC2Gf6l1c KPXof6+MfQhprJPjYsG6prMCfxYte4/018GKbehKBode2smiRxaOGRTGnC4A7g4Id8k9xhUxRKm cp1vMlQ3IIsiVzBz1Fi04sUKpRJ5z5zhFrI929QjJWVSoRyuxOyp2iFuHOn/SVhXLx207F+YkP1 GAw0fI2qW7LoIUaSv+pBPX7EdiqHyRRw3VjPACzSlEO/L/K1UlPmFDNu1tVA4WgBMLqlYZyH2eF na2zdxqC7W9PobgQt9mQi6EZ8pc/z2lzcJZ1qRM44y/Nq4X5zTWDxgNAaSgNMbqgQkAw5czWt9s levPJy3xFN6vi96/tz6FNEqE1TgoA== X-Received: by 2002:a05:622a:6843:10b0:516:e74e:cc51 with SMTP id d75a77b69052e-5173a85c1aemr185342511cf.51.1780415547263; Tue, 02 Jun 2026 08:52:27 -0700 (PDT) Received: from Cumhall.redhat.com ([216.209.112.32]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-51775e27cc7sm1520351cf.29.2026.06.02.08.52.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2026 08:52:26 -0700 (PDT) Sender: John Kacur From: John Kacur To: linux-trace-kernel@vger.kernel.org Cc: Steven Rostedt , Tomas Glozar , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] rtla: Add tests for option parsing with attached arguments Date: Tue, 2 Jun 2026 11:52:09 -0400 Message-ID: <20260602155210.60439-3-jkacur@redhat.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260602155210.60439-1-jkacur@redhat.com> References: <20260602155210.60439-1-jkacur@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 Content-Type: text/plain; charset="utf-8" Add tests to verify that short options with attached numeric arguments work correctly for all rtla commands after the parsing fixes. Tests verify four formats for each command: - Short option with space: -p 100 - Short option attached: -p100 - Long option with equals: --period=3D100 - Long option with space: --period 100 For osnoise and hwnoise commands, the tests also include -r 100 (runtime) to satisfy the osnoise constraint that runtime <=3D period. These tests complement the existing timerlat hist tests added in commit d489b602c669 ("rtla/timerlat: Add tests for option parsing with attached arguments"). Assisted-by: Claude:claude-sonnet-4-5 Signed-off-by: John Kacur --- tools/tracing/rtla/tests/hwnoise.t | 10 ++++++++++ tools/tracing/rtla/tests/osnoise.t | 18 ++++++++++++++++++ tools/tracing/rtla/tests/timerlat.t | 8 ++++++++ 3 files changed, 36 insertions(+) diff --git a/tools/tracing/rtla/tests/hwnoise.t b/tools/tracing/rtla/tests/= hwnoise.t index 23ce250a6852..c61f02bc42fe 100644 --- a/tools/tracing/rtla/tests/hwnoise.t +++ b/tools/tracing/rtla/tests/hwnoise.t @@ -19,4 +19,14 @@ check "enable a trace event trigger" \ "hwnoise -t -e osnoise:irq_noise --trigger=3D\"hist:key=3Ddesc,duration:s= ort=3Ddesc,duration:vals=3Dhitcount\" -d 10s" \ 0 "Saving event osnoise:irq_noise hist to osnoise_irq_noise_hist.txt" =20 +# Option parsing tests - verify attached numeric arguments work correctly +check "verify -p with space" \ + "hwnoise -p 100 -r 100 -c 0 -d 1s" 0 "" "no-irq and no-thread" +check "verify -p without space (attached argument)" \ + "hwnoise -p100 -r 100 -c 0 -d 1s" 0 "" "no-irq and no-thread" +check "verify --period with equals" \ + "hwnoise --period=3D100 -r 100 -c 0 -d 1s" 0 "" "no-irq and no-thread" +check "verify --period with space" \ + "hwnoise --period 100 -r 100 -c 0 -d 1s" 0 "" "no-irq and no-thread" + test_end diff --git a/tools/tracing/rtla/tests/osnoise.t b/tools/tracing/rtla/tests/= osnoise.t index 396334608920..1807236431df 100644 --- a/tools/tracing/rtla/tests/osnoise.t +++ b/tools/tracing/rtla/tests/osnoise.t @@ -17,6 +17,24 @@ check "verify the --trace param" \ check "verify the --entries/-E param" \ "osnoise hist -P F:1 -c 0 -r 900000 -d 10s -b 10 -E 25" =20 +# Option parsing tests - verify attached numeric arguments work correctly +check "verify -p with space" \ + "osnoise hist -p 100 -r 100 -c 0 -d 1s" 0 "" "no-irq and no-thread" +check "verify -p without space (attached argument)" \ + "osnoise hist -p100 -r 100 -c 0 -d 1s" 0 "" "no-irq and no-thread" +check "verify --period with equals" \ + "osnoise hist --period=3D100 -r 100 -c 0 -d 1s" 0 "" "no-irq and no-threa= d" +check "verify --period with space" \ + "osnoise hist --period 100 -r 100 -c 0 -d 1s" 0 "" "no-irq and no-thread" +check "verify osnoise top -p with space" \ + "osnoise top -p 100 -r 100 -c 0 -d 1s -q" 0 "" "no-irq and no-thread" +check "verify osnoise top -p without space (attached argument)" \ + "osnoise top -p100 -r 100 -c 0 -d 1s -q" 0 "" "no-irq and no-thread" +check "verify osnoise top --period with equals" \ + "osnoise top --period=3D100 -r 100 -c 0 -d 1s -q" 0 "" "no-irq and no-thr= ead" +check "verify osnoise top --period with space" \ + "osnoise top --period 100 -r 100 -c 0 -d 1s -q" 0 "" "no-irq and no-threa= d" + # Test setting default period by putting an absurdly high period # and stopping on threshold. # If default period is not set, this will time out. diff --git a/tools/tracing/rtla/tests/timerlat.t b/tools/tracing/rtla/tests= /timerlat.t index 1a63301f5d70..506227412027 100644 --- a/tools/tracing/rtla/tests/timerlat.t +++ b/tools/tracing/rtla/tests/timerlat.t @@ -51,6 +51,14 @@ check "verify --period with equals" \ "timerlat hist --period=3D100 -c 0 -d 1s" 0 "" "no-irq and no-thread" check "verify --period with space" \ "timerlat hist --period 100 -c 0 -d 1s" 0 "" "no-irq and no-thread" +check "verify timerlat top -p with space" \ + "timerlat top -p 100 -c 0 -d 1s -q" 0 "" "no-irq and no-thread" +check "verify timerlat top -p without space (attached argument)" \ + "timerlat top -p100 -c 0 -d 1s -q" 0 "" "no-irq and no-thread" +check "verify timerlat top --period with equals" \ + "timerlat top --period=3D100 -c 0 -d 1s -q" 0 "" "no-irq and no-thread" +check "verify timerlat top --period with space" \ + "timerlat top --period 100 -c 0 -d 1s -q" 0 "" "no-irq and no-thread" =20 # Actions tests check "trace output through -t" \ --=20 2.54.0