[Fuego] [PATCH 07/15] ptsematest: fix unavailable cpu num of PARAMS

Tim.Bird at sony.com Tim.Bird at sony.com
Thu Nov 15 22:39:30 UTC 2018



> -----Original Message-----
> From: Qiu Tingting on Wednesday, November 14, 2018 8:26 PM
> 
> Cmd ptsematest has -t num parameter.
> When cpu num is not setted, default value is max num of cpu.
> Maybe some of cpu is not working, so we should set the available cpu num.

Can you explain this more?  This change adjusts
the code to have ptsematest use the number of cpus reported
by /proc/cpuinfo.   This seems like it would be the maximum number of
cpus on the system. 

How would ptsematest use a different number of cpus?

> 
> Signed-off-by: Qiu Tingting <qiutt at cn.fujitsu.com>
> ---
>  engine/tests/Benchmark.ptsematest/fuego_test.sh | 2 +-
>  engine/tests/Benchmark.ptsematest/spec.json     | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/engine/tests/Benchmark.ptsematest/fuego_test.sh
> b/engine/tests/Benchmark.ptsematest/fuego_test.sh
> index 5f3fb44..5f0633e 100755
> --- a/engine/tests/Benchmark.ptsematest/fuego_test.sh
> +++ b/engine/tests/Benchmark.ptsematest/fuego_test.sh
> @@ -21,5 +21,5 @@ function test_run {
>      # The number for getting the lines depends on the cpu number of target
> machine.
>      target_cpu_number=$(cmd "cat /proc/cpuinfo | grep processor | wc -l")
>      getting_line_number=$(( $target_cpu_number + $target_cpu_number ))
> -    report "cd $BOARD_TESTDIR/fuego.$TESTDIR; ./ptsematest
> $BENCHMARK_PTSEMATEST_PARAMS | tail -$getting_line_number"
> +    report "cd $BOARD_TESTDIR/fuego.$TESTDIR; ./ptsematest
> $BENCHMARK_PTSEMATEST_PARAMS$target_cpu_number | tail -
> $getting_line_number"
>  }
> diff --git a/engine/tests/Benchmark.ptsematest/spec.json
> b/engine/tests/Benchmark.ptsematest/spec.json
> index aa5d6ce..16bc9ee 100644
> --- a/engine/tests/Benchmark.ptsematest/spec.json
> +++ b/engine/tests/Benchmark.ptsematest/spec.json
> @@ -2,13 +2,13 @@
>      "testName": "Benchmark.ptsematest",
>      "specs": {
>          "default": {
> -            "PARAMS": "-a -t -p99 -i100 -d25 -l100000"
> +            "PARAMS": "-a -p99 -i100 -d25 -l100000 -t"
>          },
>          "latest": {
>              "PER_JOB_BUILD": "true",
>              "gitrepo": "https://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git",
>              "gitref": "unstable/devel/latest",
> -            "PARAMS": "-a -t -p99 -i100 -d25 -l100000"
> +            "PARAMS": "-a -p99 -i100 -d25 -l100000 -t"
>          }
>      }
>  }
> --
> 2.7.4

Not applied yet.  Please explain more what's going on.
 -- Tim


More information about the Fuego mailing list