From nobody Sat Feb 7 10:08:24 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 99D9E3BB28 for ; Fri, 15 Mar 2024 16:44:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710521051; cv=none; b=blLpXxWzIUwiI7tlbJxNnFh8CY9vyewPPktqcHNGsDGTpUGli+kLt9EaEBAFmQrM0bJYMqK6fV7Ru1a6M9lPuD5RdpYK0GW+5fzzouYYeDE++wGlPYZDlcYw38jwZsnYiEzh8Cuhn1tUnJCaOHVmdhazlB/UbdqebjYoQPWI0ws= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710521051; c=relaxed/simple; bh=754d/MCAy85ow4tVxawUX/SPqIUnGxfiIpLT0IQOX+s=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=ONdg/2czm8s/yrJwAMsouhn65n726rbmueR+Jl0utFGeujUHLn/lJ8kNHosd2P0P2Il8cMX8nBHBBQ0mmkzjoxyq2kgKchB7DmiVeq1EUFTp1/9o4e5DJuz5wwXh63RpUP3mbXRrtIGKsBH6w6LR1Pw3XK3/9TLJMpRWVOHxVFo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4527BC43390; Fri, 15 Mar 2024 16:44:11 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97) (envelope-from ) id 1rlAhN-000000033Ga-10Ou; Fri, 15 Mar 2024 12:46:25 -0400 Message-ID: <20240315164625.101518642@goodmis.org> User-Agent: quilt/0.67 Date: Fri, 15 Mar 2024 12:46:02 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: "John Warthog9 Hawley" Subject: [for-next][PATCH 1/2] ktest.pl: Process variables within variables References: <20240315164601.705819502@goodmis.org> 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" From: Steven Rostedt Allow a variable to contain another variable. This will allow the ${shell } to have its command include variables. Signed-off-by: Steven Rostedt --- tools/testing/ktest/ktest.pl | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 829f5bdfd2e4..4383729e0fc2 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -792,13 +792,13 @@ sub process_variables { my $retval =3D ""; =20 # We want to check for '\', and it is just easier - # to check the previous characet of '$' and not need + # to check the previous character of '$' and not need # to worry if '$' is the first character. By adding # a space to $value, we can just check [^\\]\$ and # it will still work. $value =3D " $value"; =20 - while ($value =3D~ /(.*?[^\\])\$\{(.*?)\}(.*)/) { + while ($value =3D~ /(.*?[^\\])\$\{([^\{]*?)\}(.*)/) { my $begin =3D $1; my $var =3D $2; my $end =3D $3; @@ -818,16 +818,20 @@ sub process_variables { # we simple convert to 0 $retval =3D "${retval}0"; } else { - # put back the origin piece. - $retval =3D "$retval\$\{$var\}"; + # put back the origin piece, but with $#### to not reprocess it + $retval =3D "$retval\$####\{$var\}"; # This could be an option that is used later, save # it so we don't warn if this option is not one of # ktests options. $used_options{$var} =3D 1; } - $value =3D $end; + $value =3D "$retval$end"; + $retval =3D ""; } - $retval =3D "$retval$value"; + $retval =3D $value; + + # Convert the saved variables with $####{var} back to ${var} + $retval =3D~ s/\$####/\$/g; =20 # remove the space added in the beginning $retval =3D~ s/ //; --=20 2.43.0 From nobody Sat Feb 7 10:08:24 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A9C953C680 for ; Fri, 15 Mar 2024 16:44:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710521051; cv=none; b=WwmornK7wG8ILS5Sn47yRVDpBR/ygC/iQqMf4b+o0h7Je2XUBjv0UAaINp0PF/a+qfbOhMeVh/X3sexbgvmmwVYKi89UgasKbTfybPzhAVM7xtYsdJOi4BaGYwNmBGTqlFtR6Qd4lR6k6JemRYumLazuFXXsPys1wTvM+IQofTU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710521051; c=relaxed/simple; bh=jLNuWcPtsxUJWQztXx7RPqipSpD4lImifsUOZ+kZPJ4=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=iV6qLStL1sBLrRRetPZjx8h9qSKq6WNR4MV/kYSB9GavrCwX5QcR4qoVXAIblAcjmBpV3J9BdyjDxSvDLziC8VW2YWRO61ywTG+YDIlzfQAyVULohzpdHd8bikH+uHWGYPz4m2p+S2PSFCyFPkz6L66OKUPZ1dE3jUR0mDUsrhc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63486C43399; Fri, 15 Mar 2024 16:44:11 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97) (envelope-from ) id 1rlAhN-000000033H4-1el6; Fri, 15 Mar 2024 12:46:25 -0400 Message-ID: <20240315164625.260447550@goodmis.org> User-Agent: quilt/0.67 Date: Fri, 15 Mar 2024 12:46:03 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: "John Warthog9 Hawley" , John Hawley , "Ricardo B. Marliere" Subject: [for-next][PATCH 2/2] ktest: force $buildonly = 1 for make_warnings_file test type References: <20240315164601.705819502@goodmis.org> 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" From: "Ricardo B. Marliere" The test type "make_warnings_file" should have no mandatory configuration parameters other than the ones required by the "build" test type, because its purpose is to create a file with build warnings that may or may not be used by other subsequent tests. Currently, the only way to use it as a stand-alone test is by setting POWER_CYCLE, CONSOLE, SSH_USER, BUILD_TARGET, TARGET_IMAGE, REBOOT_TYPE and GRUB_MENU. Link: https://lkml.kernel.org/r/20240315-ktest-v2-1-c5c20a75f6a3@marliere.n= et Cc: John Hawley Signed-off-by: Ricardo B. Marliere Signed-off-by: Steven Rostedt --- tools/testing/ktest/ktest.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 4383729e0fc2..eb31cd9c977b 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -847,6 +847,7 @@ sub set_value { if ($lvalue =3D~ /^(TEST|BISECT|CONFIG_BISECT)_TYPE(\[.*\])?$/ && $prvalue !~ /^(config_|)bisect$/ && $prvalue !~ /^build$/ && + $prvalue !~ /^make_warnings_file$/ && $buildonly) { =20 # Note if a test is something other than build, then we --=20 2.43.0