diff mbox series

controllers/cpuset: Add backslash to dump full fail log

Message ID 20241120005926.1644064-1-zhaomzhao@126.com
State New
Headers show
Series controllers/cpuset: Add backslash to dump full fail log | expand

Commit Message

Zhao Mengmeng Nov. 20, 2024, 12:59 a.m. UTC
From: Zhao Mengmeng <zhaomengmeng@kylinos.cn>

While debugging LTP cpuset_load_balance_test, when rmdir a path failed,
it only dumps part of the log, missing the $subdir. Add backslash to fix
it.

Signed-off-by: Zhao Mengmeng <zhaomengmeng@kylinos.cn>
---
 testcases/kernel/controllers/cpuset/cpuset_funcs.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Petr Vorel Dec. 17, 2024, 9:48 p.m. UTC | #1
Hi Zhao Mengmeng,

> While debugging LTP cpuset_load_balance_test, when rmdir a path failed,
> it only dumps part of the log, missing the $subdir. Add backslash to fix
> it.

+1 good catch.

Reviewed-by: Petr Vorel <pvorel@suse.cz>

> Signed-off-by: Zhao Mengmeng <zhaomengmeng@kylinos.cn>
> ---
>  testcases/kernel/controllers/cpuset/cpuset_funcs.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

> diff --git a/testcases/kernel/controllers/cpuset/cpuset_funcs.sh b/testcases/kernel/controllers/cpuset/cpuset_funcs.sh
> index 567178e3fd52..a374fd71f790 100755
> --- a/testcases/kernel/controllers/cpuset/cpuset_funcs.sh
> +++ b/testcases/kernel/controllers/cpuset/cpuset_funcs.sh
> @@ -195,7 +195,7 @@ cleanup()
>  		done < "$subdir/tasks"
>  		rmdir "$subdir"
>  		if [ $? -ne 0 ]; then
> -			tst_brkm TFAIL "Couldn't remove subdir - "
> +			tst_brkm TFAIL "Couldn't remove subdir - "\
>  						"$subdir in the cpuset"

Could we please just join the string?
			tst_brkm TFAIL "Couldn't remove subdir - $subdir in the cpuset"

Kind regards,
Petr

>  		fi
>  	done
diff mbox series

Patch

diff --git a/testcases/kernel/controllers/cpuset/cpuset_funcs.sh b/testcases/kernel/controllers/cpuset/cpuset_funcs.sh
index 567178e3fd52..a374fd71f790 100755
--- a/testcases/kernel/controllers/cpuset/cpuset_funcs.sh
+++ b/testcases/kernel/controllers/cpuset/cpuset_funcs.sh
@@ -195,7 +195,7 @@  cleanup()
 		done < "$subdir/tasks"
 		rmdir "$subdir"
 		if [ $? -ne 0 ]; then
-			tst_brkm TFAIL "Couldn't remove subdir - "
+			tst_brkm TFAIL "Couldn't remove subdir - "\
 						"$subdir in the cpuset"
 		fi
 	done