From: <jackie.huang@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH] ltp: fix an incorrect macro checking
Date: Sat, 19 Nov 2016 10:11:00 +0800 [thread overview]
Message-ID: <20161119021100.29350-1-jackie.huang@windriver.com> (raw)
From: Jackie Huang <jackie.huang@windriver.com>
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>
---
.../0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch | 7 ++-----
1 file 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 d123074..41f2623 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;
--
2.8.3
next reply other threads:[~2016-11-19 2:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-19 2:11 jackie.huang [this message]
2016-11-19 17:42 ` [PATCH] ltp: fix an incorrect macro checking Khem Raj
2017-04-18 9:12 ` Huang, Jie (Jackie)
2017-04-18 10:03 ` Burton, Ross
2017-04-19 1:23 ` Huang, Jie (Jackie)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161119021100.29350-1-jackie.huang@windriver.com \
--to=jackie.huang@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox