All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] selftests/resctrl: Change a few printed messages
@ 2021-04-07 19:57 Fenghua Yu
  2021-04-07 22:46 ` Shuah Khan
  0 siblings, 1 reply; 3+ messages in thread
From: Fenghua Yu @ 2021-04-07 19:57 UTC (permalink / raw)
  To: Shuah Khan, Ravi V Shankar; +Cc: linux-kselftest, linux-kernel, Fenghua Yu

Change a few printed messages to report test progress more clearly.

Add a missing "\n" at the end of one printed message.

Suggested-by: Shuah Khan <shuah@kernel.org>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
---
Change log:
v2:
- Add "Pass:" and "Fail:" sub-strings back (Shuah).

This is a follow-up patch of recent resctrl selftest patches and can be
applied cleanly to:
git git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git
branch next.

 tools/testing/selftests/resctrl/cache.c     | 2 +-
 tools/testing/selftests/resctrl/mba_test.c  | 6 +++---
 tools/testing/selftests/resctrl/mbm_test.c  | 2 +-
 tools/testing/selftests/resctrl/resctrlfs.c | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/tools/testing/selftests/resctrl/cache.c b/tools/testing/selftests/resctrl/cache.c
index 362e3a418caa..68ff856d36f0 100644
--- a/tools/testing/selftests/resctrl/cache.c
+++ b/tools/testing/selftests/resctrl/cache.c
@@ -301,7 +301,7 @@ int show_cache_info(unsigned long sum_llc_val, int no_of_bits,
 	ret = platform && abs((int)diff_percent) > max_diff_percent &&
 	      (cmt ? (abs(avg_diff) > max_diff) : true);
 
-	ksft_print_msg("%s cache miss rate within %d%%\n",
+	ksft_print_msg("%s Check cache miss rate within %d%%\n",
 		       ret ? "Fail:" : "Pass:", max_diff_percent);
 
 	ksft_print_msg("Percent diff=%d\n", abs((int)diff_percent));
diff --git a/tools/testing/selftests/resctrl/mba_test.c b/tools/testing/selftests/resctrl/mba_test.c
index 26f12ad4c663..1a1bdb6180cf 100644
--- a/tools/testing/selftests/resctrl/mba_test.c
+++ b/tools/testing/selftests/resctrl/mba_test.c
@@ -80,7 +80,7 @@ static void show_mba_info(unsigned long *bw_imc, unsigned long *bw_resc)
 		avg_diff = (float)labs(avg_bw_resc - avg_bw_imc) / avg_bw_imc;
 		avg_diff_per = (int)(avg_diff * 100);
 
-		ksft_print_msg("%s MBA: diff within %d%% for schemata %u\n",
+		ksft_print_msg("%s Check MBA diff within %d%% for schemata %u\n",
 			       avg_diff_per > MAX_DIFF_PERCENT ?
 			       "Fail:" : "Pass:",
 			       MAX_DIFF_PERCENT,
@@ -93,10 +93,10 @@ static void show_mba_info(unsigned long *bw_imc, unsigned long *bw_resc)
 			failed = true;
 	}
 
-	ksft_print_msg("%s schemata change using MBA\n",
+	ksft_print_msg("%s Check schemata change using MBA\n",
 		       failed ? "Fail:" : "Pass:");
 	if (failed)
-		ksft_print_msg("At least one test failed");
+		ksft_print_msg("At least one test failed\n");
 }
 
 static int check_results(void)
diff --git a/tools/testing/selftests/resctrl/mbm_test.c b/tools/testing/selftests/resctrl/mbm_test.c
index 02b1ed03f1e5..8392e5c55ed0 100644
--- a/tools/testing/selftests/resctrl/mbm_test.c
+++ b/tools/testing/selftests/resctrl/mbm_test.c
@@ -37,7 +37,7 @@ show_bw_info(unsigned long *bw_imc, unsigned long *bw_resc, int span)
 	avg_diff_per = (int)(avg_diff * 100);
 
 	ret = avg_diff_per > MAX_DIFF_PERCENT;
-	ksft_print_msg("%s MBM: diff within %d%%\n",
+	ksft_print_msg("%s Check MBM diff within %d%%\n",
 		       ret ? "Fail:" : "Pass:", MAX_DIFF_PERCENT);
 	ksft_print_msg("avg_diff_per: %d%%\n", avg_diff_per);
 	ksft_print_msg("Span (MB): %d\n", span);
diff --git a/tools/testing/selftests/resctrl/resctrlfs.c b/tools/testing/selftests/resctrl/resctrlfs.c
index ade5f2b8b843..5f5a166ade60 100644
--- a/tools/testing/selftests/resctrl/resctrlfs.c
+++ b/tools/testing/selftests/resctrl/resctrlfs.c
@@ -570,14 +570,14 @@ bool check_resctrlfs_support(void)
 
 	fclose(inf);
 
-	ksft_print_msg("%s kernel supports resctrl filesystem\n",
+	ksft_print_msg("%s Check kernel supports resctrl filesystem\n",
 		       ret ? "Pass:" : "Fail:");
 
 	if (!ret)
 		return ret;
 
 	dp = opendir(RESCTRL_PATH);
-	ksft_print_msg("%s resctrl mountpoint \"%s\" exists\n",
+	ksft_print_msg("%s Check resctrl mountpoint \"%s\" exists\n",
 		       dp ? "Pass:" : "Fail:", RESCTRL_PATH);
 	if (dp)
 		closedir(dp);
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] selftests/resctrl: Change a few printed messages
  2021-04-07 19:57 [PATCH v2] selftests/resctrl: Change a few printed messages Fenghua Yu
@ 2021-04-07 22:46 ` Shuah Khan
  2021-04-07 22:54   ` Fenghua Yu
  0 siblings, 1 reply; 3+ messages in thread
From: Shuah Khan @ 2021-04-07 22:46 UTC (permalink / raw)
  To: Fenghua Yu, Shuah Khan, Ravi V Shankar
  Cc: linux-kselftest, linux-kernel, Shuah Khan

On 4/7/21 1:57 PM, Fenghua Yu wrote:
> Change a few printed messages to report test progress more clearly.
> 
> Add a missing "\n" at the end of one printed message.
> 
> Suggested-by: Shuah Khan <shuah@kernel.org>
> Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
> ---
> Change log:
> v2:
> - Add "Pass:" and "Fail:" sub-strings back (Shuah).
> 
> This is a follow-up patch of recent resctrl selftest patches and can be
> applied cleanly to:
> git git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git
> branch next.
> 
>   tools/testing/selftests/resctrl/cache.c     | 2 +-
>   tools/testing/selftests/resctrl/mba_test.c  | 6 +++---
>   tools/testing/selftests/resctrl/mbm_test.c  | 2 +-
>   tools/testing/selftests/resctrl/resctrlfs.c | 4 ++--
>   4 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/tools/testing/selftests/resctrl/cache.c b/tools/testing/selftests/resctrl/cache.c
> index 362e3a418caa..68ff856d36f0 100644
> --- a/tools/testing/selftests/resctrl/cache.c
> +++ b/tools/testing/selftests/resctrl/cache.c
> @@ -301,7 +301,7 @@ int show_cache_info(unsigned long sum_llc_val, int no_of_bits,
>   	ret = platform && abs((int)diff_percent) > max_diff_percent &&
>   	      (cmt ? (abs(avg_diff) > max_diff) : true);
>   
> -	ksft_print_msg("%s cache miss rate within %d%%\n",
> +	ksft_print_msg("%s Check cache miss rate within %d%%\n",
>   		       ret ? "Fail:" : "Pass:", max_diff_percent);
>   
>   	ksft_print_msg("Percent diff=%d\n", abs((int)diff_percent));
> diff --git a/tools/testing/selftests/resctrl/mba_test.c b/tools/testing/selftests/resctrl/mba_test.c
> index 26f12ad4c663..1a1bdb6180cf 100644
> --- a/tools/testing/selftests/resctrl/mba_test.c
> +++ b/tools/testing/selftests/resctrl/mba_test.c
> @@ -80,7 +80,7 @@ static void show_mba_info(unsigned long *bw_imc, unsigned long *bw_resc)
>   		avg_diff = (float)labs(avg_bw_resc - avg_bw_imc) / avg_bw_imc;
>   		avg_diff_per = (int)(avg_diff * 100);
>   
> -		ksft_print_msg("%s MBA: diff within %d%% for schemata %u\n",
> +		ksft_print_msg("%s Check MBA diff within %d%% for schemata %u\n",
>   			       avg_diff_per > MAX_DIFF_PERCENT ?
>   			       "Fail:" : "Pass:",
>   			       MAX_DIFF_PERCENT,
> @@ -93,10 +93,10 @@ static void show_mba_info(unsigned long *bw_imc, unsigned long *bw_resc)
>   			failed = true;
>   	}
>   
> -	ksft_print_msg("%s schemata change using MBA\n",
> +	ksft_print_msg("%s Check schemata change using MBA\n",
>   		       failed ? "Fail:" : "Pass:");
>   	if (failed)
> -		ksft_print_msg("At least one test failed");
> +		ksft_print_msg("At least one test failed\n");
>   }
>   
>   static int check_results(void)
> diff --git a/tools/testing/selftests/resctrl/mbm_test.c b/tools/testing/selftests/resctrl/mbm_test.c
> index 02b1ed03f1e5..8392e5c55ed0 100644
> --- a/tools/testing/selftests/resctrl/mbm_test.c
> +++ b/tools/testing/selftests/resctrl/mbm_test.c
> @@ -37,7 +37,7 @@ show_bw_info(unsigned long *bw_imc, unsigned long *bw_resc, int span)
>   	avg_diff_per = (int)(avg_diff * 100);
>   
>   	ret = avg_diff_per > MAX_DIFF_PERCENT;
> -	ksft_print_msg("%s MBM: diff within %d%%\n",
> +	ksft_print_msg("%s Check MBM diff within %d%%\n",
>   		       ret ? "Fail:" : "Pass:", MAX_DIFF_PERCENT);
>   	ksft_print_msg("avg_diff_per: %d%%\n", avg_diff_per);
>   	ksft_print_msg("Span (MB): %d\n", span);
> diff --git a/tools/testing/selftests/resctrl/resctrlfs.c b/tools/testing/selftests/resctrl/resctrlfs.c
> index ade5f2b8b843..5f5a166ade60 100644
> --- a/tools/testing/selftests/resctrl/resctrlfs.c
> +++ b/tools/testing/selftests/resctrl/resctrlfs.c
> @@ -570,14 +570,14 @@ bool check_resctrlfs_support(void)
>   
>   	fclose(inf);
>   
> -	ksft_print_msg("%s kernel supports resctrl filesystem\n",
> +	ksft_print_msg("%s Check kernel supports resctrl filesystem\n",
>   		       ret ? "Pass:" : "Fail:");
>   
>   	if (!ret)
>   		return ret;
>   
>   	dp = opendir(RESCTRL_PATH);
> -	ksft_print_msg("%s resctrl mountpoint \"%s\" exists\n",
> +	ksft_print_msg("%s Check resctrl mountpoint \"%s\" exists\n",
>   		       dp ? "Pass:" : "Fail:", RESCTRL_PATH);
>   	if (dp)
>   		closedir(dp);
> 

Thank you. Applied to linux-kseftest next branch for 5.13-rc1

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] selftests/resctrl: Change a few printed messages
  2021-04-07 22:46 ` Shuah Khan
@ 2021-04-07 22:54   ` Fenghua Yu
  0 siblings, 0 replies; 3+ messages in thread
From: Fenghua Yu @ 2021-04-07 22:54 UTC (permalink / raw)
  To: Shuah Khan; +Cc: Shuah Khan, Ravi V Shankar, linux-kselftest, linux-kernel

Hi, Shuah,

On Wed, Apr 07, 2021 at 04:46:38PM -0600, Shuah Khan wrote:
> On 4/7/21 1:57 PM, Fenghua Yu wrote:
> > Change a few printed messages to report test progress more clearly.
> Thank you. Applied to linux-kseftest next branch for 5.13-rc1

Great! I pull the next patch and test the patch. It works fine.

BTW, as said in the cover patch in the series, there will be two
new patch sets to fix a few other resctrl selftest issues on top of
this series. I will send out them in the next weeks. Hopefully
you will push them to 5.14:)

Thank you very much for your help!

-Fenghua

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-07 22:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-07 19:57 [PATCH v2] selftests/resctrl: Change a few printed messages Fenghua Yu
2021-04-07 22:46 ` Shuah Khan
2021-04-07 22:54   ` Fenghua Yu

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.