diff mbox series

[v3,2/2] cpuset_inherit: Remove redundant cpu_string assignment

Message ID 1610590728-15813-2-git-send-email-xuyang2018.jy@cn.fujitsu.com
State Accepted
Headers show
Series [v3,1/2] cpuset: skip test when cpu or nodes are not numbered continuously from 0 | expand

Commit Message

Yang Xu Jan. 14, 2021, 2:18 a.m. UTC
Since the previous patch has got this string from "/sys/devices/system/cpu/online"
file, we don't need to assign value for cpu_string here. Remove it.

Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
---
 .../cpuset/cpuset_inherit_test/cpuset_inherit_testset.sh     | 5 -----
 1 file changed, 5 deletions(-)

Comments

Petr Vorel Jan. 19, 2021, 11:22 a.m. UTC | #1
Hi Xu,

> Since the previous patch has got this string from "/sys/devices/system/cpu/online"
> file, we don't need to assign value for cpu_string here. Remove it.

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

Kind regards,
Petr
Cyril Hrubis Jan. 19, 2021, 11:51 a.m. UTC | #2
Hi!
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
diff mbox series

Patch

diff --git a/testcases/kernel/controllers/cpuset/cpuset_inherit_test/cpuset_inherit_testset.sh b/testcases/kernel/controllers/cpuset/cpuset_inherit_test/cpuset_inherit_testset.sh
index 73eed2cb9..650972d4b 100755
--- a/testcases/kernel/controllers/cpuset/cpuset_inherit_test/cpuset_inherit_testset.sh
+++ b/testcases/kernel/controllers/cpuset/cpuset_inherit_test/cpuset_inherit_testset.sh
@@ -106,11 +106,6 @@  inherit_test()
 test_cpus()
 {
 	cfile_name="cpus"
-	num=$((nr_cpus-1))
-	cpu_string="0-$num"
-	if [ $nr_cpus -eq 1 ]; then
-		cpu_string="0"
-	fi
 	while read inherit cpus result
 	do
 		inherit_test "$CPUSET/1/cpuset.cpus" "$inherit" "$cpus" "$result"