Hi,
I found the test04 of testcases/kernel/numa/numa01.sh can become either
PASS or FAIL on the same system.
As a result of examining the following lines of the shell,
I noticed the execution way of these processings is wrong.
- Here is a part of a problem in the shell.
---------------------------------------------------------------------------
numactl --physcpubind=$run_on_cpu support_numa $PAUSE & #just waits for
sigint
pid=$!
running_on_cpu=$(awk '{ print $39; }' /proc/$pid/stat)
---------------------------------------------------------------------------
The following shows the root cause:
(A) : numactl --physcpubind=$run_on_cpu support_numa $PAUSE &
(B) : running_on_cpu=$(awk '{ print $39; }' /proc/$pid/stat)
If (B) completes its execution before (A) binds a certain CPU,
(B) doesn't set the number of expected CPU and then the test becomes FAIL.
Therefore, (B) must start after (A) binds a certain CPU.
I made the patch which executes (B) after cmm field of /proc/$pid/stat
changes from "(numactl)" into "(support_numa)".
- Example of changing cmm field of /proc/$pid/stat
---------------------------------------------------------------------------
[before (A) binds CPU]
# awk '{ print $2; }' /proc/$pid/stat
(numactl)
^^^^^^^^^
cmm field
[after (A) bound CPU]
# awk '{ print $2; }' /proc/$pid/stat
(support_numa)
---------------------------------------------------------------------------
Please apply this patch.
---
testcases/kernel/numa/numa01.sh | 4 ++++
1 file changed, 4 insertions(+)
Index: ltp-70a3216/testcases/kernel/numa/numa01.sh
===================================================================
--- ltp-70a3216.orig/testcases/kernel/numa/numa01.sh 2010-12-01
10:50:43.000000000 +0900
+++ ltp-70a3216/testcases/kernel/numa/numa01.sh 2010-12-01
10:51:55.000000000 +0900
@@ -471,6 +471,10 @@ test04()
run_on_cpu=$[$[$no_of_cpus+1]/2]
numactl --physcpubind=$run_on_cpu support_numa $PAUSE & #just waits for
sigint
pid=$!
+ var=`awk '{ print $2; }' /proc/$pid/stat`
+ while [ $var == "(numactl)" ];do
+ var=`awk '{ print $2; }' /proc/$pid/stat`
+ done
# Warning !! 39 represents cpu number, on which process pid is
currently running and
# this may change if Some more fields are added in the middle, may be
in future
running_on_cpu=$(awk '{ print $39; }' /proc/$pid/stat)
Best regards,
K Seki
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list