* [LTP] [PATCH] trace_shed: Adapt to glibc 2.24 removal of union wait type
@ 2016-07-21 4:58 Khem Raj
2016-07-22 3:49 ` Khem Raj
2016-07-22 13:40 ` Jan Stancek
0 siblings, 2 replies; 5+ messages in thread
From: Khem Raj @ 2016-07-21 4:58 UTC (permalink / raw)
To: ltp
This is now needed since glibc commit
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b49ab5f4503f36dcbf43f821f817da66b2931fe6;hp=5f5682b9654101ccaf375c2814cbddbe6033a725
WEXITSTATUS macro does not do the enum translation anymore and expects
the applications to pass int type fro status
fixes below error
trace_sched.c:425:16: error: invalid operands to binary & (have
'thread_sched_t * {aka struct <anonymous> *}' and 'int')
thrd_ndx, WEXITSTATUS(status));
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
testcases/kernel/sched/tool/trace_sched.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/kernel/sched/tool/trace_sched.c b/testcases/kernel/sched/tool/trace_sched.c
index 7815686..30dca5f 100644
--- a/testcases/kernel/sched/tool/trace_sched.c
+++ b/testcases/kernel/sched/tool/trace_sched.c
@@ -422,7 +422,7 @@ int main(int argc, /* number of input parameters. */
if (status == (thread_sched_t *) - 1) {
fprintf(stderr,
"thread [%d] - process exited with errors %d\n",
- thrd_ndx, WEXITSTATUS(status));
+ thrd_ndx, WEXITSTATUS((int)status));
exit(-1);
} else {
exp_prio[thrd_ndx] = status->exp_prio;
--
2.9.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [LTP] [PATCH] trace_shed: Adapt to glibc 2.24 removal of union wait type
2016-07-21 4:58 [LTP] [PATCH] trace_shed: Adapt to glibc 2.24 removal of union wait type Khem Raj
@ 2016-07-22 3:49 ` Khem Raj
2016-07-22 13:40 ` Jan Stancek
1 sibling, 0 replies; 5+ messages in thread
From: Khem Raj @ 2016-07-22 3:49 UTC (permalink / raw)
To: ltp
ignore this. I have a better one to follow
On Wed, Jul 20, 2016 at 9:58 PM, Khem Raj <raj.khem@gmail.com> wrote:
> This is now needed since glibc commit
> https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b49ab5f4503f36dcbf43f821f817da66b2931fe6;hp=5f5682b9654101ccaf375c2814cbddbe6033a725
>
> WEXITSTATUS macro does not do the enum translation anymore and expects
> the applications to pass int type fro status
>
> fixes below error
>
> trace_sched.c:425:16: error: invalid operands to binary & (have
> 'thread_sched_t * {aka struct <anonymous> *}' and 'int')
> thrd_ndx, WEXITSTATUS(status));
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> testcases/kernel/sched/tool/trace_sched.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/testcases/kernel/sched/tool/trace_sched.c b/testcases/kernel/sched/tool/trace_sched.c
> index 7815686..30dca5f 100644
> --- a/testcases/kernel/sched/tool/trace_sched.c
> +++ b/testcases/kernel/sched/tool/trace_sched.c
> @@ -422,7 +422,7 @@ int main(int argc, /* number of input parameters. */
> if (status == (thread_sched_t *) - 1) {
> fprintf(stderr,
> "thread [%d] - process exited with errors %d\n",
> - thrd_ndx, WEXITSTATUS(status));
> + thrd_ndx, WEXITSTATUS((int)status));
> exit(-1);
> } else {
> exp_prio[thrd_ndx] = status->exp_prio;
> --
> 2.9.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LTP] [PATCH] trace_shed: Adapt to glibc 2.24 removal of union wait type
2016-07-21 4:58 [LTP] [PATCH] trace_shed: Adapt to glibc 2.24 removal of union wait type Khem Raj
2016-07-22 3:49 ` Khem Raj
@ 2016-07-22 13:40 ` Jan Stancek
2016-07-22 13:54 ` Khem Raj
1 sibling, 1 reply; 5+ messages in thread
From: Jan Stancek @ 2016-07-22 13:40 UTC (permalink / raw)
To: ltp
----- Original Message -----
> From: "Khem Raj" <raj.khem@gmail.com>
> To: ltp@lists.linux.it
> Sent: Thursday, 21 July, 2016 6:58:12 AM
> Subject: [LTP] [PATCH] trace_shed: Adapt to glibc 2.24 removal of union wait type
>
> This is now needed since glibc commit
> https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b49ab5f4503f36dcbf43f821f817da66b2931fe6;hp=5f5682b9654101ccaf375c2814cbddbe6033a725
>
> WEXITSTATUS macro does not do the enum translation anymore and expects
> the applications to pass int type fro status
>
> fixes below error
>
> trace_sched.c:425:16: error: invalid operands to binary & (have
> 'thread_sched_t * {aka struct <anonymous> *}' and 'int')
> thrd_ndx, WEXITSTATUS(status));
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> testcases/kernel/sched/tool/trace_sched.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/testcases/kernel/sched/tool/trace_sched.c
> b/testcases/kernel/sched/tool/trace_sched.c
> index 7815686..30dca5f 100644
> --- a/testcases/kernel/sched/tool/trace_sched.c
> +++ b/testcases/kernel/sched/tool/trace_sched.c
> @@ -422,7 +422,7 @@ int main(int argc, /* number of input parameters.
> */
> if (status == (thread_sched_t *) - 1) {
> fprintf(stderr,
> "thread [%d] - process exited with errors %d\n",
> - thrd_ndx, WEXITSTATUS(status));
> + thrd_ndx, WEXITSTATUS((int)status));
Can we just drop WEXITSTATUS() from this fprintf? It's a pointer
to some struct, and on top of that it's always -1 here. It doesn't
look like this ever provided anything useful.
Regards,
Jan
> exit(-1);
> } else {
> exp_prio[thrd_ndx] = status->exp_prio;
> --
> 2.9.0
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LTP] [PATCH] trace_shed: Adapt to glibc 2.24 removal of union wait type
2016-07-22 13:40 ` Jan Stancek
@ 2016-07-22 13:54 ` Khem Raj
2016-07-22 15:16 ` Jan Stancek
0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2016-07-22 13:54 UTC (permalink / raw)
To: ltp
Hi Jan
On Fri, Jul 22, 2016 at 6:40 AM, Jan Stancek <jstancek@redhat.com> wrote:
>
>
> ----- Original Message -----
>> From: "Khem Raj" <raj.khem@gmail.com>
>> To: ltp@lists.linux.it
>> Sent: Thursday, 21 July, 2016 6:58:12 AM
>> Subject: [LTP] [PATCH] trace_shed: Adapt to glibc 2.24 removal of union wait type
>>
>> This is now needed since glibc commit
>> https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b49ab5f4503f36dcbf43f821f817da66b2931fe6;hp=5f5682b9654101ccaf375c2814cbddbe6033a725
>>
>> WEXITSTATUS macro does not do the enum translation anymore and expects
>> the applications to pass int type fro status
>>
>> fixes below error
>>
>> trace_sched.c:425:16: error: invalid operands to binary & (have
>> 'thread_sched_t * {aka struct <anonymous> *}' and 'int')
>> thrd_ndx, WEXITSTATUS(status));
>>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> ---
>> testcases/kernel/sched/tool/trace_sched.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/testcases/kernel/sched/tool/trace_sched.c
>> b/testcases/kernel/sched/tool/trace_sched.c
>> index 7815686..30dca5f 100644
>> --- a/testcases/kernel/sched/tool/trace_sched.c
>> +++ b/testcases/kernel/sched/tool/trace_sched.c
>> @@ -422,7 +422,7 @@ int main(int argc, /* number of input parameters.
>> */
>> if (status == (thread_sched_t *) - 1) {
>> fprintf(stderr,
>> "thread [%d] - process exited with errors %d\n",
>> - thrd_ndx, WEXITSTATUS(status));
>> + thrd_ndx, WEXITSTATUS((int)status));
>
>
> Can we just drop WEXITSTATUS() from this fprintf? It's a pointer
> to some struct, and on top of that it's always -1 here. It doesn't
> look like this ever provided anything useful.
Yes, I have sent a series of patches which includes such a fix for
this. This one
should be ignored.
>
> Regards,
> Jan
>
>> exit(-1);
>> } else {
>> exp_prio[thrd_ndx] = status->exp_prio;
>> --
>> 2.9.0
>>
>>
>> --
>> Mailing list info: https://lists.linux.it/listinfo/ltp
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LTP] [PATCH] trace_shed: Adapt to glibc 2.24 removal of union wait type
2016-07-22 13:54 ` Khem Raj
@ 2016-07-22 15:16 ` Jan Stancek
0 siblings, 0 replies; 5+ messages in thread
From: Jan Stancek @ 2016-07-22 15:16 UTC (permalink / raw)
To: ltp
----- Original Message -----
> From: "Khem Raj" <raj.khem@gmail.com>
> To: "Jan Stancek" <jstancek@redhat.com>
> Cc: ltp@lists.linux.it
> Sent: Friday, 22 July, 2016 3:54:16 PM
> Subject: Re: [LTP] [PATCH] trace_shed: Adapt to glibc 2.24 removal of union wait type
>
> Hi Jan
>
> On Fri, Jul 22, 2016 at 6:40 AM, Jan Stancek <jstancek@redhat.com> wrote:
> >
> >
> > ----- Original Message -----
> >> From: "Khem Raj" <raj.khem@gmail.com>
> >> To: ltp@lists.linux.it
> >> Sent: Thursday, 21 July, 2016 6:58:12 AM
> >> Subject: [LTP] [PATCH] trace_shed: Adapt to glibc 2.24 removal of union
> >> wait type
> >>
> >> This is now needed since glibc commit
> >> https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b49ab5f4503f36dcbf43f821f817da66b2931fe6;hp=5f5682b9654101ccaf375c2814cbddbe6033a725
> >>
> >> WEXITSTATUS macro does not do the enum translation anymore and expects
> >> the applications to pass int type fro status
> >>
> >> fixes below error
> >>
> >> trace_sched.c:425:16: error: invalid operands to binary & (have
> >> 'thread_sched_t * {aka struct <anonymous> *}' and 'int')
> >> thrd_ndx, WEXITSTATUS(status));
> >>
> >> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> >> ---
> >> testcases/kernel/sched/tool/trace_sched.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/testcases/kernel/sched/tool/trace_sched.c
> >> b/testcases/kernel/sched/tool/trace_sched.c
> >> index 7815686..30dca5f 100644
> >> --- a/testcases/kernel/sched/tool/trace_sched.c
> >> +++ b/testcases/kernel/sched/tool/trace_sched.c
> >> @@ -422,7 +422,7 @@ int main(int argc, /* number of input
> >> parameters.
> >> */
> >> if (status == (thread_sched_t *) - 1) {
> >> fprintf(stderr,
> >> "thread [%d] - process exited with
> >> errors %d\n",
> >> - thrd_ndx, WEXITSTATUS(status));
> >> + thrd_ndx, WEXITSTATUS((int)status));
> >
> >
> > Can we just drop WEXITSTATUS() from this fprintf? It's a pointer
> > to some struct, and on top of that it's always -1 here. It doesn't
> > look like this ever provided anything useful.
>
> Yes, I have sent a series of patches which includes such a fix for
> this. This one
> should be ignored.
I see, sorry I haven't caught up with all mail yet.
Regards,
Jan
>
> >
> > Regards,
> > Jan
> >
> >> exit(-1);
> >> } else {
> >> exp_prio[thrd_ndx] = status->exp_prio;
> >> --
> >> 2.9.0
> >>
> >>
> >> --
> >> Mailing list info: https://lists.linux.it/listinfo/ltp
> >>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-07-22 15:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-21 4:58 [LTP] [PATCH] trace_shed: Adapt to glibc 2.24 removal of union wait type Khem Raj
2016-07-22 3:49 ` Khem Raj
2016-07-22 13:40 ` Jan Stancek
2016-07-22 13:54 ` Khem Raj
2016-07-22 15:16 ` Jan Stancek
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.