When making with -m32 in x86_64 kernel, the cases will fail. Please refer to the following log.
# ./set_thread_area01 set_thread_area01 1 TFAIL : failed - errno = 22 : Invalid argument # ./set_thread_area02 set_thread_area_02 1 TFAIL : call get_thread_area() failed: TEST_ERRNO=EINVAL(22): Invalid argument Signed-off-by: Peng Haitao <[email protected]> --- .../syscalls/set_thread_area/set_thread_area01.c | 11 ++++++++--- .../syscalls/set_thread_area/set_thread_area02.c | 8 +++++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/testcases/kernel/syscalls/set_thread_area/set_thread_area01.c b/testcases/kernel/syscalls/set_thread_area/set_thread_area01.c index 3bda657..1c22c19 100644 --- a/testcases/kernel/syscalls/set_thread_area/set_thread_area01.c +++ b/testcases/kernel/syscalls/set_thread_area/set_thread_area01.c @@ -43,6 +43,7 @@ * Manas Kumar Nayak [email protected]> *****************************************************************************/ +#include <sys/utsname.h> #include "set_thread_area.h" /* Global Variables */ @@ -109,6 +110,7 @@ int main(int ac, char **av) { thread_area_s u_info; int lc; /* loop counter */ char *msg; /* message returned from parse_opts */ + struct utsname uval; /* parse standard options */ if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) { @@ -116,6 +118,7 @@ int main(int ac, char **av) { tst_exit(); } + uname(&uval); setup(); for (lc = 0; TEST_LOOPING(lc); ++lc) { @@ -123,8 +126,10 @@ int main(int ac, char **av) { Tst_count = 0; for (testno = 0; testno < TST_TOTAL; ++testno) { - - u_info.entry_number = 6; + if (strcmp(uval.machine, "x86_64") == 0) + u_info.entry_number = 12; + else + u_info.entry_number = 6; /* * This call to get_thread_area function should be @@ -175,4 +180,4 @@ int main(void) { "architecture"); tst_exit(); } -#endif \ No newline at end of file +#endif diff --git a/testcases/kernel/syscalls/set_thread_area/set_thread_area02.c b/testcases/kernel/syscalls/set_thread_area/set_thread_area02.c index ff8710c..65b65ae 100644 --- a/testcases/kernel/syscalls/set_thread_area/set_thread_area02.c +++ b/testcases/kernel/syscalls/set_thread_area/set_thread_area02.c @@ -49,6 +49,7 @@ /* History: Porting from Crackerjack to LTP is done by */ /* Manas Kumar Nayak [email protected]> */ /************************************************************************/ +#include <sys/utsname.h> #include "set_thread_area.h" /* Global Variables */ @@ -75,10 +76,15 @@ void setup() int main(int ac, char **av) { thread_area_s u_info; + struct utsname uval; + uname(&uval); setup(); - u_info.entry_number = 6; + if (strcmp(uval.machine, "x86_64") == 0) + u_info.entry_number = 12; + else + u_info.entry_number = 6; TEST(syscall(__NR_get_thread_area, &u_info)); //call get_thread_area() if (TEST_RETURN == -1) { -- 1.7.1 -- Best Regards, Peng Haitao ------------------------------------------------------------------------------ AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on "Lean Startup Secrets Revealed." This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
