Hi, Did you confirm the following email which I posted before?
Best regards, K Seki ----- Original Message ----- From: "Kazuki Seki" <k-s...@np.css.fujitsu.com> To: <ltp-list@lists.sourceforge.net> Cc: "Kazuki Seki" <k-s...@np.css.fujitsu.com> Sent: Monday, December 13, 2010 3:51 PM Subject: Fix the test04 of testcases/kernel/numa/numa01.sh > 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 ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list