cpu_hotplug: Add executable file's path
PATCH 1/1 cpu_hotplug: Add executable file's path
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.
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
--- .../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(-)
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug01.sh +2 -2
@@ -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
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug02.sh +1 -1
@@ -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
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh +1 -1
@@ -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
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug07.sh +1 -1
@@ -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
PATCH 1/1 cpu_hotplug: Add executable file's path
Hi Gongyi
Quoted 4 lines
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_interruptswill 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
Quoted 79 lines
For those:
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug01.shtestcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug02.shtestcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.shtestcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug07.shSigned-off-by Zhao Gongyi<[email protected]>--- .../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(-)testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug01.sh +2
-2@@ -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_DLYtestcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug02.sh +1
-1@@ -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 5testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh +1
-1@@ -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)) donetestcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug07.sh +1
-2@@ -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