[PATCH] Solve Kselftest patch task

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Anup K Parikh <parikhanupk.foss@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux