All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Solve Kselftest patch task
@ 2022-08-11 11:16 Anup K Parikh
  0 siblings, 0 replies; only message in thread
From: Anup K Parikh @ 2022-08-11 11:16 UTC (permalink / raw)
  To: skhan; +Cc: linux-kselftest

Most messages were perfect and so this is a minor pretty print change

Signed-off-by: Anup K Parikh <parikhanupk.foss@gmail.com>
---
 tools/testing/selftests/cpufreq/cpu.sh | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/cpufreq/cpu.sh b/tools/testing/selftests/cpufreq/cpu.sh
index 39fdcdfb8..fac318e8f 100755
--- a/tools/testing/selftests/cpufreq/cpu.sh
+++ b/tools/testing/selftests/cpufreq/cpu.sh
@@ -49,11 +49,22 @@ reboot_cpu()
 	online_cpu $1
 }
 
+#$1: number
+prettyprint_number_times()
+{
+	if [ "x$1" = "x1" ]; then
+		echo "once"
+	else
+		echo "$1 times"
+	fi
+}
+
 # Reboot CPUs
 # param: number of times we want to run the loop
 reboot_cpus()
 {
-	printf "** Test: Running ${FUNCNAME[0]} for $1 loops **\n\n"
+	local ptimes=`prettyprint_number_times $1`
+	printf "** Test: Running ${FUNCNAME[0]} $ptimes **\n\n"
 
 	for i in `seq 1 $1`; do
 		for_each_non_boot_cpu offline_cpu
-- 
2.35.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-11 11:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-11 11:16 [PATCH] Solve Kselftest patch task Anup K Parikh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.