* [PATCH] ltp: fix an incorrect macro checking
@ 2016-11-19 2:11 jackie.huang
2016-11-19 17:42 ` Khem Raj
2017-04-18 9:12 ` Huang, Jie (Jackie)
0 siblings, 2 replies; 5+ messages in thread
From: jackie.huang @ 2016-11-19 2:11 UTC (permalink / raw)
To: openembedded-core
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ltp: fix an incorrect macro checking
2016-11-19 2:11 [PATCH] ltp: fix an incorrect macro checking jackie.huang
@ 2016-11-19 17:42 ` Khem Raj
2017-04-18 9:12 ` Huang, Jie (Jackie)
1 sibling, 0 replies; 5+ messages in thread
From: Khem Raj @ 2016-11-19 17:42 UTC (permalink / raw)
To: jhuang0; +Cc: Patches and discussions about the oe-core layer
On Fri, Nov 18, 2016 at 6:11 PM, <jackie.huang@windriver.com> wrote:
> 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
>
This is ok.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ltp: fix an incorrect macro checking
2016-11-19 2:11 [PATCH] ltp: fix an incorrect macro checking jackie.huang
2016-11-19 17:42 ` Khem Raj
@ 2017-04-18 9:12 ` Huang, Jie (Jackie)
2017-04-18 10:03 ` Burton, Ross
1 sibling, 1 reply; 5+ messages in thread
From: Huang, Jie (Jackie) @ 2017-04-18 9:12 UTC (permalink / raw)
To: openembedded-core
Ping.
It's not merged yet, and I don't see any rejection on it.
Thanks,
Jackie
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> jackie.huang@windriver.com
> Sent: Saturday, November 19, 2016 10:11
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH] ltp: fix an incorrect macro checking
>
> 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
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ltp: fix an incorrect macro checking
2017-04-18 9:12 ` Huang, Jie (Jackie)
@ 2017-04-18 10:03 ` Burton, Ross
2017-04-19 1:23 ` Huang, Jie (Jackie)
0 siblings, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2017-04-18 10:03 UTC (permalink / raw)
To: Huang, Jie (Jackie); +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 277 bytes --]
On 18 April 2017 at 10:12, Huang, Jie (Jackie) <Jackie.Huang@windriver.com>
wrote:
> It's not merged yet, and I don't see any rejection on it.
>
Slipped through the net, we're very close to M4 so this may not make it
into 2.3 but if not it can be backported.
Ross
[-- Attachment #2: Type: text/html, Size: 699 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ltp: fix an incorrect macro checking
2017-04-18 10:03 ` Burton, Ross
@ 2017-04-19 1:23 ` Huang, Jie (Jackie)
0 siblings, 0 replies; 5+ messages in thread
From: Huang, Jie (Jackie) @ 2017-04-19 1:23 UTC (permalink / raw)
To: BURTON, ROSS; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 573 bytes --]
Got it, thanks!
Thanks,
Jackie
From: Burton, Ross [mailto:ross.burton@intel.com]
Sent: Tuesday, April 18, 2017 18:03
To: Huang, Jie (Jackie)
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] ltp: fix an incorrect macro checking
On 18 April 2017 at 10:12, Huang, Jie (Jackie) <Jackie.Huang@windriver.com<mailto:Jackie.Huang@windriver.com>> wrote:
It's not merged yet, and I don't see any rejection on it.
Slipped through the net, we're very close to M4 so this may not make it into 2.3 but if not it can be backported.
Ross
[-- Attachment #2: Type: text/html, Size: 3988 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-04-19 1:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-19 2:11 [PATCH] ltp: fix an incorrect macro checking jackie.huang
2016-11-19 17:42 ` 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)
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.