All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] Patch suggested inside LTP memcg stress test case 'memcg_stress_test.sh'.
@ 2010-09-08  8:50 Shubham
  2010-09-14  6:01 ` Subrata Modak
  0 siblings, 1 reply; 3+ messages in thread
From: Shubham @ 2010-09-08  8:50 UTC (permalink / raw)
  To: ltp-list


[-- Attachment #1.1: Type: text/plain, Size: 1625 bytes --]

  Hi,
      We have found out a cgroup test case issue with 
'ltp-full-20100331/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh'. 
The sniff of test case function is as below:-

Note: - Below code sniff is taken from latest LTP August month release.

run_stress()
{
         do_mount;

         for i in $(seq 0 $(($1-1)))
         do
                 mkdir /dev/memcg/$i 2> /dev/null
                 ./memcg_process_stress $2 $3 &
                 eval pid$i=$!

                 eval echo \$pid$i > /dev/memcg/$i/tasks
         done

         for i in $(seq 0 $(($1-1)))
         do
                 eval /bin/kill -s SIGUSR1 \$pid$i 2> /dev/null
         done

         sleep $4

         for i in $(seq 0 $(($1-1)))
         do
eval /bin/kill -s SIGINT \$pid$i 2> /dev/null *<----send  SIGINT signal 
for a pid *
                 eval wait \$pid$i

                 rmdir /dev/memcg/$i 2> /dev/null
         done

         cleanup;
}


Basically, the test case is not doing a proper cleanup using SIGINT.It 
seems that the current test runs for much longer time than expected, 
thus affecting test performance. During this course of time, other 
dependent tests were also not proceeding further and system seemed to be 
in a process hang state. However we have found that SIGKILL does a 
better cleanup job compared to SIGINT, to overcome this situation.

So, I have created a patch to fix above test case issue. Kindly review 
this patch and acknowledge. I think this patch can be merged into latest 
LTP code to avoid this problem.

Please let me know if you need any clarifications.

Regards,
Shubham


[-- Attachment #1.2: Type: text/html, Size: 3423 bytes --]

[-- Attachment #2: patch_memcg_stress_test --]
[-- Type: text/plain, Size: 572 bytes --]

--- memcg_stress_test.sh	2010-09-01 01:04:22.000000000 +0530
+++ memcg_stress_test_latest.sh	2010-09-01 01:10:47.000000000 +0530
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/sh
 
 ################################################################################
 ##                                                                            ##
@@ -85,7 +85,7 @@
 
 	for i in $(seq 0 $(($1-1)))
 	do
-		eval /bin/kill -s SIGINT \$pid$i 2> /dev/null
+		eval /bin/kill -s SIGKILL \$pid$i 2> /dev/null
 		eval wait \$pid$i
 
 		rmdir /dev/memcg/$i 2> /dev/null



[-- Attachment #3: Type: text/plain, Size: 247 bytes --]

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd

[-- 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] 3+ messages in thread

* Re: [LTP] Patch suggested inside LTP memcg stress test case 'memcg_stress_test.sh'.
  2010-09-08  8:50 [LTP] Patch suggested inside LTP memcg stress test case 'memcg_stress_test.sh' Shubham
@ 2010-09-14  6:01 ` Subrata Modak
  2010-09-14  6:18   ` Shubham
  0 siblings, 1 reply; 3+ messages in thread
From: Subrata Modak @ 2010-09-14  6:01 UTC (permalink / raw)
  To: Shubham; +Cc: ltp-list, iranna.ankad

Thanks. I have merged your patch. However you need to address the
following things in future:

     1. All patches need to have a DCO signoff like: Signed-off-by:
        Shubham <shubham@linux.vnet.ibm.com>,
     2. Create all your patches from LTP root: like:
diff -uprN ltp-*/testcases/*..*/file.orig ltp-*/testcases/*..*/file

Regards--
Subrata

On Wed, 2010-09-08 at 14:20 +0530, Shubham wrote:
> Hi,
>      We have found out a cgroup test case issue with
> 'ltp-full-20100331/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh'. The sniff of test case function is as below:-
> 
> Note: - Below code sniff is taken from latest LTP August month
> release.
> 
> run_stress()
> {
>         do_mount;
> 
>         for i in $(seq 0 $(($1-1)))
>         do
>                 mkdir /dev/memcg/$i 2> /dev/null
>                 ./memcg_process_stress $2 $3 &
>                 eval pid$i=$!
> 
>                 eval echo \$pid$i > /dev/memcg/$i/tasks
>         done
> 
>         for i in $(seq 0 $(($1-1)))
>         do
>                 eval /bin/kill -s SIGUSR1 \$pid$i 2> /dev/null
>         done
> 
>         sleep $4
> 
>         for i in $(seq 0 $(($1-1)))
>         do
>                 eval /bin/kill -s SIGINT \$pid$i 2> /dev/null
> <----send  SIGINT signal for a pid 
>                 eval wait \$pid$i
> 
>                 rmdir /dev/memcg/$i 2> /dev/null
>         done
> 
>         cleanup;
> }
> 
> 
> Basically, the test case is not doing a proper cleanup using SIGINT.It
> seems that the current test runs for much longer time than expected,
> thus affecting test performance. During this course of time, other
> dependent tests were also not proceeding further and system seemed to
> be in a process hang state. However we have found that SIGKILL does a
> better cleanup job compared to SIGINT, to overcome this situation.
> 
> So, I have created a patch to fix above test case issue. Kindly review
> this patch and acknowledge. I think this patch can be merged into
> latest LTP code to avoid this problem. 
> 
> Please let me know if you need any clarifications.
> 
> Regards,
> Shubham
> 
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
> 
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LTP] Patch suggested inside LTP memcg stress test case 'memcg_stress_test.sh'.
  2010-09-14  6:01 ` Subrata Modak
@ 2010-09-14  6:18   ` Shubham
  0 siblings, 0 replies; 3+ messages in thread
From: Shubham @ 2010-09-14  6:18 UTC (permalink / raw)
  To: subrata; +Cc: ltp-list, iranna.ankad

  Thanks Subrata,
                            I will take care of below mentioned points 
in future.

Regards
--Shubham

On Tuesday 14 September 2010 11:31 AM, Subrata Modak wrote:
> Thanks. I have merged your patch. However you need to address the
> following things in future:
>
>       1. All patches need to have a DCO signoff like: Signed-off-by:
>          Shubham<shubham@linux.vnet.ibm.com>,
>       2. Create all your patches from LTP root: like:
> diff -uprN ltp-*/testcases/*..*/file.orig ltp-*/testcases/*..*/file
>
> Regards--
> Subrata
>
> On Wed, 2010-09-08 at 14:20 +0530, Shubham wrote:
>> Hi,
>>       We have found out a cgroup test case issue with
>> 'ltp-full-20100331/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh'. The sniff of test case function is as below:-
>>
>> Note: - Below code sniff is taken from latest LTP August month
>> release.
>>
>> run_stress()
>> {
>>          do_mount;
>>
>>          for i in $(seq 0 $(($1-1)))
>>          do
>>                  mkdir /dev/memcg/$i 2>  /dev/null
>>                  ./memcg_process_stress $2 $3&
>>                  eval pid$i=$!
>>
>>                  eval echo \$pid$i>  /dev/memcg/$i/tasks
>>          done
>>
>>          for i in $(seq 0 $(($1-1)))
>>          do
>>                  eval /bin/kill -s SIGUSR1 \$pid$i 2>  /dev/null
>>          done
>>
>>          sleep $4
>>
>>          for i in $(seq 0 $(($1-1)))
>>          do
>>                  eval /bin/kill -s SIGINT \$pid$i 2>  /dev/null
>> <----send  SIGINT signal for a pid
>>                  eval wait \$pid$i
>>
>>                  rmdir /dev/memcg/$i 2>  /dev/null
>>          done
>>
>>          cleanup;
>> }
>>
>>
>> Basically, the test case is not doing a proper cleanup using SIGINT.It
>> seems that the current test runs for much longer time than expected,
>> thus affecting test performance. During this course of time, other
>> dependent tests were also not proceeding further and system seemed to
>> be in a process hang state. However we have found that SIGKILL does a
>> better cleanup job compared to SIGINT, to overcome this situation.
>>
>> So, I have created a patch to fix above test case issue. Kindly review
>> this patch and acknowledge. I think this patch can be merged into
>> latest LTP code to avoid this problem.
>>
>> Please let me know if you need any clarifications.
>>
>> Regards,
>> Shubham
>>
>> ------------------------------------------------------------------------------
>> This SF.net Dev2Dev email is sponsored by:
>>
>> Show off your parallel programming skills.
>> Enter the Intel(R) Threading Challenge 2010.
>> http://p.sf.net/sfu/intel-thread-sfd
>> _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-09-14  6:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-08  8:50 [LTP] Patch suggested inside LTP memcg stress test case 'memcg_stress_test.sh' Shubham
2010-09-14  6:01 ` Subrata Modak
2010-09-14  6:18   ` Shubham

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.