[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ltp-list
Subject:    Re: [LTP]
From:       Crossover Lonely <crosslonelyover () gmail ! com>
Date:       2010-01-21 0:50:44
Message-ID: 5a774f4c1001201650l600b5540x8a91143aff2385ad () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


For your convenience, I just made to patches against the signle file, not
the whole directory.

solution 1=======================
--- hugeshmget01.c    2009-11-20 00:05:21.000000000 +0800
+++ hugeshmget01_2.c    2010-01-21 08:43:11.790533086 +0800
@@ -78,14 +78,14 @@
         tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
     }

-    setup();            /* global setup */
-
     /* The following loop checks looping state if -i option given */
         if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 )
              tst_brkm(TBROK, cleanup, "Test cannot be continued owning to
sufficient availability of Hugepages on the system");
         else
               huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() *
hugepages_size() * 1024) / 2 ;

+    setup();            /* global setup */
+
         for (lc = 0; TEST_LOOPING(lc); lc++) {
         /* reset Tst_count in case we are looping */
         Tst_count = 0;


solution 2==============================
--- hugeshmget01.c    2009-11-20 00:05:21.000000000 +0800
+++ hugeshmget01_1.c    2010-01-21 08:41:56.350057513 +0800
@@ -160,7 +160,7 @@
 setup(void)
 {
     /* capture signals */
-    tst_sig(NOFORK, DEF_HANDLER, cleanup);
+    tst_sig(FORK, DEF_HANDLER, cleanup);

     /* Pause if that option was specified */
     TEST_PAUSE;


2010/1/21 Crossover Lonely <crosslonelyover@gmail.com>

> Hi all,
>
>      When the hugeshmget01 runs, it gets unexpected signal SIGCHLD/SIGCLD,
> and thus stops immediately.
>      I found two ways to resolve this problem. Please refer to the
> following for two kinds of patch.
>      Well, according to other code structures of hugeshmget0*.c, solution 1
> is preferred. But for get_no_of_hugepages
> will call popen(), so I think the second solution is the right one.
>      Will you please choose the right one to apply to
> ltp-intermediate-20100119 package?
>      Looking forward to your confirmation!
>
> Thanks and Best Regards,
> shenghui
>
> Solution 1===============================================================
>
> diff -Nur
> ltp-intermediate-20100119-origin/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c
> ltp-intermediate-20100119/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c
> ---
> ltp-intermediate-20100119-origin/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c
> 2010-01-21 07:51:55.926035076 +0800
> +++
> ltp-intermediate-20100119/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c
> 2010-01-21 08:14:05.470032624 +0800
> @@ -78,14 +78,14 @@
>          tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
>      }
>
> -    setup();            /* global setup */
> -
>      /* The following loop checks looping state if -i option given */
>          if ( get_no_of_hugepages() <= 0 || hugepages_size() <= 0 )
>               tst_brkm(TBROK, cleanup, "Test cannot be continued owning to
> sufficient availability of Hugepages on the system");
>          else
> -              huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() *
> hugepages_size() * 1024) / 2 ;
> -
> +              huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() *
> hugepages_size() * 1024) / 2 ;
> +
> +    setup();            /* global setup */
> +
>          for (lc = 0; TEST_LOOPING(lc); lc++) {
>          /* reset Tst_count in case we are looping */
>          Tst_count = 0;
>
>
> Solution
> 2=========================================================================================
> diff -Nur
> ltp-intermediate-20100119-origin/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c
> ltp-intermediate-20100119/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c
> ---
> ltp-intermediate-20100119-origin/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c
> 2010-01-21 07:51:55.926035076 +0800
> +++
> ltp-intermediate-20100119/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c
> 2010-01-21 08:16:46.122032889 +0800
> @@ -160,7 +160,7 @@
>  setup(void)
>  {
>      /* capture signals */
> -    tst_sig(NOFORK, DEF_HANDLER, cleanup);
> +    tst_sig(FORK, DEF_HANDLER, cleanup);
>
>      /* Pause if that option was specified */
>      TEST_PAUSE;
>

[Attachment #5 (text/html)]

For your convenience, I just made to patches against the signle file, not the whole \
directory.<br><br>solution 1=======================<br>--- hugeshmget01.c    \
2009-11-20 00:05:21.000000000 +0800<br>+++ hugeshmget01_2.c    2010-01-21 \
08:43:11.790533086 +0800<br> @@ -78,14 +78,14 @@<br>         tst_brkm(TBROK, cleanup, \
&quot;OPTION PARSING ERROR - %s&quot;, msg);<br>     }<br> <br>-    setup();          \
/* global setup */<br>-<br>     /* The following loop checks looping state if -i \
option given */<br>  if ( get_no_of_hugepages() &lt;= 0 || hugepages_size() &lt;= 0 \
)<br>              tst_brkm(TBROK, cleanup, &quot;Test cannot be continued owning to \
sufficient availability of Hugepages on the system&quot;);<br>         else           \
<br>  huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * \
1024) / 2 ;<br>         <br>+    setup();            /* global setup */<br>+<br>      \
for (lc = 0; TEST_LOOPING(lc); lc++) {<br>  /* reset Tst_count in case we are looping \
*/<br>         Tst_count = 0;<br><br><br>solution \
2==============================<br>--- hugeshmget01.c    2009-11-20 \
00:05:21.000000000 +0800<br>+++ hugeshmget01_1.c    2010-01-21 08:41:56.350057513 \
+0800<br> @@ -160,7 +160,7 @@<br> setup(void)<br> {<br>     /* capture signals \
*/<br>-    tst_sig(NOFORK, DEF_HANDLER, cleanup);<br>+    tst_sig(FORK, DEF_HANDLER, \
cleanup);<br> <br>     /* Pause if that option was specified */<br>  \
TEST_PAUSE;<br><br><br><div class="gmail_quote">2010/1/21 Crossover Lonely <span \
dir="ltr">&lt;<a href="mailto:crosslonelyover@gmail.com">crosslonelyover@gmail.com</a>&gt;</span><br><blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;"> Hi all,<br><br>     When the hugeshmget01 runs, it \
gets unexpected signal SIGCHLD/SIGCLD, and thus stops immediately.<br>     I found \
two ways to resolve this problem. Please refer to the following for two kinds of \
patch. <br>

     Well, according to other code structures of hugeshmget0*.c, solution 1 is \
preferred. But for get_no_of_hugepages<br>will call popen(), so I think the second \
solution is the right one.<br>     Will you please choose the right one to apply to \
ltp-intermediate-20100119 package?<br>

     Looking forward to your confirmation!<br><br>Thanks and Best \
Regards,<br>shenghui<br><br>Solution \
1===============================================================<br><br>diff -Nur \
ltp-intermediate-20100119-origin/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c \
ltp-intermediate-20100119/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c<br>

--- ltp-intermediate-20100119-origin/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c \
2010-01-21 07:51:55.926035076 +0800<br>+++ \
ltp-intermediate-20100119/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c    \
2010-01-21 08:14:05.470032624 +0800<br>

@@ -78,14 +78,14 @@<br>         tst_brkm(TBROK, cleanup, &quot;OPTION PARSING ERROR - \
%s&quot;, msg);<br>     }<br> <br>-    setup();            /* global setup \
*/<br>-<br>     /* The following loop checks looping state if -i option given */<br>

         if ( get_no_of_hugepages() &lt;= 0 || hugepages_size() &lt;= 0 )<br>         \
tst_brkm(TBROK, cleanup, &quot;Test cannot be continued owning to sufficient \
availability of Hugepages on the system&quot;);<br>         else             <br>

-              huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * \
hugepages_size() * 1024) / 2 ;<br>-        <br>+              \
huge_pages_shm_to_be_allocated = ( get_no_of_hugepages() * hugepages_size() * 1024) / \
2 ; <br>

+<br>+    setup();            /* global setup */<br>+<br>         for (lc = 0; \
TEST_LOOPING(lc); lc++) {<br>         /* reset Tst_count in case we are looping \
*/<br>         Tst_count = 0;<br><br><br>Solution \
2=========================================================================================<br>


diff -Nur ltp-intermediate-20100119-origin/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c \
ltp-intermediate-20100119/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c<br>--- \
ltp-intermediate-20100119-origin/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c \
2010-01-21 07:51:55.926035076 +0800<br>

+++ ltp-intermediate-20100119/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c  \
2010-01-21 08:16:46.122032889 +0800<br>@@ -160,7 +160,7 @@<br> setup(void)<br> {<br>  \
/* capture signals */<br>-    tst_sig(NOFORK, DEF_HANDLER, cleanup);<br>

+    tst_sig(FORK, DEF_HANDLER, cleanup);<br> <br>     /* Pause if that option was \
specified */<br>     TEST_PAUSE;<br> </blockquote></div><br>



------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic