summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorJackie Huang <jackie.huang@windriver.com>2016-11-19 10:11:00 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-19 10:16:24 +0100
commitca798705b3b8fa9b2f6467970e9bda9d9433986c (patch)
tree13dde14fcc3027762da911a64bc834c811d36297 /meta
parentb0e5c8f6a5041010347f6b70e39e41886829d928 (diff)
downloadopenembedded-core-ca798705b3b8fa9b2f6467970e9bda9d9433986c.tar.gz
openembedded-core-ca798705b3b8fa9b2f6467970e9bda9d9433986c.tar.bz2
openembedded-core-ca798705b3b8fa9b2f6467970e9bda9d9433986c.zip
ltp: fix an incorrect macro checking
The previous patch added a check but incorrectly change the elif to if, then it always return 0 for cpuid if the machine is not __i386__ getcpu01 1 TFAIL : getcpu01.c:140: getcpu() returned wrong value expected cpuid:7, returned value cpuid: 0 After this fix: getcpu01 1 TPASS : getcpu() returned proper cpuid:7, node id:0 Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch7
1 files changed, 2 insertions, 5 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch b/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
index d123074207..41f2623620 100644
--- a/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
+++ b/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
@@ -88,22 +88,19 @@ index c927512..921b107 100644
void cleanup(void);
void setup(void);
-@@ -164,9 +172,14 @@ static inline int getcpu(unsigned *cpu_id, unsigned *node_id,
+@@ -164,7 +172,11 @@ static inline int getcpu(unsigned *cpu_id, unsigned *node_id,
{
#if defined(__i386__)
return syscall(318, cpu_id, node_id, cache_struct);
-#elif __GLIBC_PREREQ(2,6)
-+#if defined(__GLIBC__)
++#elif defined(__GLIBC__)
+#if __GLIBC_PREREQ(2,6)
+ *cpu_id = sched_getcpu();
+#endif
+#else
*cpu_id = sched_getcpu();
#endif
-+#endif
return 0;
- }
-
@@ -191,15 +204,20 @@ unsigned int set_cpu_affinity(void)
cpu_set_t *set;
size_t size;