Re: [LTP] [PATCH v9 2/2] cpuset_memory_testset.sh: Remove test6

Petr Vorel
2025-03-31T10:58:30Z

Hi Wei,

> Signed-off-by: Wei Gao <wegao@suse.com>
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> ---
> .../cpuset_memory_testset.sh | 37 +------------------
> 1 file changed, 2 insertions(+), 35 deletions(-)

> diff --git a/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_testset.sh b/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_testset.sh
> index c1e7cea8f..fd41dc97a 100755
> --- a/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_testset.sh
> +++ b/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_testset.sh
> @@ -162,41 +162,8 @@ check_hugetlbfs()

> test6()
> {
> - cpuset_set "$CPUSET/0" "$cpu_of_node0" "0" "0" 2> $CPUSET_TMP/stderr
> - if [ $? -ne 0 ]; then
> - cpuset_log_error $CPUSET_TMP/stderr
> - tst_resm TFAIL "set general group parameter failed."
> - return 1
> - fi
> -
> - check_hugetlbfs
> - if [ $? -eq 0 ]; then
> - tst_resm TCONF "This system don't support hugetlbfs"
> - return 0
> - fi
> -
> - mkdir /hugetlb
> - mount -t hugetlbfs none /hugetlb
> -
> - save_nr_hugepages=$(cat /proc/sys/vm/nr_hugepages)
> - echo $((2*$nr_mems)) > /proc/sys/vm/nr_hugepages
> -
> - cpuset_memory_test --mmap-file --hugepage -s $HUGEPAGESIZE >"$MEMORY_RESULT" &
> - simple_getresult $! "$CPUSET/0"
> -
> - umount /hugetlb
> - rmdir /hugetlb
> -
> - echo $save_nr_hugepages > /proc/sys/vm/nr_hugepages
> - if [ $(cat /proc/sys/vm/nr_hugepages) -ne $save_nr_hugepages ]; then
> - tst_resm TFAIL "can't restore nr_hugepages(nr_hugepages = $save_nr_hugepages)."
> - return 1
> - fi
> -
> - if [ "$node" != "0" ]; then
> - tst_resm TFAIL "allocate memory on the Node#$node(Expect: Node#0)."
> - return 1
> - fi
> + tst_resm TINFO "This test is replaced by testcases/kernel/mem/cpuset/cpuset02.c"
> + return 0
In new C shell API this would fail because test is not propagating any result. I
suppose this will work on old API, but wouldn't be better just remove whole
test6(), renumber tests and set TST_TOTAL=17?

Kind regards,
Petr
> }

> test7()