public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* Re: [LTP] [PATCH 12/21] syscalls/{getcontext, profil}: Multiple fixes
       [not found] <1325672810-5247-1-git-send-email-markos.chandras@imgtec.com>
@ 2012-01-17 17:00 ` Markos Chandras
  2012-01-19 16:32   ` Carmelo AMOROSO
  0 siblings, 1 reply; 3+ messages in thread
From: Markos Chandras @ 2012-01-17 17:00 UTC (permalink / raw)
  To: ltp-list

On 01/04/2012 10:26 AM, Markos Chandras wrote:
> - Include test.h header even when __UCLIBC__ is defined. It is required for the
> tst_brkm function
> - Move TCID variable definition to the top so I can be independent of whether
>    __UCLIBC is used or not.
>
> Signed-off-by: Markos Chandras<markos.chandras@imgtec.com>
> ---
>   .../kernel/syscalls/getcontext/getcontext01.c      |    7 +++++--
>   testcases/kernel/syscalls/profil/profil01.c        |    7 +++++--
>   2 files changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/getcontext/getcontext01.c b/testcases/kernel/syscalls/getcontext/getcontext01.c
> index 7cadc67..1cf2896 100644
> --- a/testcases/kernel/syscalls/getcontext/getcontext01.c
> +++ b/testcases/kernel/syscalls/getcontext/getcontext01.c
> @@ -34,6 +34,9 @@
>    **********************************************************/
>
>   #include<features.h>
> +
> +char *TCID = "getcontext01";	/* Test program identifier.    */
> +
>   #if !defined(__UCLIBC__)
>
>   #include<stdio.h>
> @@ -47,7 +50,6 @@
>   void setup();
>   void cleanup();
>
> -char *TCID = "getcontext01";	/* Test program identifier.    */
>   int TST_TOTAL = 1;		/* Total number of test cases. */
>
>   int exp_enos[] = { 0 };		/* must be a 0 terminated list */
> @@ -98,8 +100,9 @@ void cleanup()
>   }
>
>   #else /* systems that dont support obsolete getcontext */
> +#include "test.h"
>   int main()
>   {
>   	tst_brkm(TCONF, NULL, "system doesn't have getcontext support");
>   }
> -#endif
> \ No newline at end of file
> +#endif
> diff --git a/testcases/kernel/syscalls/profil/profil01.c b/testcases/kernel/syscalls/profil/profil01.c
> index 63bed83..571e6f0 100644
> --- a/testcases/kernel/syscalls/profil/profil01.c
> +++ b/testcases/kernel/syscalls/profil/profil01.c
> @@ -41,6 +41,9 @@
>   #endif
>
>   #include<features.h>
> +
> +char *TCID = "profil01";
> +
>   #ifndef __UCLIBC__
>
>   #ifdef __arm__
> @@ -73,7 +76,6 @@ volatile int t_flag;
>   //char progname[]= "profil1()";
>
>   /*****	LTP Port	*****/
> -char *TCID = "profil01";
>   int local_flag = PASSED;
>   int block_number;
>   FILE *temp;
> @@ -305,9 +307,10 @@ void fail_exit()
>   /*****	**	**	*****/
>
>   #else
> +#include "test.h"
>   int main(void)
>   {
>   	/* uClibc does not have profiling support */
>   	tst_exit();
>   }
> -#endif
> \ No newline at end of file
> +#endif

Ping?

Any comments on this? It fixes a build failure on uClibc platforms.

-- 
markos


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
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 12/21] syscalls/{getcontext, profil}: Multiple fixes
  2012-01-17 17:00 ` [LTP] [PATCH 12/21] syscalls/{getcontext, profil}: Multiple fixes Markos Chandras
@ 2012-01-19 16:32   ` Carmelo AMOROSO
  2012-01-20 10:23     ` Markos Chandras
  0 siblings, 1 reply; 3+ messages in thread
From: Carmelo AMOROSO @ 2012-01-19 16:32 UTC (permalink / raw)
  To: ltp-list

On 17/01/2012 18.00, Markos Chandras wrote:
> On 01/04/2012 10:26 AM, Markos Chandras wrote:
>> - Include test.h header even when __UCLIBC__ is defined. It is required for the
>> tst_brkm function
>> - Move TCID variable definition to the top so I can be independent of whether
>>    __UCLIBC is used or not.
>>
>> Signed-off-by: Markos Chandras<markos.chandras@imgtec.com>
>> ---
>>   .../kernel/syscalls/getcontext/getcontext01.c      |    7 +++++--
>>   testcases/kernel/syscalls/profil/profil01.c        |    7 +++++--
>>   2 files changed, 10 insertions(+), 4 deletions(-)
>>
>> diff --git a/testcases/kernel/syscalls/getcontext/getcontext01.c b/testcases/kernel/syscalls/getcontext/getcontext01.c
>> index 7cadc67..1cf2896 100644
>> --- a/testcases/kernel/syscalls/getcontext/getcontext01.c
>> +++ b/testcases/kernel/syscalls/getcontext/getcontext01.c
>> @@ -34,6 +34,9 @@
>>    **********************************************************/
>>
>>   #include<features.h>
>> +
>> +char *TCID = "getcontext01";	/* Test program identifier.    */
>> +
>>   #if !defined(__UCLIBC__)
>>
>>   #include<stdio.h>
>> @@ -47,7 +50,6 @@
>>   void setup();
>>   void cleanup();
>>
>> -char *TCID = "getcontext01";	/* Test program identifier.    */
>>   int TST_TOTAL = 1;		/* Total number of test cases. */
>>
>>   int exp_enos[] = { 0 };		/* must be a 0 terminated list */
>> @@ -98,8 +100,9 @@ void cleanup()
>>   }
>>
>>   #else /* systems that dont support obsolete getcontext */
>> +#include "test.h"
>>   int main()
>>   {
>>   	tst_brkm(TCONF, NULL, "system doesn't have getcontext support");
>>   }
>> -#endif
>> \ No newline at end of file
>> +#endif
>> diff --git a/testcases/kernel/syscalls/profil/profil01.c b/testcases/kernel/syscalls/profil/profil01.c
>> index 63bed83..571e6f0 100644
>> --- a/testcases/kernel/syscalls/profil/profil01.c
>> +++ b/testcases/kernel/syscalls/profil/profil01.c
>> @@ -41,6 +41,9 @@
>>   #endif
>>
>>   #include<features.h>
>> +
>> +char *TCID = "profil01";
>> +
>>   #ifndef __UCLIBC__
>>
>>   #ifdef __arm__
>> @@ -73,7 +76,6 @@ volatile int t_flag;
>>   //char progname[]= "profil1()";
>>
>>   /*****	LTP Port	*****/
>> -char *TCID = "profil01";
>>   int local_flag = PASSED;
>>   int block_number;
>>   FILE *temp;
>> @@ -305,9 +307,10 @@ void fail_exit()
>>   /*****	**	**	*****/
>>
>>   #else
>> +#include "test.h"
>>   int main(void)
>>   {
>>   	/* uClibc does not have profiling support */
>>   	tst_exit();
>>   }
>> -#endif
>> \ No newline at end of file
>> +#endif
> 
> Ping?
> 
> Any comments on this? It fixes a build failure on uClibc platforms.
> 

Hi,
I've posted two different patch with a different approach, that got the
Ack from Mike, so likely they will be included in master shortly.

Adding twice the "test.h" in both code path is not so clean, IMO.

cheers,
carmelo

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
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 12/21] syscalls/{getcontext, profil}: Multiple fixes
  2012-01-19 16:32   ` Carmelo AMOROSO
@ 2012-01-20 10:23     ` Markos Chandras
  0 siblings, 0 replies; 3+ messages in thread
From: Markos Chandras @ 2012-01-20 10:23 UTC (permalink / raw)
  To: ltp-list

On 01/19/2012 04:32 PM, Carmelo AMOROSO wrote:
> On 17/01/2012 18.00, Markos Chandras wrote:
>> On 01/04/2012 10:26 AM, Markos Chandras wrote:
>>> - Include test.h header even when __UCLIBC__ is defined. It is required for the
>>> tst_brkm function
>>> - Move TCID variable definition to the top so I can be independent of whether
>>>     __UCLIBC is used or not.
>>>
>>> Signed-off-by: Markos Chandras<markos.chandras@imgtec.com>
>>> ---
>>>    .../kernel/syscalls/getcontext/getcontext01.c      |    7 +++++--
>>>    testcases/kernel/syscalls/profil/profil01.c        |    7 +++++--
>>>    2 files changed, 10 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/testcases/kernel/syscalls/getcontext/getcontext01.c b/testcases/kernel/syscalls/getcontext/getcontext01.c
>>> index 7cadc67..1cf2896 100644
>>> --- a/testcases/kernel/syscalls/getcontext/getcontext01.c
>>> +++ b/testcases/kernel/syscalls/getcontext/getcontext01.c
>>> @@ -34,6 +34,9 @@
>>>     **********************************************************/
>>>
>>>    #include<features.h>
>>> +
>>> +char *TCID = "getcontext01";	/* Test program identifier.    */
>>> +
>>>    #if !defined(__UCLIBC__)
>>>
>>>    #include<stdio.h>
>>> @@ -47,7 +50,6 @@
>>>    void setup();
>>>    void cleanup();
>>>
>>> -char *TCID = "getcontext01";	/* Test program identifier.    */
>>>    int TST_TOTAL = 1;		/* Total number of test cases. */
>>>
>>>    int exp_enos[] = { 0 };		/* must be a 0 terminated list */
>>> @@ -98,8 +100,9 @@ void cleanup()
>>>    }
>>>
>>>    #else /* systems that dont support obsolete getcontext */
>>> +#include "test.h"
>>>    int main()
>>>    {
>>>    	tst_brkm(TCONF, NULL, "system doesn't have getcontext support");
>>>    }
>>> -#endif
>>> \ No newline at end of file
>>> +#endif
>>> diff --git a/testcases/kernel/syscalls/profil/profil01.c b/testcases/kernel/syscalls/profil/profil01.c
>>> index 63bed83..571e6f0 100644
>>> --- a/testcases/kernel/syscalls/profil/profil01.c
>>> +++ b/testcases/kernel/syscalls/profil/profil01.c
>>> @@ -41,6 +41,9 @@
>>>    #endif
>>>
>>>    #include<features.h>
>>> +
>>> +char *TCID = "profil01";
>>> +
>>>    #ifndef __UCLIBC__
>>>
>>>    #ifdef __arm__
>>> @@ -73,7 +76,6 @@ volatile int t_flag;
>>>    //char progname[]= "profil1()";
>>>
>>>    /*****	LTP Port	*****/
>>> -char *TCID = "profil01";
>>>    int local_flag = PASSED;
>>>    int block_number;
>>>    FILE *temp;
>>> @@ -305,9 +307,10 @@ void fail_exit()
>>>    /*****	**	**	*****/
>>>
>>>    #else
>>> +#include "test.h"
>>>    int main(void)
>>>    {
>>>    	/* uClibc does not have profiling support */
>>>    	tst_exit();
>>>    }
>>> -#endif
>>> \ No newline at end of file
>>> +#endif
>>
>> Ping?
>>
>> Any comments on this? It fixes a build failure on uClibc platforms.
>>
>
> Hi,
> I've posted two different patch with a different approach, that got the
> Ack from Mike, so likely they will be included in master shortly.
>
> Adding twice the "test.h" in both code path is not so clean, IMO.
>
> cheers,
> carmelo
>
Hi Carmelo,

Yeah I saw it. I agree that your patch is better. Thanks for fixing it ;)

-- 
markos


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
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:[~2012-01-20 10:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1325672810-5247-1-git-send-email-markos.chandras@imgtec.com>
2012-01-17 17:00 ` [LTP] [PATCH 12/21] syscalls/{getcontext, profil}: Multiple fixes Markos Chandras
2012-01-19 16:32   ` Carmelo AMOROSO
2012-01-20 10:23     ` Markos Chandras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox