From: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] cpu_hotplug: Add executable file's path
Date: Tue, 23 Feb 2021 13:15:26 +0800 [thread overview]
Message-ID: <60348F6E.2040302@cn.fujitsu.com> (raw)
In-Reply-To: <20210223033738.22666-1-zhaogongyi@huawei.com>
Hi Gongyi
> When env PATH is not include current path, run cpuhotplug_do_disk_write_loop/
> cpuhotplug_do_spin_loop/cpuhotplug_do_kcompile_loop/
> cpuhotplug_report_proc_interrupts will fail.
>
This patch is useless.
For shell-script case, usually, runltp will set environment variables.
or, you need to set environment variables yourself if not want to use
runltp(more info see[1]).
For cpuhotplug02 case, we can run as below:
#export LTPROOT=/opt/ltp
#export PATH="$PATH:$LTPROOT/testcases/bin"
#cpuhotplug02.sh -c 1 -l 1
[1]https://github.com/linux-test-project/ltp/blob/master/README.md
Best Regards
Yang Xu
> For those:
> testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug01.sh
> testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug02.sh
> testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh
> testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug07.sh
>
> Signed-off-by: Zhao Gongyi<zhaogongyi@huawei.com>
> ---
> .../kernel/hotplug/cpu_hotplug/functional/cpuhotplug01.sh | 4 ++--
> .../kernel/hotplug/cpu_hotplug/functional/cpuhotplug02.sh | 2 +-
> .../kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh | 2 +-
> .../kernel/hotplug/cpu_hotplug/functional/cpuhotplug07.sh | 2 +-
> 4 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug01.sh b/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug01.sh
> index 1ba937cc7..b1c8a9b97 100755
> --- a/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug01.sh
> +++ b/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug01.sh
> @@ -137,7 +137,7 @@ cpu_states=$(get_all_cpu_states)
> CPU_COUNT=0
>
> # Start up a process that writes to disk; keep track of its PID
> -cpuhotplug_do_disk_write_loop> /dev/null 2>&1&
> +./cpuhotplug_do_disk_write_loop> /dev/null 2>&1&
> WRL_ID=$!
>
> until [ $LOOP_COUNT -gt $HOTPLUG01_LOOPS ]
> @@ -181,7 +181,7 @@ do
> # Print out a report showing the changes in IRQs
> echo
> echo
> - cpuhotplug_report_proc_interrupts "$IRQ_START" "$IRQ_END"
> + ./cpuhotplug_report_proc_interrupts "$IRQ_START" "$IRQ_END"
> echo
>
> sleep $TM_DLY
> diff --git a/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug02.sh b/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug02.sh
> index 792f8cd73..f8a1395c1 100755
> --- a/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug02.sh
> +++ b/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug02.sh
> @@ -77,7 +77,7 @@ fi
> TST_CLEANUP=do_clean
>
> # Start up a process that just uses CPU cycles
> -cpuhotplug_do_spin_loop> /dev/null&
> +./cpuhotplug_do_spin_loop> /dev/null&
> SPIN_LOOP_PID=$!
>
> sleep 5
> diff --git a/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh b/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh
> index 9ea49f0e1..75a05a3c9 100755
> --- a/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh
> +++ b/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh
> @@ -102,7 +102,7 @@ until [ $LOOP_COUNT -gt $HOTPLUG03_LOOPS ]; do
> # so we can kill them later.
> number_of_procs=$((cpus_num*2))
> until [ $number_of_procs -eq 0 ]; do
> - cpuhotplug_do_spin_loop> /dev/null 2>&1&
> + ./cpuhotplug_do_spin_loop> /dev/null 2>&1&
> echo $!>> /var/run/hotplug4_$$.pid
> number_of_procs=$((number_of_procs-1))
> done
> diff --git a/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug07.sh b/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug07.sh
> index 278304618..e8ab78e8c 100755
> --- a/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug07.sh
> +++ b/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug07.sh
> @@ -81,7 +81,7 @@ fi
>
> TST_CLEANUP=do_clean
>
> -cpuhotplug_do_kcompile_loop $KERNEL_DIR> /dev/null 2>&1&
> +./cpuhotplug_do_kcompile_loop $KERNEL_DIR> /dev/null 2>&1&
> KCOMPILE_LOOP_PID=$!
>
> tst_resm TINFO "initial CPU affinity for kernel compile is: \
> --
> 2.17.1
>
>
next prev parent reply other threads:[~2021-02-23 5:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-23 3:37 [LTP] [PATCH] cpu_hotplug: Add executable file's path Zhao Gongyi
2021-02-23 5:15 ` Yang Xu [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-02-23 6:54 zhaogongyi
2021-02-23 7:54 ` Yang Xu
2021-02-23 9:13 zhaogongyi
2021-02-23 10:14 ` Cyril Hrubis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=60348F6E.2040302@cn.fujitsu.com \
--to=xuyang2018.jy@cn.fujitsu.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.