* Re: [LTP] Fix the test04 of testcases/kernel/numa/numa01.sh
@ 2011-01-17 0:38 Kazuki Seki
2011-01-19 9:37 ` Garrett Cooper
0 siblings, 1 reply; 7+ messages in thread
From: Kazuki Seki @ 2011-01-17 0:38 UTC (permalink / raw)
To: ltp-list; +Cc: 関 和輝
Hi,
Did you confirm the following email which I posted before?
Best regards,
K Seki
----- Original Message -----
From: "Kazuki Seki" <k-seki@np.css.fujitsu.com>
To: <ltp-list@lists.sourceforge.net>
Cc: "Kazuki Seki" <k-seki@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
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [LTP] Fix the test04 of testcases/kernel/numa/numa01.sh
2011-01-17 0:38 [LTP] Fix the test04 of testcases/kernel/numa/numa01.sh Kazuki Seki
@ 2011-01-19 9:37 ` Garrett Cooper
2011-01-24 2:38 ` Gui Jianfeng
0 siblings, 1 reply; 7+ messages in thread
From: Garrett Cooper @ 2011-01-19 9:37 UTC (permalink / raw)
To: Kazuki Seki; +Cc: ltp-list
On Sun, Jan 16, 2011 at 4:38 PM, Kazuki Seki <k-seki@np.css.fujitsu.com> wrote:
> Hi,
>
> Did you confirm the following email which I posted before?
I can't because I don't have the resources and FWIW no one else
has ACKed this issue.
Thanks,
-Garrett
------------------------------------------------------------------------------
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
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [LTP] Fix the test04 of testcases/kernel/numa/numa01.sh
2011-01-19 9:37 ` Garrett Cooper
@ 2011-01-24 2:38 ` Gui Jianfeng
2011-01-24 4:18 ` Garrett Cooper
0 siblings, 1 reply; 7+ messages in thread
From: Gui Jianfeng @ 2011-01-24 2:38 UTC (permalink / raw)
To: Garrett Cooper; +Cc: ltp-list, Kazuki Seki
Garrett Cooper wrote:
> On Sun, Jan 16, 2011 at 4:38 PM, Kazuki Seki <k-seki@np.css.fujitsu.com> wrote:
>> Hi,
>>
>> Did you confirm the following email which I posted before?
>
> I can't because I don't have the resources and FWIW no one else
> has ACKed this issue.
Hi Garrett,
Would you try the kernel option "numa=fake=<N>" to create several fake nodes to
confirm this patch. This patch seems good to me.
Thanks,
Gui
> Thanks,
> -Garrett
>
> ------------------------------------------------------------------------------
> 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
>
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [LTP] Fix the test04 of testcases/kernel/numa/numa01.sh
2011-01-24 2:38 ` Gui Jianfeng
@ 2011-01-24 4:18 ` Garrett Cooper
2011-01-24 4:58 ` Gui Jianfeng
0 siblings, 1 reply; 7+ messages in thread
From: Garrett Cooper @ 2011-01-24 4:18 UTC (permalink / raw)
To: Gui Jianfeng; +Cc: ltp-list, Kazuki Seki
On Sun, Jan 23, 2011 at 6:38 PM, Gui Jianfeng
<guijianfeng@cn.fujitsu.com> wrote:
> Garrett Cooper wrote:
>> On Sun, Jan 16, 2011 at 4:38 PM, Kazuki Seki <k-seki@np.css.fujitsu.com> wrote:
>>> Hi,
>>>
>>> Did you confirm the following email which I posted before?
>>
>> I can't because I don't have the resources and FWIW no one else
>> has ACKed this issue.
>
> Hi Garrett,
>
> Would you try the kernel option "numa=fake=<N>" to create several fake nodes to
> confirm this patch. This patch seems good to me.
If someone ACKs a patch, that's generally sufficient enough to
warrant a commit... if it worked before, I would just like to know
where and when the change was made to affect the output to cause the
failure seen, but seeing as how this is Linux and things are not
generally documented, I guess I'll just commit for now and hope that
people don't change the output unnecessarily again.
Thanks,
-Garrett
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [LTP] Fix the test04 of testcases/kernel/numa/numa01.sh
2011-01-24 4:18 ` Garrett Cooper
@ 2011-01-24 4:58 ` Gui Jianfeng
0 siblings, 0 replies; 7+ messages in thread
From: Gui Jianfeng @ 2011-01-24 4:58 UTC (permalink / raw)
To: Garrett Cooper; +Cc: ltp-list, Kazuki Seki
Garrett Cooper wrote:
> On Sun, Jan 23, 2011 at 6:38 PM, Gui Jianfeng
> <guijianfeng@cn.fujitsu.com> wrote:
>> Garrett Cooper wrote:
>>> On Sun, Jan 16, 2011 at 4:38 PM, Kazuki Seki <k-seki@np.css.fujitsu.com> wrote:
>>>> Hi,
>>>>
>>>> Did you confirm the following email which I posted before?
>>> I can't because I don't have the resources and FWIW no one else
>>> has ACKed this issue.
>> Hi Garrett,
>>
>> Would you try the kernel option "numa=fake=<N>" to create several fake nodes to
>> confirm this patch. This patch seems good to me.
>
> If someone ACKs a patch, that's generally sufficient enough to
> warrant a commit... if it worked before, I would just like to know
> where and when the change was made to affect the output to cause the
> failure seen, but seeing as how this is Linux and things are not
> generally documented, I guess I'll just commit for now and hope that
> people don't change the output unnecessarily again.
Thanks a lot.
Gui
> Thanks,
> -Garrett
>
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 7+ messages in thread
* [LTP] Fix the test04 of testcases/kernel/numa/numa01.sh
@ 2010-12-13 6:51 関 和輝
2011-01-24 4:21 ` Garrett Cooper
0 siblings, 1 reply; 7+ messages in thread
From: 関 和輝 @ 2010-12-13 6:51 UTC (permalink / raw)
To: ltp-list; +Cc: 関 和輝
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [LTP] Fix the test04 of testcases/kernel/numa/numa01.sh
2010-12-13 6:51 関 和輝
@ 2011-01-24 4:21 ` Garrett Cooper
0 siblings, 0 replies; 7+ messages in thread
From: Garrett Cooper @ 2011-01-24 4:21 UTC (permalink / raw)
To: 関 和輝; +Cc: ltp-list
2010/12/12 関 和輝 <k-seki@np.css.fujitsu.com>:
> 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
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
>
The patch applied (for future reference) is:
$ git diff testcases/kernel/numa/numa01.sh
diff --git a/testcases/kernel/numa/numa01.sh b/testcases/kernel/numa/numa01.sh
index 6cc0754..151d25b 100644
--- a/testcases/kernel/numa/numa01.sh
+++ b/testcases/kernel/numa/numa01.sh
@@ -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)
Please note that I didn't use `==' in the while branch condition
(bashism) and the ; was unnecessary in the awk expression.
Thanks,
-Garrett
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-01-24 4:58 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-17 0:38 [LTP] Fix the test04 of testcases/kernel/numa/numa01.sh Kazuki Seki
2011-01-19 9:37 ` Garrett Cooper
2011-01-24 2:38 ` Gui Jianfeng
2011-01-24 4:18 ` Garrett Cooper
2011-01-24 4:58 ` Gui Jianfeng
-- strict thread matches above, loose matches on Subject: below --
2010-12-13 6:51 関 和輝
2011-01-24 4:21 ` Garrett Cooper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox