* [LTP] Bug in memory controller test - memctl test #4
@ 2009-08-24 18:32 Mike Gahagan
2009-08-25 9:58 ` Subrata Modak
0 siblings, 1 reply; 6+ messages in thread
From: Mike Gahagan @ 2009-08-24 18:32 UTC (permalink / raw)
To: ltp-list
[-- Attachment #1: Type: text/plain, Size: 1432 bytes --]
When running the Memory Controller test # 4, I'm seeing this behavior below.
TEST 4: MEMORY CONTROLLER TESTING
RUNNING SETUP.....
TEST STARTED: Please avoid using system while this test executes
/mnt/tests/kernel/distribution/ltp/20090731/ltp-full-20090731/testcases/bin/run_memctl_test.sh:
line 327: [: 62955520: unary operator expected
TINFO Memory Resource Controller: stat check test fails in first run
/mnt/tests/kernel/distribution/ltp/20090731/ltp-full-20090731/testcases/bin/run_memctl_test.sh:
line 364: [: 78704640: unary operator expected
TFAIL Memory Resource Controller: stat check test FAILED
*** infinite loop here, script exists memctl_test01 remains running ***
^Cincrementing stop
The bash error is due to the 'grep -w "active"' not matching anything so
one of the variables isn't getting set like it is supposed to. I believe
the test was written with an old version of the memory controller what
put a field called memory.stat.active in the file memory.stat. The
current memory controller I am testing appears to have replaced this
field with "rss". There are fields showing anonymous and file backed
pages in memory.stat, but I don't think they are ever going to match the
memory.usage.in.bytes the test is looking for. Rss always matches and I
believe that is what we should update the check in the test to look for.
The attached patch fixes test #4 to compare memory.usage.in.bytes with rss.
[-- Attachment #2: run_memctl_test.patch --]
[-- Type: text/plain, Size: 912 bytes --]
--- ltp-full-20090731/testcases/kernel/controllers/memctl/run_memctl_test.sh 2008-05-26 07:26:44.000000000 -0400
+++ run_memctl_test.sh.new 2009-08-24 14:17:12.475154507 -0400
@@ -323,7 +323,7 @@
check_mem_allocated;# $MEM_TOTAL;
# now we can check the memory usage from both files
USAGE_FROM_STAT=`cat /dev/memctl/group_1/memory.stat \
- | grep -w "active" | cut -d" " -f2`;
+ | grep -w "rss" | cut -d" " -f2`;
if [ $USAGE_FROM_USAGE_IN_BYTES -eq $USAGE_FROM_STAT ]
then
echo "memory usage from memory.usage_in_bytes= $USAGE_FROM_USAGE_IN_BYTES";
@@ -360,7 +360,7 @@
# now we can check the memory usage from both files
USAGE_FROM_STAT=`cat /dev/memctl/group_1/memory.stat \
- | grep -w "active" | cut -d" " -f2`;
+ | grep -w "rss" | cut -d" " -f2`;
if [ $USAGE_FROM_USAGE_IN_BYTESGRP1_MEMUSAGE -eq $USAGE_FROM_STAT ] \
&& [ $FIRST_STEP_PASS -eq 1 ]
then
[-- Attachment #3: Type: text/plain, Size: 355 bytes --]
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
[-- Attachment #4: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LTP] Bug in memory controller test - memctl test #4
2009-08-24 18:32 [LTP] Bug in memory controller test - memctl test #4 Mike Gahagan
@ 2009-08-25 9:58 ` Subrata Modak
2009-08-26 16:01 ` [LTP] Bug in memory controller test - memctl test #4 - PATCH repost Mike Gahagan
0 siblings, 1 reply; 6+ messages in thread
From: Subrata Modak @ 2009-08-25 9:58 UTC (permalink / raw)
To: Mike Gahagan; +Cc: ltp-list
On Mon, 2009-08-24 at 14:32 -0400, Mike Gahagan wrote:
> When running the Memory Controller test # 4, I'm seeing this behavior below.
>
> TEST 4: MEMORY CONTROLLER TESTING
> RUNNING SETUP.....
> TEST STARTED: Please avoid using system while this test executes
> /mnt/tests/kernel/distribution/ltp/20090731/ltp-full-20090731/testcases/bin/run_memctl_test.sh:
> line 327: [: 62955520: unary operator expected
> TINFO Memory Resource Controller: stat check test fails in first run
> /mnt/tests/kernel/distribution/ltp/20090731/ltp-full-20090731/testcases/bin/run_memctl_test.sh:
> line 364: [: 78704640: unary operator expected
> TFAIL Memory Resource Controller: stat check test FAILED
> *** infinite loop here, script exists memctl_test01 remains running ***
> ^Cincrementing stop
>
> The bash error is due to the 'grep -w "active"' not matching anything so
> one of the variables isn't getting set like it is supposed to. I believe
> the test was written with an old version of the memory controller what
> put a field called memory.stat.active in the file memory.stat. The
Correct. Somebody needs to revisit these tests, as the ABIs has changed.
Thanks for pointing that out. However, your patch has the following
problem:
1) Missing Signed-off-by:
2) missing header for unified diff at line 3 of patch
patching file testcases/kernel/controllers/memctl/run_memctl_test.sh
Please look into them when you send a patch next time ;-)
Regards--
Subrata
> current memory controller I am testing appears to have replaced this
> field with "rss". There are fields showing anonymous and file backed
> pages in memory.stat, but I don't think they are ever going to match the
> memory.usage.in.bytes the test is looking for. Rss always matches and I
> believe that is what we should update the check in the test to look for.
> The attached patch fixes test #4 to compare memory.usage.in.bytes with rss.
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LTP] Bug in memory controller test - memctl test #4 - PATCH repost
2009-08-25 9:58 ` Subrata Modak
@ 2009-08-26 16:01 ` Mike Gahagan
2009-08-27 10:19 ` Subrata Modak
0 siblings, 1 reply; 6+ messages in thread
From: Mike Gahagan @ 2009-08-26 16:01 UTC (permalink / raw)
To: ltp-list
[-- Attachment #1: Type: text/plain, Size: 2277 bytes --]
On 08/25/2009 05:58 AM, Subrata Modak wrote:
> On Mon, 2009-08-24 at 14:32 -0400, Mike Gahagan wrote:
>> When running the Memory Controller test # 4, I'm seeing this behavior below.
>>
>> TEST 4: MEMORY CONTROLLER TESTING
>> RUNNING SETUP.....
>> TEST STARTED: Please avoid using system while this test executes
>> /mnt/tests/kernel/distribution/ltp/20090731/ltp-full-20090731/testcases/bin/run_memctl_test.sh:
>> line 327: [: 62955520: unary operator expected
>> TINFO Memory Resource Controller: stat check test fails in first run
>> /mnt/tests/kernel/distribution/ltp/20090731/ltp-full-20090731/testcases/bin/run_memctl_test.sh:
>> line 364: [: 78704640: unary operator expected
>> TFAIL Memory Resource Controller: stat check test FAILED
>> *** infinite loop here, script exists memctl_test01 remains running ***
>> ^Cincrementing stop
>>
>> The bash error is due to the 'grep -w "active"' not matching anything so
>> one of the variables isn't getting set like it is supposed to. I believe
>> the test was written with an old version of the memory controller what
>> put a field called memory.stat.active in the file memory.stat. The
>
> Correct. Somebody needs to revisit these tests, as the ABIs has changed.
> Thanks for pointing that out. However, your patch has the following
> problem:
>
> 1) Missing Signed-off-by:
> 2) missing header for unified diff at line 3 of patch
> patching file testcases/kernel/controllers/memctl/run_memctl_test.sh
>
> Please look into them when you send a patch next time ;-)
>
> Regards--
> Subrata
>
>> current memory controller I am testing appears to have replaced this
>> field with "rss". There are fields showing anonymous and file backed
>> pages in memory.stat, but I don't think they are ever going to match the
>> memory.usage.in.bytes the test is looking for. Rss always matches and I
>> believe that is what we should update the check in the test to look for.
>> The attached patch fixes test #4 to compare memory.usage.in.bytes with rss.
>> ------------------------------------------------------------------------------
Hello,
Here is a resubmission of my memctl test patch. It should clear up the
issues noted above. No functional change from the previous patch.
Signed-off-by: Mike Gahagan <mgahagan@redhat.com>
[-- Attachment #2: run_memctl_test.patch --]
[-- Type: text/plain, Size: 1207 bytes --]
run_memctl_test.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff -uNr ltp-full-20090731/testcases/kernel/controllers/memctl/run_memctl_test.sh ltp-full-20090731.new/testcases/kernel/controllers/memctl/run_memctl_test.sh
--- ltp-full-20090731/testcases/kernel/controllers/memctl/run_memctl_test.sh 2009-08-25 16:21:47.298273822 -0400
+++ ltp-full-20090731.new/testcases/kernel/controllers/memctl/run_memctl_test.sh 2009-08-25 16:41:57.606201495 -0400
@@ -323,7 +323,7 @@
check_mem_allocated;# $MEM_TOTAL;
# now we can check the memory usage from both files
USAGE_FROM_STAT=`cat /dev/memctl/group_1/memory.stat \
- | grep -w "active" | cut -d" " -f2`;
+ | grep -w "rss" | cut -d" " -f2`;
if [ $USAGE_FROM_USAGE_IN_BYTES -eq $USAGE_FROM_STAT ]
then
echo "memory usage from memory.usage_in_bytes= $USAGE_FROM_USAGE_IN_BYTES";
@@ -360,7 +360,7 @@
# now we can check the memory usage from both files
USAGE_FROM_STAT=`cat /dev/memctl/group_1/memory.stat \
- | grep -w "active" | cut -d" " -f2`;
+ | grep -w "rss" | cut -d" " -f2`;
if [ $USAGE_FROM_USAGE_IN_BYTESGRP1_MEMUSAGE -eq $USAGE_FROM_STAT ] \
&& [ $FIRST_STEP_PASS -eq 1 ]
then
[-- Attachment #3: Type: text/plain, Size: 355 bytes --]
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
[-- Attachment #4: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LTP] Bug in memory controller test - memctl test #4 - PATCH repost
2009-08-26 16:01 ` [LTP] Bug in memory controller test - memctl test #4 - PATCH repost Mike Gahagan
@ 2009-08-27 10:19 ` Subrata Modak
2009-08-28 15:07 ` Mike Gahagan
0 siblings, 1 reply; 6+ messages in thread
From: Subrata Modak @ 2009-08-27 10:19 UTC (permalink / raw)
To: Mike Gahagan; +Cc: ltp-list
Hi,
On Wed, 2009-08-26 at 12:01 -0400, Mike Gahagan wrote:
> On 08/25/2009 05:58 AM, Subrata Modak wrote:
> > On Mon, 2009-08-24 at 14:32 -0400, Mike Gahagan wrote:
> >> When running the Memory Controller test # 4, I'm seeing this behavior below.
> >>
> >> TEST 4: MEMORY CONTROLLER TESTING
> >> RUNNING SETUP.....
> >> TEST STARTED: Please avoid using system while this test executes
> >> /mnt/tests/kernel/distribution/ltp/20090731/ltp-full-20090731/testcases/bin/run_memctl_test.sh:
> >> line 327: [: 62955520: unary operator expected
> >> TINFO Memory Resource Controller: stat check test fails in first run
> >> /mnt/tests/kernel/distribution/ltp/20090731/ltp-full-20090731/testcases/bin/run_memctl_test.sh:
> >> line 364: [: 78704640: unary operator expected
> >> TFAIL Memory Resource Controller: stat check test FAILED
> >> *** infinite loop here, script exists memctl_test01 remains running ***
> >> ^Cincrementing stop
> >>
> >> The bash error is due to the 'grep -w "active"' not matching anything so
> >> one of the variables isn't getting set like it is supposed to. I believe
> >> the test was written with an old version of the memory controller what
> >> put a field called memory.stat.active in the file memory.stat. The
> >
> > Correct. Somebody needs to revisit these tests, as the ABIs has changed.
Would be able to spend some time here ?
> > Thanks for pointing that out. However, your patch has the following
> > problem:
> >
> > 1) Missing Signed-off-by:
> > 2) missing header for unified diff at line 3 of patch
> > patching file testcases/kernel/controllers/memctl/run_memctl_test.sh
> >
> > Please look into them when you send a patch next time ;-)
> >
> > Regards--
> > Subrata
> >
> >> current memory controller I am testing appears to have replaced this
> >> field with "rss". There are fields showing anonymous and file backed
> >> pages in memory.stat, but I don't think they are ever going to match the
> >> memory.usage.in.bytes the test is looking for. Rss always matches and I
> >> believe that is what we should update the check in the test to look for.
> >> The attached patch fixes test #4 to compare memory.usage.in.bytes with rss.
> >> ------------------------------------------------------------------------------
>
> Hello,
>
> Here is a resubmission of my memctl test patch. It should clear up the
> issues noted above. No functional change from the previous patch.
>
> Signed-off-by: Mike Gahagan <mgahagan@redhat.com>
Thanks. I already merged your patch.
Regards--
Subrata
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LTP] Bug in memory controller test - memctl test #4 - PATCH repost
2009-08-27 10:19 ` Subrata Modak
@ 2009-08-28 15:07 ` Mike Gahagan
2009-08-30 17:37 ` Subrata Modak
0 siblings, 1 reply; 6+ messages in thread
From: Mike Gahagan @ 2009-08-28 15:07 UTC (permalink / raw)
To: subrata; +Cc: ltp-list
On 08/27/2009 06:19 AM, Subrata Modak wrote:
> Hi,
>
> On Wed, 2009-08-26 at 12:01 -0400, Mike Gahagan wrote:
>> On 08/25/2009 05:58 AM, Subrata Modak wrote:
>>> On Mon, 2009-08-24 at 14:32 -0400, Mike Gahagan wrote:
>>>> When running the Memory Controller test # 4, I'm seeing this behavior below.
>>>>
>>>> TEST 4: MEMORY CONTROLLER TESTING
>>>> RUNNING SETUP.....
>>>> TEST STARTED: Please avoid using system while this test executes
>>>> /mnt/tests/kernel/distribution/ltp/20090731/ltp-full-20090731/testcases/bin/run_memctl_test.sh:
>>>> line 327: [: 62955520: unary operator expected
>>>> TINFO Memory Resource Controller: stat check test fails in first run
>>>> /mnt/tests/kernel/distribution/ltp/20090731/ltp-full-20090731/testcases/bin/run_memctl_test.sh:
>>>> line 364: [: 78704640: unary operator expected
>>>> TFAIL Memory Resource Controller: stat check test FAILED
>>>> *** infinite loop here, script exists memctl_test01 remains running ***
>>>> ^Cincrementing stop
>>>>
>>>> The bash error is due to the 'grep -w "active"' not matching anything so
>>>> one of the variables isn't getting set like it is supposed to. I believe
>>>> the test was written with an old version of the memory controller what
>>>> put a field called memory.stat.active in the file memory.stat. The
>>>
>>> Correct. Somebody needs to revisit these tests, as the ABIs has changed.
>
> Would be able to spend some time here ?
>
Sure, I would be glad to. So far this was the only issue I have found
(or the only really obvious one at least). I plan on picking up and
running the recently checked in new tests as well, probably in the next
week or so.
>>> Thanks for pointing that out. However, your patch has the following
>>> problem:
>>>
>>> 1) Missing Signed-off-by:
>>> 2) missing header for unified diff at line 3 of patch
>>> patching file testcases/kernel/controllers/memctl/run_memctl_test.sh
>>>
>>> Please look into them when you send a patch next time ;-)
>>>
>>> Regards--
>>> Subrata
>>>
>>>> current memory controller I am testing appears to have replaced this
>>>> field with "rss". There are fields showing anonymous and file backed
>>>> pages in memory.stat, but I don't think they are ever going to match the
>>>> memory.usage.in.bytes the test is looking for. Rss always matches and I
>>>> believe that is what we should update the check in the test to look for.
>>>> The attached patch fixes test #4 to compare memory.usage.in.bytes with rss.
>>>> ------------------------------------------------------------------------------
>>
>> Hello,
>>
>> Here is a resubmission of my memctl test patch. It should clear up the
>> issues noted above. No functional change from the previous patch.
>>
>> Signed-off-by: Mike Gahagan<mgahagan@redhat.com>
>
> Thanks. I already merged your patch.
>
Thank you !
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LTP] Bug in memory controller test - memctl test #4 - PATCH repost
2009-08-28 15:07 ` Mike Gahagan
@ 2009-08-30 17:37 ` Subrata Modak
0 siblings, 0 replies; 6+ messages in thread
From: Subrata Modak @ 2009-08-30 17:37 UTC (permalink / raw)
To: Mike Gahagan; +Cc: ltp-list
On Fri, 2009-08-28 at 11:07 -0400, Mike Gahagan wrote:
> On 08/27/2009 06:19 AM, Subrata Modak wrote:
> > Hi,
> >
> > On Wed, 2009-08-26 at 12:01 -0400, Mike Gahagan wrote:
> >> On 08/25/2009 05:58 AM, Subrata Modak wrote:
> >>> On Mon, 2009-08-24 at 14:32 -0400, Mike Gahagan wrote:
> >>>> When running the Memory Controller test # 4, I'm seeing this behavior below.
> >>>>
> >>>> TEST 4: MEMORY CONTROLLER TESTING
> >>>> RUNNING SETUP.....
> >>>> TEST STARTED: Please avoid using system while this test executes
> >>>> /mnt/tests/kernel/distribution/ltp/20090731/ltp-full-20090731/testcases/bin/run_memctl_test.sh:
> >>>> line 327: [: 62955520: unary operator expected
> >>>> TINFO Memory Resource Controller: stat check test fails in first run
> >>>> /mnt/tests/kernel/distribution/ltp/20090731/ltp-full-20090731/testcases/bin/run_memctl_test.sh:
> >>>> line 364: [: 78704640: unary operator expected
> >>>> TFAIL Memory Resource Controller: stat check test FAILED
> >>>> *** infinite loop here, script exists memctl_test01 remains running ***
> >>>> ^Cincrementing stop
> >>>>
> >>>> The bash error is due to the 'grep -w "active"' not matching anything so
> >>>> one of the variables isn't getting set like it is supposed to. I believe
> >>>> the test was written with an old version of the memory controller what
> >>>> put a field called memory.stat.active in the file memory.stat. The
> >>>
> >>> Correct. Somebody needs to revisit these tests, as the ABIs has changed.
> >
> > Would be able to spend some time here ?
> >
>
> Sure, I would be glad to. So far this was the only issue I have found
> (or the only really obvious one at least). I plan on picking up and
> running the recently checked in new tests as well, probably in the next
> week or so.
Great. Thanks for this interest.
Regards--
Subrata
>
>
>
> >>> Thanks for pointing that out. However, your patch has the following
> >>> problem:
> >>>
> >>> 1) Missing Signed-off-by:
> >>> 2) missing header for unified diff at line 3 of patch
> >>> patching file testcases/kernel/controllers/memctl/run_memctl_test.sh
> >>>
> >>> Please look into them when you send a patch next time ;-)
> >>>
> >>> Regards--
> >>> Subrata
> >>>
> >>>> current memory controller I am testing appears to have replaced this
> >>>> field with "rss". There are fields showing anonymous and file backed
> >>>> pages in memory.stat, but I don't think they are ever going to match the
> >>>> memory.usage.in.bytes the test is looking for. Rss always matches and I
> >>>> believe that is what we should update the check in the test to look for.
> >>>> The attached patch fixes test #4 to compare memory.usage.in.bytes with rss.
> >>>> ------------------------------------------------------------------------------
> >>
> >> Hello,
> >>
> >> Here is a resubmission of my memctl test patch. It should clear up the
> >> issues noted above. No functional change from the previous patch.
> >>
> >> Signed-off-by: Mike Gahagan<mgahagan@redhat.com>
> >
> > Thanks. I already merged your patch.
> >
>
> Thank you !
>
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-08-30 17:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-24 18:32 [LTP] Bug in memory controller test - memctl test #4 Mike Gahagan
2009-08-25 9:58 ` Subrata Modak
2009-08-26 16:01 ` [LTP] Bug in memory controller test - memctl test #4 - PATCH repost Mike Gahagan
2009-08-27 10:19 ` Subrata Modak
2009-08-28 15:07 ` Mike Gahagan
2009-08-30 17:37 ` Subrata Modak
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.