diff mbox series

Include sys/rseq.h in tst-rseq-disable.c

Message ID 20230725093430.339327-1-stli@linux.ibm.com
State New
Headers show
Series Include sys/rseq.h in tst-rseq-disable.c | expand

Commit Message

Stefan Liebler July 25, 2023, 9:34 a.m. UTC
Starting with commit 2c6b4b272e6b4d07303af25709051c3e96288f2d
"nptl: Unconditionally use a 32-byte rseq area", the testcase
misc/tst-rseq-disable is UNSUPPORTED as RSEQ_SIG is not defined.

The mentioned commit removes inclusion of sys/rseq.h in nptl/descr.h.
Thus just include sys/rseq.h in the tst-rseq-disable.c as also done
in tst-rseq.c and tst-rseq-nptl.c.
---
 sysdeps/unix/sysv/linux/tst-rseq-disable.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Florian Weimer July 25, 2023, 10:19 a.m. UTC | #1
* Stefan Liebler:

> Starting with commit 2c6b4b272e6b4d07303af25709051c3e96288f2d
> "nptl: Unconditionally use a 32-byte rseq area", the testcase
> misc/tst-rseq-disable is UNSUPPORTED as RSEQ_SIG is not defined.
>
> The mentioned commit removes inclusion of sys/rseq.h in nptl/descr.h.
> Thus just include sys/rseq.h in the tst-rseq-disable.c as also done
> in tst-rseq.c and tst-rseq-nptl.c.
> ---
>  sysdeps/unix/sysv/linux/tst-rseq-disable.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/sysdeps/unix/sysv/linux/tst-rseq-disable.c b/sysdeps/unix/sysv/linux/tst-rseq-disable.c
> index d0db81b29d..cc7e94b3fe 100644
> --- a/sysdeps/unix/sysv/linux/tst-rseq-disable.c
> +++ b/sysdeps/unix/sysv/linux/tst-rseq-disable.c
> @@ -22,6 +22,7 @@
>  #include <support/xthread.h>
>  #include <sysdep.h>
>  #include <thread_pointer.h>
> +#include <sys/rseq.h>
>  #include <unistd.h>
>  
>  #ifdef RSEQ_SIG

Uh-oh.  Good catch.  Maybe sort the #include lexicographically?  Either
way:

Reviewed-by: Florian Weimer <fweimer@redhat.com>

Thanks,
Florian
Stefan Liebler July 25, 2023, 10:29 a.m. UTC | #2
On 25.07.23 12:19, Florian Weimer wrote:
> * Stefan Liebler:
> 
>> Starting with commit 2c6b4b272e6b4d07303af25709051c3e96288f2d
>> "nptl: Unconditionally use a 32-byte rseq area", the testcase
>> misc/tst-rseq-disable is UNSUPPORTED as RSEQ_SIG is not defined.
>>
>> The mentioned commit removes inclusion of sys/rseq.h in nptl/descr.h.
>> Thus just include sys/rseq.h in the tst-rseq-disable.c as also done
>> in tst-rseq.c and tst-rseq-nptl.c.
>> ---
>>  sysdeps/unix/sysv/linux/tst-rseq-disable.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/sysdeps/unix/sysv/linux/tst-rseq-disable.c b/sysdeps/unix/sysv/linux/tst-rseq-disable.c
>> index d0db81b29d..cc7e94b3fe 100644
>> --- a/sysdeps/unix/sysv/linux/tst-rseq-disable.c
>> +++ b/sysdeps/unix/sysv/linux/tst-rseq-disable.c
>> @@ -22,6 +22,7 @@
>>  #include <support/xthread.h>
>>  #include <sysdep.h>
>>  #include <thread_pointer.h>
>> +#include <sys/rseq.h>
>>  #include <unistd.h>
>>  
>>  #ifdef RSEQ_SIG
> 
> Uh-oh.  Good catch.  Maybe sort the #include lexicographically?  Either
> way:
> 
> Reviewed-by: Florian Weimer <fweimer@redhat.com>
> 
> Thanks,
> Florian
> 
I've just committed it as is. I haven't changed the order as the other
mentioned tests also use it this way.

Thanks,
Stefan
diff mbox series

Patch

diff --git a/sysdeps/unix/sysv/linux/tst-rseq-disable.c b/sysdeps/unix/sysv/linux/tst-rseq-disable.c
index d0db81b29d..cc7e94b3fe 100644
--- a/sysdeps/unix/sysv/linux/tst-rseq-disable.c
+++ b/sysdeps/unix/sysv/linux/tst-rseq-disable.c
@@ -22,6 +22,7 @@ 
 #include <support/xthread.h>
 #include <sysdep.h>
 #include <thread_pointer.h>
+#include <sys/rseq.h>
 #include <unistd.h>
 
 #ifdef RSEQ_SIG