diff mbox series

selftests: breakpoints: fix compile error on breakpoint_test_arm64

Message ID 1508744542-11181-1-git-send-email-sumit.semwal@linaro.org
State Accepted
Commit af7dc093467a917278ec3b61aea46377b4372d8c
Headers show
Series selftests: breakpoints: fix compile error on breakpoint_test_arm64 | expand

Commit Message

Sumit Semwal Oct. 23, 2017, 7:42 a.m. UTC
The current mainline breakpoints test for arm64 fails to compile with

breakpoint_test_arm64.c: In function ‘set_watchpoint’:
breakpoint_test_arm64.c:97:28: error: storage size of ‘dreg_state’ isn’t known
  struct user_hwdebug_state dreg_state;

Adding a direct include for asm/ptrace.h helps it to build, and passes
the test on mainline on hikey.

Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>

---
 tools/testing/selftests/breakpoints/breakpoint_test_arm64.c | 1 +
 1 file changed, 1 insertion(+)

-- 
2.7.4

Comments

Shuah Nov. 1, 2017, 8:52 p.m. UTC | #1
On 10/23/2017 01:42 AM, Sumit Semwal wrote:
> The current mainline breakpoints test for arm64 fails to compile with

> 

> breakpoint_test_arm64.c: In function ‘set_watchpoint’:

> breakpoint_test_arm64.c:97:28: error: storage size of ‘dreg_state’ isn’t known

>   struct user_hwdebug_state dreg_state;

> 

> Adding a direct include for asm/ptrace.h helps it to build, and passes

> the test on mainline on hikey.

> 

> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>

> ---

>  tools/testing/selftests/breakpoints/breakpoint_test_arm64.c | 1 +

>  1 file changed, 1 insertion(+)

> 

> diff --git a/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c b/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c

> index 960d02100c26..2d95e5adde72 100644

> --- a/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c

> +++ b/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c

> @@ -19,6 +19,7 @@

>  

>  #define _GNU_SOURCE

>  

> +#include <asm/ptrace.h>

>  #include <sys/types.h>

>  #include <sys/wait.h>

>  #include <sys/ptrace.h>

> 


Sumit,

Thanks for the patch. I will queue this up for 4.15-rc1.
This can be marked for stable I would assume?

thanks,
-- Shuah
Sumit Semwal Nov. 3, 2017, 3:48 a.m. UTC | #2
Hi Shuah,

On 2 November 2017 at 02:22, Shuah Khan <shuah@kernel.org> wrote:
> On 10/23/2017 01:42 AM, Sumit Semwal wrote:

>> The current mainline breakpoints test for arm64 fails to compile with

>>

>> breakpoint_test_arm64.c: In function ‘set_watchpoint’:

>> breakpoint_test_arm64.c:97:28: error: storage size of ‘dreg_state’ isn’t known

>>   struct user_hwdebug_state dreg_state;

>>

>> Adding a direct include for asm/ptrace.h helps it to build, and passes

>> the test on mainline on hikey.

>>

>> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>

>> ---

>>  tools/testing/selftests/breakpoints/breakpoint_test_arm64.c | 1 +

>>  1 file changed, 1 insertion(+)

>>

>> diff --git a/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c b/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c

>> index 960d02100c26..2d95e5adde72 100644

>> --- a/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c

>> +++ b/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c

>> @@ -19,6 +19,7 @@

>>

>>  #define _GNU_SOURCE

>>

>> +#include <asm/ptrace.h>

>>  #include <sys/types.h>

>>  #include <sys/wait.h>

>>  #include <sys/ptrace.h>

>>

>

> Sumit,

>

> Thanks for the patch. I will queue this up for 4.15-rc1.

> This can be marked for stable I would assume?

Thank you; yes, it would need to be marked for 4.10+ kernels. Once you
add it to your tree, I can send a separate request to stable.
>

> thanks,

> -- Shuah


Best,
Sumit.
diff mbox series

Patch

diff --git a/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c b/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c
index 960d02100c26..2d95e5adde72 100644
--- a/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c
+++ b/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c
@@ -19,6 +19,7 @@ 
 
 #define _GNU_SOURCE
 
+#include <asm/ptrace.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <sys/ptrace.h>