:personality test case build fails
Hi Pradeep,
Quoted 20 lines · Pradeep K Surisetty
Here is the list of platforms on which "personality test case" fails.
Platforms:
e326,x366kernel:
2.6.16.60-0.46.6-smpBuild Failure:
cc -I../../../../include -Wall
personality01.c-L../../../../lib -lltp
-o personality01/tmp/cc2aVCsG.o: In function `main':
personality01.c:(.text+0x58): undefined reference topersonality' personality01.c:(.text+0xb6): undefined reference topersonality' personality01.c:(.text+0x1a5): undefined reference to `personality'
collect2: ld returned 1 exit status
make: *** [personality01] Error 1
Quoted 2 lines
Subrata,
Can you point me, if any work around exists for this.
The following patch will probably fix the issue on your system. Please test this patch and let me know.
---
testcases/kernel/syscalls/personality/personality01.c renamed from testcases/kernel/syscalls/personality/personality01.c.orig +9 -1
@@ -58,7 +58,7 @@#include "usctest.h" #include <errno.h> -#include <linux/personality.h> +#include <sys/personality.h> #undef personalityextern int personality (unsigned long );
@@ -75,6 +75,7 @@ int pers[] = { PER_LINUX, PER_LINUX_32BIPER_IRIX32 ,PER_IRIXN32 ,PER_IRIX64 }; +#ifdef __NR_personalityint main (int ac,char **av) {int lc;/* loop counter */
@@ -146,6 +147,13 @@ int main(int ac, char **av) /*NOTREACHED*/ return 0; } +#else +int main (int ac,char **av) +{ +tst_resm (TCONF ,"personality() not defined in your system" ); +tst_exit (); +} +#endif /* * setup() - performs all the ONE TIME setup for this test.
testcases/kernel/syscalls/personality/personality02.c renamed from testcases/kernel/syscalls/personality/personality02.c.orig +9 -0
@@ -79,6 +79,7 @@ extern int Tst_count;#define PER_BAD 0x00dd/* A non-existent personality type */ +#ifdef __NR_personalityint main (int ac,char **av) {int lc;/* loop counter */
@@ -128,6 +129,14 @@ int main(int ac, char **av) /*NOTREACHED*/ return 0; } +#else +int main (int ac,char **av) +{ +tst_resm (TCONF ,"personality() not defined in your system" ); +tst_exit (); +} +#endif +/* * setup() - performs all the ONE TIME setup for this test.
---
Regards--
Subrata
Quoted 4 lines
-Pradeep
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 22 lines · Subrata Modak
Hi Pradeep,
Quoted 20 lines · Pradeep K Surisetty
Here is the list of platforms on which "personality test case" fails.
Platforms:
e326,x366kernel:
2.6.16.60-0.46.6-smpBuild Failure:
cc -I../../../../include -Wall
personality01.c-L../../../../lib -lltp
-o personality01/tmp/cc2aVCsG.o: In function `main':
personality01.c:(.text+0x58): undefined reference topersonality' personality01.c:(.text+0xb6): undefined reference topersonality' personality01.c:(.text+0x1a5): undefined reference to `personality'
collect2: ld returned 1 exit status
make: *** [personality01] Error 1
Quoted 7 lines
Quoted 2 lines
Subrata,
Can you point me, if any work around exists for this.The following patch will probably fix the issue on your system. Please test this patch and let me know.
Signed-off-by Subrata Modak <[email protected]>,
I checked in this.
Regards--
Subrata
Quoted 62 lines
---
testcases/kernel/syscalls/personality/personality01.c renamed from testcases/kernel/syscalls/personality/personality01.c.orig +9
-1@@ -58,7 +58,7 @@#include "usctest.h" #include <errno.h> -#include <linux/personality.h> +#include <sys/personality.h> #undef personalityextern int personality (unsigned long );@@ -75,6 +75,7 @@ int pers[] = { PER_LINUX, PER_LINUX_32BIPER_IRIX32 ,PER_IRIXN32 ,PER_IRIX64 }; +#ifdef __NR_personalityint main (int ac,char **av) {int lc;/* loop counter */ @@ -146,6 +147,13 @@ int main(int ac, char **av) /*NOTREACHED*/ return 0; } +#else +int main (int ac,char **av) +{ +tst_resm (TCONF ,"personality() not defined in your system" ); +tst_exit (); +} +#endif /* * setup() - performs all the ONE TIME setup for this test. testcases/kernel/syscalls/personality/personality02.c renamed from testcases/kernel/syscalls/personality/personality02.c.orig +9
-1@@ -79,6 +79,7 @@ extern int Tst_count;#define PER_BAD 0x00dd/* A non-existent personality type */ +#ifdef __NR_personalityint main (int ac,char **av) {int lc;/* loop counter */ @@ -128,6 +129,14 @@ int main(int ac, char **av) /*NOTREACHED*/ return 0; } +#else +int main (int ac,char **av) +{ +tst_resm (TCONF ,"personality() not defined in your system" ); +tst_exit (); +} +#endif +/* * setup() - performs all the ONE TIME setup for this test. ---
Quoted 7 lines
Regards--
SubrataQuoted 4 lines
-Pradeep
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list