public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] getcontext01: fix build using uClibc C runtime
@ 2012-01-18 14:36 Carmelo AMOROSO
  2012-01-18 14:36 ` [LTP] [PATCH 2/2] profile01: fix build using uClibc runtime Carmelo AMOROSO
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Carmelo AMOROSO @ 2012-01-18 14:36 UTC (permalink / raw)
  To: ltp-list

Fix a build error when __UCLIBC__ is defined (see log below)
by moving "test.h", "unistd.h" and TCID on top of file as required
by 'tst_brkm' function.

---
getcontext01.c: In function ‘main’:
getcontext01.c:103:2: warning: implicit declaration of function ‘tst_brkm’
getcontext01.c:103:11: error: ‘TCONF’ undeclared (first use in this function)
getcontext01.c:103:11: note: each undeclared identifier is reported only once for each function it appears in
getcontext01.c:103:18: error: ‘NULL’ undeclared (first use in this function)
getcontext01.c:104:1: warning: control reaches end of non-void function
---

Signed-off-by: Francesco Rundo <francesco.rundo@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
---
 .../kernel/syscalls/getcontext/getcontext01.c      |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/testcases/kernel/syscalls/getcontext/getcontext01.c b/testcases/kernel/syscalls/getcontext/getcontext01.c
index 7cadc67..8f6e919 100644
--- a/testcases/kernel/syscalls/getcontext/getcontext01.c
+++ b/testcases/kernel/syscalls/getcontext/getcontext01.c
@@ -34,20 +34,21 @@
  **********************************************************/
 
 #include <features.h>
+#include <unistd.h>
+#include "test.h"
+char *TCID = "getcontext01";	/* Test program identifier.    */
+
 #if !defined(__UCLIBC__)
 
 #include <stdio.h>
-#include <unistd.h>
 #include <errno.h>
 #include <ucontext.h>
 
-#include "test.h"
 #include "usctest.h"
 
 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 */
@@ -102,4 +103,4 @@ int main()
 {
 	tst_brkm(TCONF, NULL, "system doesn't have getcontext support");
 }
-#endif
\ No newline at end of file
+#endif
-- 
1.7.4.4


------------------------------------------------------------------------------
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 related	[flat|nested] 15+ messages in thread

* [LTP] [PATCH 2/2] profile01: fix build using uClibc runtime
  2012-01-18 14:36 [LTP] [PATCH 1/2] getcontext01: fix build using uClibc C runtime Carmelo AMOROSO
@ 2012-01-18 14:36 ` Carmelo AMOROSO
  2012-01-18 15:16   ` Mike Frysinger
  2012-01-18 15:44   ` [LTP] [PATCH 2/2 V2] " Carmelo AMOROSO
  2012-01-18 15:16 ` [LTP] [PATCH 1/2] getcontext01: fix build using uClibc C runtime Mike Frysinger
  2012-01-18 15:44 ` [LTP] [PATCH 1/2 V2] " Carmelo AMOROSO
  2 siblings, 2 replies; 15+ messages in thread
From: Carmelo AMOROSO @ 2012-01-18 14:36 UTC (permalink / raw)
  To: ltp-list

Fix a build error when __UCLIBC__ is defined (see log below)
by moving "test.h" and TCID on top of file as required by 'tst_brkm' function.

---
profil01.c: In function ‘main’:
profil01.c:311:2: warning: implicit declaration of function ‘tst_exit’
profil01.c:312:1: warning: control reaches end of non-void function
../../../../lib/libltp.a(tst_res.o): In function `cat_file':
/stlinux/amorosoc/git/stm/ltp/lib/tst_res.c:733: undefined reference to `TCID'
../../../../lib/libltp.a(tst_res.o): In function `tst_res':
/stlinux/amorosoc/git/stm/ltp/lib/tst_res.c:300: undefined reference to `TCID'
/stlinux/amorosoc/git/stm/ltp/lib/tst_res.c:284: undefined reference to `TCID'
/stlinux/amorosoc/git/stm/ltp/lib/tst_res.c:323: undefined reference to `TCID'
../../../../lib/libltp.a(tst_res.o): In function `tst_brk':
/stlinux/amorosoc/git/stm/ltp/lib/tst_res.c:634: undefined reference to `TCID'
collect2: ld returned 1 exit status
---

Signed-off-by: Francesco Rundo <francesco.rundo@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
---
 testcases/kernel/syscalls/profil/profil01.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/testcases/kernel/syscalls/profil/profil01.c b/testcases/kernel/syscalls/profil/profil01.c
index 63bed83..248e012 100644
--- a/testcases/kernel/syscalls/profil/profil01.c
+++ b/testcases/kernel/syscalls/profil/profil01.c
@@ -41,6 +41,8 @@
 #endif
 
 #include <features.h>
+#include "test.h"
+char *TCID = "profil01";
 #ifndef __UCLIBC__
 
 #ifdef __arm__
@@ -58,7 +60,6 @@
 #include <errno.h>
 #include <sys/types.h>
 #include <sys/wait.h>
-#include "test.h"
 #include "usctest.h"
 #define FAILED 0
 #define PASSED 1
@@ -73,7 +74,6 @@ volatile int t_flag;
 //char progname[]= "profil1()";
 
 /*****	LTP Port	*****/
-char *TCID = "profil01";
 int local_flag = PASSED;
 int block_number;
 FILE *temp;
@@ -310,4 +310,4 @@ int main(void)
 	/* uClibc does not have profiling support */
 	tst_exit();
 }
-#endif
\ No newline at end of file
+#endif
-- 
1.7.4.4


------------------------------------------------------------------------------
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 related	[flat|nested] 15+ messages in thread

* Re: [LTP] [PATCH 1/2] getcontext01: fix build using uClibc C runtime
  2012-01-18 14:36 [LTP] [PATCH 1/2] getcontext01: fix build using uClibc C runtime Carmelo AMOROSO
  2012-01-18 14:36 ` [LTP] [PATCH 2/2] profile01: fix build using uClibc runtime Carmelo AMOROSO
@ 2012-01-18 15:16 ` Mike Frysinger
  2012-01-18 15:31   ` Carmelo AMOROSO
  2012-01-18 15:44 ` [LTP] [PATCH 1/2 V2] " Carmelo AMOROSO
  2 siblings, 1 reply; 15+ messages in thread
From: Mike Frysinger @ 2012-01-18 15:16 UTC (permalink / raw)
  To: ltp-list


[-- Attachment #1.1: Type: Text/Plain, Size: 780 bytes --]

On Wednesday 18 January 2012 09:36:47 Carmelo AMOROSO wrote:
> --- a/testcases/kernel/syscalls/getcontext/getcontext01.c
> +++ b/testcases/kernel/syscalls/getcontext/getcontext01.c
> 
>  #include <features.h>
> +#include <unistd.h>
> +#include "test.h"
> +char *TCID = "getcontext01";	/* Test program identifier.    */
> +
>  #if !defined(__UCLIBC__)
> 
>  #include <stdio.h>
> -#include <unistd.h>
>  #include <errno.h>
>  #include <ucontext.h>
> 
> -#include "test.h"
>  #include "usctest.h"

all of the system includes should come before LTP includes.  i would just move 
the whole block above the #ifdef check.

also, checking __UCLIBC__ is a bit broken now ... we should use configure.ac to 
test for the func and change this test accordingly.
-mike

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

------------------------------------------------------------------------------
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

[-- Attachment #3: 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] 15+ messages in thread

* Re: [LTP] [PATCH 2/2] profile01: fix build using uClibc runtime
  2012-01-18 14:36 ` [LTP] [PATCH 2/2] profile01: fix build using uClibc runtime Carmelo AMOROSO
@ 2012-01-18 15:16   ` Mike Frysinger
  2012-01-18 15:44   ` [LTP] [PATCH 2/2 V2] " Carmelo AMOROSO
  1 sibling, 0 replies; 15+ messages in thread
From: Mike Frysinger @ 2012-01-18 15:16 UTC (permalink / raw)
  To: ltp-list


[-- Attachment #1.1: Type: Text/Plain, Size: 46 bytes --]

same feedback as the getcontext01 patch
-mike

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

------------------------------------------------------------------------------
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

[-- Attachment #3: 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] 15+ messages in thread

* Re: [LTP] [PATCH 1/2] getcontext01: fix build using uClibc C runtime
  2012-01-18 15:16 ` [LTP] [PATCH 1/2] getcontext01: fix build using uClibc C runtime Mike Frysinger
@ 2012-01-18 15:31   ` Carmelo AMOROSO
  0 siblings, 0 replies; 15+ messages in thread
From: Carmelo AMOROSO @ 2012-01-18 15:31 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: ltp-list

On 18/01/2012 16.16, Mike Frysinger wrote:
> On Wednesday 18 January 2012 09:36:47 Carmelo AMOROSO wrote:
>> --- a/testcases/kernel/syscalls/getcontext/getcontext01.c +++
>> b/testcases/kernel/syscalls/getcontext/getcontext01.c
>> 
>> #include <features.h> +#include <unistd.h> +#include "test.h" 
>> +char *TCID = "getcontext01";	/* Test program identifier.    */ 
>> + #if !defined(__UCLIBC__)
>> 
>> #include <stdio.h> -#include <unistd.h> #include <errno.h> 
>> #include <ucontext.h>
>> 
>> -#include "test.h" #include "usctest.h"
> 
> all of the system includes should come before LTP includes.  i
> would just move the whole block above the #ifdef check.
> 

ok, make sense.


> also, checking __UCLIBC__ is a bit broken now ... we should use
> configure.ac to test for the func and change this test
> accordingly.

yeah... there are few other occurrences of testing for __UCLIBC__ macro.
I should have sent this a lot of times ago ;-)

I'd send a new version moving the include block all together, and
keeping for now the __UCLIBC__ check, as a temporary solution.

> -mike

thanks,
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] 15+ messages in thread

* [LTP] [PATCH 1/2 V2] getcontext01: fix build using uClibc C runtime
  2012-01-18 14:36 [LTP] [PATCH 1/2] getcontext01: fix build using uClibc C runtime Carmelo AMOROSO
  2012-01-18 14:36 ` [LTP] [PATCH 2/2] profile01: fix build using uClibc runtime Carmelo AMOROSO
  2012-01-18 15:16 ` [LTP] [PATCH 1/2] getcontext01: fix build using uClibc C runtime Mike Frysinger
@ 2012-01-18 15:44 ` Carmelo AMOROSO
  2012-01-18 16:46   ` Mike Frysinger
  2012-01-20 13:40   ` Cyril Hrubis
  2 siblings, 2 replies; 15+ messages in thread
From: Carmelo AMOROSO @ 2012-01-18 15:44 UTC (permalink / raw)
  To: ltp-list

Fix a build error when __UCLIBC__ is defined (see log below)
by moving all headers inclusion and TCID definition on top of file
as they are required by 'tst_brkm' function too.

---
getcontext01.c: In function ‘main’:
getcontext01.c:103:2: warning: implicit declaration of function ‘tst_brkm’
getcontext01.c:103:11: error: ‘TCONF’ undeclared (first use in this function)
getcontext01.c:103:11: note: each undeclared identifier is reported only once for each function it appears in
getcontext01.c:103:18: error: ‘NULL’ undeclared (first use in this function)
getcontext01.c:104:1: warning: control reaches end of non-void function
---

Signed-off-by: Francesco Rundo <francesco.rundo@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
---
 .../kernel/syscalls/getcontext/getcontext01.c      |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/testcases/kernel/syscalls/getcontext/getcontext01.c b/testcases/kernel/syscalls/getcontext/getcontext01.c
index 7cadc67..e479a6a 100644
--- a/testcases/kernel/syscalls/getcontext/getcontext01.c
+++ b/testcases/kernel/syscalls/getcontext/getcontext01.c
@@ -34,7 +34,6 @@
  **********************************************************/
 
 #include <features.h>
-#if !defined(__UCLIBC__)
 
 #include <stdio.h>
 #include <unistd.h>
@@ -44,10 +43,13 @@
 #include "test.h"
 #include "usctest.h"
 
+char *TCID = "getcontext01";	/* Test program identifier.    */
+
+#if !defined(__UCLIBC__)
+
 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 */
@@ -102,4 +104,4 @@ int main()
 {
 	tst_brkm(TCONF, NULL, "system doesn't have getcontext support");
 }
-#endif
\ No newline at end of file
+#endif
-- 
1.7.4.4


------------------------------------------------------------------------------
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 related	[flat|nested] 15+ messages in thread

* [LTP] [PATCH 2/2 V2] profile01: fix build using uClibc runtime
  2012-01-18 14:36 ` [LTP] [PATCH 2/2] profile01: fix build using uClibc runtime Carmelo AMOROSO
  2012-01-18 15:16   ` Mike Frysinger
@ 2012-01-18 15:44   ` Carmelo AMOROSO
  2012-01-18 16:46     ` Mike Frysinger
  1 sibling, 1 reply; 15+ messages in thread
From: Carmelo AMOROSO @ 2012-01-18 15:44 UTC (permalink / raw)
  To: ltp-list

Fix a build error when __UCLIBC__ is defined (see log below)
by moving all headers inclusion and TCID definition on top of file
as they are required by 'tst_brkm' function too.

---
profil01.c: In function ‘main’:
profil01.c:311:2: warning: implicit declaration of function ‘tst_exit’
profil01.c:312:1: warning: control reaches end of non-void function
 ../../../../lib/libltp.a(tst_res.o): In function `cat_file':
/stlinux/amorosoc/git/stm/ltp/lib/tst_res.c:733: undefined reference to `TCID'
../../../../lib/libltp.a(tst_res.o): In function `tst_res':
/stlinux/amorosoc/git/stm/ltp/lib/tst_res.c:300: undefined reference to `TCID'
/stlinux/amorosoc/git/stm/ltp/lib/tst_res.c:284: undefined reference to `TCID'
/stlinux/amorosoc/git/stm/ltp/lib/tst_res.c:323: undefined reference to `TCID'
../../../../lib/libltp.a(tst_res.o): In function `tst_brk':
/stlinux/amorosoc/git/stm/ltp/lib/tst_res.c:634: undefined reference to `TCID'
collect2: ld returned 1 exit status
 ---

Signed-off-by: Francesco Rundo <francesco.rundo@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
---
 testcases/kernel/syscalls/profil/profil01.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/testcases/kernel/syscalls/profil/profil01.c b/testcases/kernel/syscalls/profil/profil01.c
index 63bed83..99eecdb 100644
--- a/testcases/kernel/syscalls/profil/profil01.c
+++ b/testcases/kernel/syscalls/profil/profil01.c
@@ -41,18 +41,9 @@
 #endif
 
 #include <features.h>
-#ifndef __UCLIBC__
-
-#ifdef __arm__
-#define ADDRESS_OFFSET 0x8000
-#else
-#define ADDRESS_OFFSET 0
-#endif
-
 #include <stdio.h>
 #include <signal.h>
 #include <limits.h>
-/*****	LTP Port	*****/
 #include <stdlib.h>
 #include <unistd.h>
 #include <errno.h>
@@ -60,9 +51,19 @@
 #include <sys/wait.h>
 #include "test.h"
 #include "usctest.h"
+
+char *TCID = "profil01";
+
+#ifndef __UCLIBC__
+
+#ifdef __arm__
+#define ADDRESS_OFFSET 0x8000
+#else
+#define ADDRESS_OFFSET 0
+#endif
+
 #define FAILED 0
 #define PASSED 1
-/*****	**	**	*****/
 
 #define P_TIME		10	/* profile for this many  seconds */
 
@@ -73,7 +74,6 @@ volatile int t_flag;
 //char progname[]= "profil1()";
 
 /*****	LTP Port	*****/
-char *TCID = "profil01";
 int local_flag = PASSED;
 int block_number;
 FILE *temp;
@@ -310,4 +310,4 @@ int main(void)
 	/* uClibc does not have profiling support */
 	tst_exit();
 }
-#endif
\ No newline at end of file
+#endif
-- 
1.7.4.4


------------------------------------------------------------------------------
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 related	[flat|nested] 15+ messages in thread

* Re: [LTP] [PATCH 2/2 V2] profile01: fix build using uClibc runtime
  2012-01-18 15:44   ` [LTP] [PATCH 2/2 V2] " Carmelo AMOROSO
@ 2012-01-18 16:46     ` Mike Frysinger
  0 siblings, 0 replies; 15+ messages in thread
From: Mike Frysinger @ 2012-01-18 16:46 UTC (permalink / raw)
  To: ltp-list


[-- Attachment #1.1: Type: Text/Plain, Size: 51 bytes --]

Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

------------------------------------------------------------------------------
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

[-- Attachment #3: 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] 15+ messages in thread

* Re: [LTP] [PATCH 1/2 V2] getcontext01: fix build using uClibc C runtime
  2012-01-18 15:44 ` [LTP] [PATCH 1/2 V2] " Carmelo AMOROSO
@ 2012-01-18 16:46   ` Mike Frysinger
  2012-01-20 13:40   ` Cyril Hrubis
  1 sibling, 0 replies; 15+ messages in thread
From: Mike Frysinger @ 2012-01-18 16:46 UTC (permalink / raw)
  To: ltp-list


[-- Attachment #1.1: Type: Text/Plain, Size: 51 bytes --]

Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

------------------------------------------------------------------------------
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

[-- Attachment #3: 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] 15+ messages in thread

* Re: [LTP] [PATCH 1/2 V2] getcontext01: fix build using uClibc C runtime
  2012-01-18 15:44 ` [LTP] [PATCH 1/2 V2] " Carmelo AMOROSO
  2012-01-18 16:46   ` Mike Frysinger
@ 2012-01-20 13:40   ` Cyril Hrubis
  2012-01-23 10:01     ` [LTP] [PATCH 1/2 V3] " Carmelo AMOROSO
  1 sibling, 1 reply; 15+ messages in thread
From: Cyril Hrubis @ 2012-01-20 13:40 UTC (permalink / raw)
  To: Carmelo AMOROSO; +Cc: ltp-list

Hi!
> Fix a build error when __UCLIBC__ is defined (see log below)
> by moving all headers inclusion and TCID definition on top of file
> as they are required by 'tst_brkm' function too.
> 
> ---
> getcontext01.c: In function ???main???:
> getcontext01.c:103:2: warning: implicit declaration of function ???tst_brkm???
> getcontext01.c:103:11: error: ???TCONF??? undeclared (first use in this function)
> getcontext01.c:103:11: note: each undeclared identifier is reported only once for each function it appears in
> getcontext01.c:103:18: error: ???NULL??? undeclared (first use in this function)
> getcontext01.c:104:1: warning: control reaches end of non-void function
> ---
> 
> Signed-off-by: Francesco Rundo <francesco.rundo@st.com>
> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>

These signed off lines are added to comment sectioin (after the ---)
that gets stripped when applying. Please resend these two patches with
signed off lines right after the patch description. 

-- 
Cyril Hrubis
chrubis@suse.cz

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

* [LTP] [PATCH 1/2 V3] getcontext01: fix build using uClibc C runtime
  2012-01-20 13:40   ` Cyril Hrubis
@ 2012-01-23 10:01     ` Carmelo AMOROSO
  2012-01-23 10:01       ` [LTP] [PATCH 2/2 V3] profile01: fix build using uClibc runtime Carmelo AMOROSO
                         ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Carmelo AMOROSO @ 2012-01-23 10:01 UTC (permalink / raw)
  To: ltp-list

Fix a build error when __UCLIBC__ is defined (see log below)
by moving all headers inclusion and TCID definition on top of file
as they are required by 'tst_brkm' function too.

getcontext01.c: In function ‘main’:
getcontext01.c:103:2: warning: implicit declaration of function ‘tst_brkm’
getcontext01.c:103:11: error: ‘TCONF’ undeclared (first use in this function)
getcontext01.c:103:11: note: each undeclared identifier is reported only once for each function it appears in
getcontext01.c:103:18: error: ‘NULL’ undeclared (first use in this function)
getcontext01.c:104:1: warning: control reaches end of non-void function

Signed-off-by: Francesco Rundo <francesco.rundo@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
---
 .../kernel/syscalls/getcontext/getcontext01.c      |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/testcases/kernel/syscalls/getcontext/getcontext01.c b/testcases/kernel/syscalls/getcontext/getcontext01.c
index 7cadc67..e479a6a 100644
--- a/testcases/kernel/syscalls/getcontext/getcontext01.c
+++ b/testcases/kernel/syscalls/getcontext/getcontext01.c
@@ -34,7 +34,6 @@
  **********************************************************/
 
 #include <features.h>
-#if !defined(__UCLIBC__)
 
 #include <stdio.h>
 #include <unistd.h>
@@ -44,10 +43,13 @@
 #include "test.h"
 #include "usctest.h"
 
+char *TCID = "getcontext01";	/* Test program identifier.    */
+
+#if !defined(__UCLIBC__)
+
 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 */
@@ -102,4 +104,4 @@ int main()
 {
 	tst_brkm(TCONF, NULL, "system doesn't have getcontext support");
 }
-#endif
\ No newline at end of file
+#endif
-- 
1.7.4.4


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
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-dev2
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* [LTP] [PATCH 2/2 V3] profile01: fix build using uClibc runtime
  2012-01-23 10:01     ` [LTP] [PATCH 1/2 V3] " Carmelo AMOROSO
@ 2012-01-23 10:01       ` Carmelo AMOROSO
  2012-01-24  1:09         ` Mike Frysinger
  2012-01-24  1:09       ` [LTP] [PATCH 1/2 V3] getcontext01: fix build using uClibc C runtime Mike Frysinger
  2012-01-25 13:55       ` Cyril Hrubis
  2 siblings, 1 reply; 15+ messages in thread
From: Carmelo AMOROSO @ 2012-01-23 10:01 UTC (permalink / raw)
  To: ltp-list

Fix a build error when __UCLIBC__ is defined (see log below)
by moving all headers inclusion and TCID definition on top of file
as they are required by 'tst_brkm' function too.

profil01.c: In function ‘main’:
profil01.c:311:2: warning: implicit declaration of function ‘tst_exit’
profil01.c:312:1: warning: control reaches end of non-void function
 ../../../../lib/libltp.a(tst_res.o): In function `cat_file':
/stlinux/amorosoc/git/stm/ltp/lib/tst_res.c:733: undefined reference to `TCID'
../../../../lib/libltp.a(tst_res.o): In function `tst_res':
/stlinux/amorosoc/git/stm/ltp/lib/tst_res.c:300: undefined reference to `TCID'
/stlinux/amorosoc/git/stm/ltp/lib/tst_res.c:284: undefined reference to `TCID'
/stlinux/amorosoc/git/stm/ltp/lib/tst_res.c:323: undefined reference to `TCID'
../../../../lib/libltp.a(tst_res.o): In function `tst_brk':
/stlinux/amorosoc/git/stm/ltp/lib/tst_res.c:634: undefined reference to `TCID'
collect2: ld returned 1 exit status

Signed-off-by: Francesco Rundo <francesco.rundo@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
---
 testcases/kernel/syscalls/profil/profil01.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/testcases/kernel/syscalls/profil/profil01.c b/testcases/kernel/syscalls/profil/profil01.c
index 63bed83..99eecdb 100644
--- a/testcases/kernel/syscalls/profil/profil01.c
+++ b/testcases/kernel/syscalls/profil/profil01.c
@@ -41,18 +41,9 @@
 #endif
 
 #include <features.h>
-#ifndef __UCLIBC__
-
-#ifdef __arm__
-#define ADDRESS_OFFSET 0x8000
-#else
-#define ADDRESS_OFFSET 0
-#endif
-
 #include <stdio.h>
 #include <signal.h>
 #include <limits.h>
-/*****	LTP Port	*****/
 #include <stdlib.h>
 #include <unistd.h>
 #include <errno.h>
@@ -60,9 +51,19 @@
 #include <sys/wait.h>
 #include "test.h"
 #include "usctest.h"
+
+char *TCID = "profil01";
+
+#ifndef __UCLIBC__
+
+#ifdef __arm__
+#define ADDRESS_OFFSET 0x8000
+#else
+#define ADDRESS_OFFSET 0
+#endif
+
 #define FAILED 0
 #define PASSED 1
-/*****	**	**	*****/
 
 #define P_TIME		10	/* profile for this many  seconds */
 
@@ -73,7 +74,6 @@ volatile int t_flag;
 //char progname[]= "profil1()";
 
 /*****	LTP Port	*****/
-char *TCID = "profil01";
 int local_flag = PASSED;
 int block_number;
 FILE *temp;
@@ -310,4 +310,4 @@ int main(void)
 	/* uClibc does not have profiling support */
 	tst_exit();
 }
-#endif
\ No newline at end of file
+#endif
-- 
1.7.4.4


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
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-dev2
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [PATCH 1/2 V3] getcontext01: fix build using uClibc C runtime
  2012-01-23 10:01     ` [LTP] [PATCH 1/2 V3] " Carmelo AMOROSO
  2012-01-23 10:01       ` [LTP] [PATCH 2/2 V3] profile01: fix build using uClibc runtime Carmelo AMOROSO
@ 2012-01-24  1:09       ` Mike Frysinger
  2012-01-25 13:55       ` Cyril Hrubis
  2 siblings, 0 replies; 15+ messages in thread
From: Mike Frysinger @ 2012-01-24  1:09 UTC (permalink / raw)
  To: ltp-list


[-- Attachment #1.1: Type: Text/Plain, Size: 51 bytes --]

Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

------------------------------------------------------------------------------
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

[-- Attachment #3: 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] 15+ messages in thread

* Re: [LTP] [PATCH 2/2 V3] profile01: fix build using uClibc runtime
  2012-01-23 10:01       ` [LTP] [PATCH 2/2 V3] profile01: fix build using uClibc runtime Carmelo AMOROSO
@ 2012-01-24  1:09         ` Mike Frysinger
  0 siblings, 0 replies; 15+ messages in thread
From: Mike Frysinger @ 2012-01-24  1:09 UTC (permalink / raw)
  To: ltp-list


[-- Attachment #1.1: Type: Text/Plain, Size: 51 bytes --]

Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

------------------------------------------------------------------------------
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

[-- Attachment #3: 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] 15+ messages in thread

* Re: [LTP] [PATCH 1/2 V3] getcontext01: fix build using uClibc C runtime
  2012-01-23 10:01     ` [LTP] [PATCH 1/2 V3] " Carmelo AMOROSO
  2012-01-23 10:01       ` [LTP] [PATCH 2/2 V3] profile01: fix build using uClibc runtime Carmelo AMOROSO
  2012-01-24  1:09       ` [LTP] [PATCH 1/2 V3] getcontext01: fix build using uClibc C runtime Mike Frysinger
@ 2012-01-25 13:55       ` Cyril Hrubis
  2 siblings, 0 replies; 15+ messages in thread
From: Cyril Hrubis @ 2012-01-25 13:55 UTC (permalink / raw)
  To: Carmelo AMOROSO; +Cc: ltp-list

Hi!
> Fix a build error when __UCLIBC__ is defined (see log below)
> by moving all headers inclusion and TCID definition on top of file
> as they are required by 'tst_brkm' function too.
> 
> getcontext01.c: In function ‘main’:
> getcontext01.c:103:2: warning: implicit declaration of function ‘tst_brkm’
> getcontext01.c:103:11: error: ‘TCONF’ undeclared (first use in this function)
> getcontext01.c:103:11: note: each undeclared identifier is reported only once for each function it appears in
> getcontext01.c:103:18: error: ‘NULL’ undeclared (first use in this function)
> getcontext01.c:104:1: warning: control reaches end of non-void function
> 
> Signed-off-by: Francesco Rundo <francesco.rundo@st.com>
> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>

Both commited, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

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

end of thread, other threads:[~2012-01-25 13:42 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-18 14:36 [LTP] [PATCH 1/2] getcontext01: fix build using uClibc C runtime Carmelo AMOROSO
2012-01-18 14:36 ` [LTP] [PATCH 2/2] profile01: fix build using uClibc runtime Carmelo AMOROSO
2012-01-18 15:16   ` Mike Frysinger
2012-01-18 15:44   ` [LTP] [PATCH 2/2 V2] " Carmelo AMOROSO
2012-01-18 16:46     ` Mike Frysinger
2012-01-18 15:16 ` [LTP] [PATCH 1/2] getcontext01: fix build using uClibc C runtime Mike Frysinger
2012-01-18 15:31   ` Carmelo AMOROSO
2012-01-18 15:44 ` [LTP] [PATCH 1/2 V2] " Carmelo AMOROSO
2012-01-18 16:46   ` Mike Frysinger
2012-01-20 13:40   ` Cyril Hrubis
2012-01-23 10:01     ` [LTP] [PATCH 1/2 V3] " Carmelo AMOROSO
2012-01-23 10:01       ` [LTP] [PATCH 2/2 V3] profile01: fix build using uClibc runtime Carmelo AMOROSO
2012-01-24  1:09         ` Mike Frysinger
2012-01-24  1:09       ` [LTP] [PATCH 1/2 V3] getcontext01: fix build using uClibc C runtime Mike Frysinger
2012-01-25 13:55       ` Cyril Hrubis

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