* [PATCH 1/6] kselftest/arm64: Fix check_buffer_fill test
2020-10-26 12:12 [PATCH 0/6] kselftest/arm64: MTE fixes Vincenzo Frascino
@ 2020-10-26 12:12 ` Vincenzo Frascino
2020-10-27 10:25 ` Amit Kachhap
2020-10-26 12:12 ` [PATCH 2/6] kselftest/arm64: Fix check_tags_inclusion test Vincenzo Frascino
` (5 subsequent siblings)
6 siblings, 1 reply; 14+ messages in thread
From: Vincenzo Frascino @ 2020-10-26 12:12 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel, linux-kselftest
Cc: Vincenzo Frascino, Shuah Khan, Catalin Marinas, Will Deacon,
Gabor Kertesz, Amit Daniel Kachhap
The check_buffer_fill test reports the error below because the test
plan is not declared correctly:
# Planned tests != run tests (0 != 20)
Fix the test adding the correct test plan declaration.
Fixes: e9b60476bea0 ("kselftest/arm64: Add utilities and a test to validate mte memory")
Cc: Shuah Khan <shuah@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Gabor Kertesz <gabor.kertesz@arm.com>
Cc: Amit Daniel Kachhap <amit.kachhap@arm.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
tools/testing/selftests/arm64/mte/check_buffer_fill.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/testing/selftests/arm64/mte/check_buffer_fill.c b/tools/testing/selftests/arm64/mte/check_buffer_fill.c
index 242635d79035..c9fa141ebdcc 100644
--- a/tools/testing/selftests/arm64/mte/check_buffer_fill.c
+++ b/tools/testing/selftests/arm64/mte/check_buffer_fill.c
@@ -417,6 +417,9 @@ int main(int argc, char *argv[])
/* Register SIGSEGV handler */
mte_register_signal(SIGSEGV, mte_default_handler);
+ /* Set test plan */
+ ksft_set_plan(20);
+
/* Buffer by byte tests */
evaluate_test(check_buffer_by_byte(USE_MMAP, MTE_SYNC_ERR),
"Check buffer correctness by byte with sync err mode and mmap memory\n");
--
2.28.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 1/6] kselftest/arm64: Fix check_buffer_fill test
2020-10-26 12:12 ` [PATCH 1/6] kselftest/arm64: Fix check_buffer_fill test Vincenzo Frascino
@ 2020-10-27 10:25 ` Amit Kachhap
0 siblings, 0 replies; 14+ messages in thread
From: Amit Kachhap @ 2020-10-27 10:25 UTC (permalink / raw)
To: Vincenzo Frascino, linux-arm-kernel, linux-kernel, linux-kselftest
Cc: Shuah Khan, Catalin Marinas, Will Deacon, Gabor Kertesz
On 10/26/20 5:42 PM, Vincenzo Frascino wrote:
> The check_buffer_fill test reports the error below because the test
> plan is not declared correctly:
>
> # Planned tests != run tests (0 != 20)
>
> Fix the test adding the correct test plan declaration.
This change is required and got missed earlier.
Acked by: Amit Daniel Kachhap <amit.kachhap@arm.com>
>
> Fixes: e9b60476bea0 ("kselftest/arm64: Add utilities and a test to validate mte memory")
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Gabor Kertesz <gabor.kertesz@arm.com>
> Cc: Amit Daniel Kachhap <amit.kachhap@arm.com>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> ---
> tools/testing/selftests/arm64/mte/check_buffer_fill.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tools/testing/selftests/arm64/mte/check_buffer_fill.c b/tools/testing/selftests/arm64/mte/check_buffer_fill.c
> index 242635d79035..c9fa141ebdcc 100644
> --- a/tools/testing/selftests/arm64/mte/check_buffer_fill.c
> +++ b/tools/testing/selftests/arm64/mte/check_buffer_fill.c
> @@ -417,6 +417,9 @@ int main(int argc, char *argv[])
> /* Register SIGSEGV handler */
> mte_register_signal(SIGSEGV, mte_default_handler);
>
> + /* Set test plan */
> + ksft_set_plan(20);
> +
> /* Buffer by byte tests */
> evaluate_test(check_buffer_by_byte(USE_MMAP, MTE_SYNC_ERR),
> "Check buffer correctness by byte with sync err mode and mmap memory\n");
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 2/6] kselftest/arm64: Fix check_tags_inclusion test
2020-10-26 12:12 [PATCH 0/6] kselftest/arm64: MTE fixes Vincenzo Frascino
2020-10-26 12:12 ` [PATCH 1/6] kselftest/arm64: Fix check_buffer_fill test Vincenzo Frascino
@ 2020-10-26 12:12 ` Vincenzo Frascino
2020-10-27 10:27 ` Amit Kachhap
2020-10-26 12:12 ` [PATCH 3/6] kselftest/arm64: Fix check_child_memory test Vincenzo Frascino
` (4 subsequent siblings)
6 siblings, 1 reply; 14+ messages in thread
From: Vincenzo Frascino @ 2020-10-26 12:12 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel, linux-kselftest
Cc: Vincenzo Frascino, Shuah Khan, Catalin Marinas, Will Deacon,
Gabor Kertesz, Amit Daniel Kachhap
The check_tags_inclusion test reports the error below because the test
plan is not declared correctly:
# Planned tests != run tests (0 != 4)
Fix the test adding the correct test plan declaration.
Fixes: f3b2a26ca78d ("kselftest/arm64: Verify mte tag inclusion via prctl")
Cc: Shuah Khan <shuah@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Gabor Kertesz <gabor.kertesz@arm.com>
Cc: Amit Daniel Kachhap <amit.kachhap@arm.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
tools/testing/selftests/arm64/mte/check_tags_inclusion.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/testing/selftests/arm64/mte/check_tags_inclusion.c b/tools/testing/selftests/arm64/mte/check_tags_inclusion.c
index 94d245a0ed56..deaef1f61076 100644
--- a/tools/testing/selftests/arm64/mte/check_tags_inclusion.c
+++ b/tools/testing/selftests/arm64/mte/check_tags_inclusion.c
@@ -170,6 +170,9 @@ int main(int argc, char *argv[])
/* Register SIGSEGV handler */
mte_register_signal(SIGSEGV, mte_default_handler);
+ /* Set test plan */
+ ksft_set_plan(4);
+
evaluate_test(check_single_included_tags(USE_MMAP, MTE_SYNC_ERR),
"Check an included tag value with sync mode\n");
evaluate_test(check_multiple_included_tags(USE_MMAP, MTE_SYNC_ERR),
--
2.28.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 2/6] kselftest/arm64: Fix check_tags_inclusion test
2020-10-26 12:12 ` [PATCH 2/6] kselftest/arm64: Fix check_tags_inclusion test Vincenzo Frascino
@ 2020-10-27 10:27 ` Amit Kachhap
0 siblings, 0 replies; 14+ messages in thread
From: Amit Kachhap @ 2020-10-27 10:27 UTC (permalink / raw)
To: Vincenzo Frascino, linux-arm-kernel, linux-kernel, linux-kselftest
Cc: Shuah Khan, Catalin Marinas, Will Deacon, Gabor Kertesz
On 10/26/20 5:42 PM, Vincenzo Frascino wrote:
> The check_tags_inclusion test reports the error below because the test
> plan is not declared correctly:
>
> # Planned tests != run tests (0 != 4)
>
> Fix the test adding the correct test plan declaration.
This change is required and got missed earlier.
Acked by: Amit Daniel Kachhap <amit.kachhap@arm.com>
>
> Fixes: f3b2a26ca78d ("kselftest/arm64: Verify mte tag inclusion via prctl")
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Gabor Kertesz <gabor.kertesz@arm.com>
> Cc: Amit Daniel Kachhap <amit.kachhap@arm.com>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> ---
> tools/testing/selftests/arm64/mte/check_tags_inclusion.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tools/testing/selftests/arm64/mte/check_tags_inclusion.c b/tools/testing/selftests/arm64/mte/check_tags_inclusion.c
> index 94d245a0ed56..deaef1f61076 100644
> --- a/tools/testing/selftests/arm64/mte/check_tags_inclusion.c
> +++ b/tools/testing/selftests/arm64/mte/check_tags_inclusion.c
> @@ -170,6 +170,9 @@ int main(int argc, char *argv[])
> /* Register SIGSEGV handler */
> mte_register_signal(SIGSEGV, mte_default_handler);
>
> + /* Set test plan */
> + ksft_set_plan(4);
> +
> evaluate_test(check_single_included_tags(USE_MMAP, MTE_SYNC_ERR),
> "Check an included tag value with sync mode\n");
> evaluate_test(check_multiple_included_tags(USE_MMAP, MTE_SYNC_ERR),
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 3/6] kselftest/arm64: Fix check_child_memory test
2020-10-26 12:12 [PATCH 0/6] kselftest/arm64: MTE fixes Vincenzo Frascino
2020-10-26 12:12 ` [PATCH 1/6] kselftest/arm64: Fix check_buffer_fill test Vincenzo Frascino
2020-10-26 12:12 ` [PATCH 2/6] kselftest/arm64: Fix check_tags_inclusion test Vincenzo Frascino
@ 2020-10-26 12:12 ` Vincenzo Frascino
2020-10-27 10:29 ` Amit Kachhap
2020-10-26 12:12 ` [PATCH 4/6] kselftest/arm64: Fix check_mmap_options test Vincenzo Frascino
` (3 subsequent siblings)
6 siblings, 1 reply; 14+ messages in thread
From: Vincenzo Frascino @ 2020-10-26 12:12 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel, linux-kselftest
Cc: Vincenzo Frascino, Shuah Khan, Catalin Marinas, Will Deacon,
Gabor Kertesz, Amit Daniel Kachhap
The check_child_memory test reports the error below because the test
plan is not declared correctly:
# Planned tests != run tests (0 != 12)
Fix the test adding the correct test plan declaration.
Fixes: dfe537cf4718 ("kselftest/arm64: Check forked child mte memory accessibility")
Cc: Shuah Khan <shuah@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Gabor Kertesz <gabor.kertesz@arm.com>
Cc: Amit Daniel Kachhap <amit.kachhap@arm.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
tools/testing/selftests/arm64/mte/check_child_memory.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/testing/selftests/arm64/mte/check_child_memory.c b/tools/testing/selftests/arm64/mte/check_child_memory.c
index 97bebdecd29e..43bd94f853ba 100644
--- a/tools/testing/selftests/arm64/mte/check_child_memory.c
+++ b/tools/testing/selftests/arm64/mte/check_child_memory.c
@@ -163,6 +163,9 @@ int main(int argc, char *argv[])
mte_register_signal(SIGSEGV, mte_default_handler);
mte_register_signal(SIGBUS, mte_default_handler);
+ /* Set test plan */
+ ksft_set_plan(12);
+
evaluate_test(check_child_memory_mapping(USE_MMAP, MTE_SYNC_ERR, MAP_PRIVATE),
"Check child anonymous memory with private mapping, precise mode and mmap memory\n");
evaluate_test(check_child_memory_mapping(USE_MMAP, MTE_SYNC_ERR, MAP_SHARED),
--
2.28.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 3/6] kselftest/arm64: Fix check_child_memory test
2020-10-26 12:12 ` [PATCH 3/6] kselftest/arm64: Fix check_child_memory test Vincenzo Frascino
@ 2020-10-27 10:29 ` Amit Kachhap
0 siblings, 0 replies; 14+ messages in thread
From: Amit Kachhap @ 2020-10-27 10:29 UTC (permalink / raw)
To: Vincenzo Frascino, linux-arm-kernel, linux-kernel, linux-kselftest
Cc: Shuah Khan, Catalin Marinas, Will Deacon, Gabor Kertesz
On 10/26/20 5:42 PM, Vincenzo Frascino wrote:
> The check_child_memory test reports the error below because the test
> plan is not declared correctly:
>
> # Planned tests != run tests (0 != 12)
>
> Fix the test adding the correct test plan declaration.
This change is required and got missed earlier.
Acked by: Amit Daniel Kachhap <amit.kachhap@arm.com>
>
> Fixes: dfe537cf4718 ("kselftest/arm64: Check forked child mte memory accessibility")
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Gabor Kertesz <gabor.kertesz@arm.com>
> Cc: Amit Daniel Kachhap <amit.kachhap@arm.com>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> ---
> tools/testing/selftests/arm64/mte/check_child_memory.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tools/testing/selftests/arm64/mte/check_child_memory.c b/tools/testing/selftests/arm64/mte/check_child_memory.c
> index 97bebdecd29e..43bd94f853ba 100644
> --- a/tools/testing/selftests/arm64/mte/check_child_memory.c
> +++ b/tools/testing/selftests/arm64/mte/check_child_memory.c
> @@ -163,6 +163,9 @@ int main(int argc, char *argv[])
> mte_register_signal(SIGSEGV, mte_default_handler);
> mte_register_signal(SIGBUS, mte_default_handler);
>
> + /* Set test plan */
> + ksft_set_plan(12);
> +
> evaluate_test(check_child_memory_mapping(USE_MMAP, MTE_SYNC_ERR, MAP_PRIVATE),
> "Check child anonymous memory with private mapping, precise mode and mmap memory\n");
> evaluate_test(check_child_memory_mapping(USE_MMAP, MTE_SYNC_ERR, MAP_SHARED),
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 4/6] kselftest/arm64: Fix check_mmap_options test
2020-10-26 12:12 [PATCH 0/6] kselftest/arm64: MTE fixes Vincenzo Frascino
` (2 preceding siblings ...)
2020-10-26 12:12 ` [PATCH 3/6] kselftest/arm64: Fix check_child_memory test Vincenzo Frascino
@ 2020-10-26 12:12 ` Vincenzo Frascino
2020-10-27 10:31 ` Amit Kachhap
2020-10-26 12:12 ` [PATCH 5/6] kselftest/arm64: Fix check_ksm_options test Vincenzo Frascino
` (2 subsequent siblings)
6 siblings, 1 reply; 14+ messages in thread
From: Vincenzo Frascino @ 2020-10-26 12:12 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel, linux-kselftest
Cc: Vincenzo Frascino, Shuah Khan, Catalin Marinas, Will Deacon,
Gabor Kertesz, Amit Daniel Kachhap
The check_mmap_options test reports the error below because the test
plan is not declared correctly:
# Planned tests != run tests (0 != 22)
Fix the test adding the correct test plan declaration.
Fixes: 53ec81d23213 ("kselftest/arm64: Verify all different mmap MTE options")
Cc: Shuah Khan <shuah@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Gabor Kertesz <gabor.kertesz@arm.com>
Cc: Amit Daniel Kachhap <amit.kachhap@arm.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
tools/testing/selftests/arm64/mte/check_mmap_options.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/testing/selftests/arm64/mte/check_mmap_options.c b/tools/testing/selftests/arm64/mte/check_mmap_options.c
index 33b13b86199b..a04b12c21ac9 100644
--- a/tools/testing/selftests/arm64/mte/check_mmap_options.c
+++ b/tools/testing/selftests/arm64/mte/check_mmap_options.c
@@ -205,7 +205,11 @@ int main(int argc, char *argv[])
mte_register_signal(SIGBUS, mte_default_handler);
mte_register_signal(SIGSEGV, mte_default_handler);
+ /* Set test plan */
+ ksft_set_plan(22);
+
mte_enable_pstate_tco();
+
evaluate_test(check_anonymous_memory_mapping(USE_MMAP, MTE_SYNC_ERR, MAP_PRIVATE, TAG_CHECK_OFF),
"Check anonymous memory with private mapping, sync error mode, mmap memory and tag check off\n");
evaluate_test(check_file_memory_mapping(USE_MPROTECT, MTE_SYNC_ERR, MAP_PRIVATE, TAG_CHECK_OFF),
--
2.28.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 4/6] kselftest/arm64: Fix check_mmap_options test
2020-10-26 12:12 ` [PATCH 4/6] kselftest/arm64: Fix check_mmap_options test Vincenzo Frascino
@ 2020-10-27 10:31 ` Amit Kachhap
0 siblings, 0 replies; 14+ messages in thread
From: Amit Kachhap @ 2020-10-27 10:31 UTC (permalink / raw)
To: Vincenzo Frascino, linux-arm-kernel, linux-kernel, linux-kselftest
Cc: Shuah Khan, Catalin Marinas, Will Deacon, Gabor Kertesz
On 10/26/20 5:42 PM, Vincenzo Frascino wrote:
> The check_mmap_options test reports the error below because the test
> plan is not declared correctly:
>
> # Planned tests != run tests (0 != 22)
>
> Fix the test adding the correct test plan declaration.
This change is required and got missed earlier.
Acked by: Amit Daniel Kachhap <amit.kachhap@arm.com>
>
> Fixes: 53ec81d23213 ("kselftest/arm64: Verify all different mmap MTE options")
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Gabor Kertesz <gabor.kertesz@arm.com>
> Cc: Amit Daniel Kachhap <amit.kachhap@arm.com>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> ---
> tools/testing/selftests/arm64/mte/check_mmap_options.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tools/testing/selftests/arm64/mte/check_mmap_options.c b/tools/testing/selftests/arm64/mte/check_mmap_options.c
> index 33b13b86199b..a04b12c21ac9 100644
> --- a/tools/testing/selftests/arm64/mte/check_mmap_options.c
> +++ b/tools/testing/selftests/arm64/mte/check_mmap_options.c
> @@ -205,7 +205,11 @@ int main(int argc, char *argv[])
> mte_register_signal(SIGBUS, mte_default_handler);
> mte_register_signal(SIGSEGV, mte_default_handler);
>
> + /* Set test plan */
> + ksft_set_plan(22);
> +
> mte_enable_pstate_tco();
> +
> evaluate_test(check_anonymous_memory_mapping(USE_MMAP, MTE_SYNC_ERR, MAP_PRIVATE, TAG_CHECK_OFF),
> "Check anonymous memory with private mapping, sync error mode, mmap memory and tag check off\n");
> evaluate_test(check_file_memory_mapping(USE_MPROTECT, MTE_SYNC_ERR, MAP_PRIVATE, TAG_CHECK_OFF),
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 5/6] kselftest/arm64: Fix check_ksm_options test
2020-10-26 12:12 [PATCH 0/6] kselftest/arm64: MTE fixes Vincenzo Frascino
` (3 preceding siblings ...)
2020-10-26 12:12 ` [PATCH 4/6] kselftest/arm64: Fix check_mmap_options test Vincenzo Frascino
@ 2020-10-26 12:12 ` Vincenzo Frascino
2020-10-27 10:33 ` Amit Kachhap
2020-10-26 12:12 ` [PATCH 6/6] kselftest/arm64: Fix check_user_mem test Vincenzo Frascino
2020-10-28 15:12 ` [PATCH 0/6] kselftest/arm64: MTE fixes Will Deacon
6 siblings, 1 reply; 14+ messages in thread
From: Vincenzo Frascino @ 2020-10-26 12:12 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel, linux-kselftest
Cc: Vincenzo Frascino, Shuah Khan, Catalin Marinas, Will Deacon,
Gabor Kertesz, Amit Daniel Kachhap
The check_ksm_options test reports the error below because the test
plan is not declared correctly:
# Planned tests != run tests (0 != 4)
Fix the test adding the correct test plan declaration.
Fixes: f981d8fa2646 ("kselftest/arm64: Verify KSM page merge for MTE pages")
Cc: Shuah Khan <shuah@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Gabor Kertesz <gabor.kertesz@arm.com>
Cc: Amit Daniel Kachhap <amit.kachhap@arm.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
tools/testing/selftests/arm64/mte/check_ksm_options.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/testing/selftests/arm64/mte/check_ksm_options.c b/tools/testing/selftests/arm64/mte/check_ksm_options.c
index bc41ae630c86..3b23c4d61d38 100644
--- a/tools/testing/selftests/arm64/mte/check_ksm_options.c
+++ b/tools/testing/selftests/arm64/mte/check_ksm_options.c
@@ -140,6 +140,10 @@ int main(int argc, char *argv[])
/* Register signal handlers */
mte_register_signal(SIGBUS, mte_default_handler);
mte_register_signal(SIGSEGV, mte_default_handler);
+
+ /* Set test plan */
+ ksft_set_plan(4);
+
/* Enable KSM */
mte_ksm_setup();
--
2.28.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 5/6] kselftest/arm64: Fix check_ksm_options test
2020-10-26 12:12 ` [PATCH 5/6] kselftest/arm64: Fix check_ksm_options test Vincenzo Frascino
@ 2020-10-27 10:33 ` Amit Kachhap
0 siblings, 0 replies; 14+ messages in thread
From: Amit Kachhap @ 2020-10-27 10:33 UTC (permalink / raw)
To: Vincenzo Frascino, linux-arm-kernel, linux-kernel, linux-kselftest
Cc: Shuah Khan, Catalin Marinas, Will Deacon, Gabor Kertesz
On 10/26/20 5:42 PM, Vincenzo Frascino wrote:
> The check_ksm_options test reports the error below because the test
> plan is not declared correctly:
>
> # Planned tests != run tests (0 != 4)
>
> Fix the test adding the correct test plan declaration.
This change makes sense and got missed earlier.
Acked by: Amit Daniel Kachhap <amit.kachhap@arm.com>
>
> Fixes: f981d8fa2646 ("kselftest/arm64: Verify KSM page merge for MTE pages")
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Gabor Kertesz <gabor.kertesz@arm.com>
> Cc: Amit Daniel Kachhap <amit.kachhap@arm.com>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> ---
> tools/testing/selftests/arm64/mte/check_ksm_options.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tools/testing/selftests/arm64/mte/check_ksm_options.c b/tools/testing/selftests/arm64/mte/check_ksm_options.c
> index bc41ae630c86..3b23c4d61d38 100644
> --- a/tools/testing/selftests/arm64/mte/check_ksm_options.c
> +++ b/tools/testing/selftests/arm64/mte/check_ksm_options.c
> @@ -140,6 +140,10 @@ int main(int argc, char *argv[])
> /* Register signal handlers */
> mte_register_signal(SIGBUS, mte_default_handler);
> mte_register_signal(SIGSEGV, mte_default_handler);
> +
> + /* Set test plan */
> + ksft_set_plan(4);
> +
> /* Enable KSM */
> mte_ksm_setup();
>
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 6/6] kselftest/arm64: Fix check_user_mem test
2020-10-26 12:12 [PATCH 0/6] kselftest/arm64: MTE fixes Vincenzo Frascino
` (4 preceding siblings ...)
2020-10-26 12:12 ` [PATCH 5/6] kselftest/arm64: Fix check_ksm_options test Vincenzo Frascino
@ 2020-10-26 12:12 ` Vincenzo Frascino
2020-10-27 10:34 ` Amit Kachhap
2020-10-28 15:12 ` [PATCH 0/6] kselftest/arm64: MTE fixes Will Deacon
6 siblings, 1 reply; 14+ messages in thread
From: Vincenzo Frascino @ 2020-10-26 12:12 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel, linux-kselftest
Cc: Vincenzo Frascino, Shuah Khan, Catalin Marinas, Will Deacon,
Gabor Kertesz, Amit Daniel Kachhap
The check_user_mem test reports the error below because the test
plan is not declared correctly:
# Planned tests != run tests (0 != 4)
Fix the test adding the correct test plan declaration.
Fixes: 4dafc08d0ba4 ("kselftest/arm64: Check mte tagged user address in kernel")
Cc: Shuah Khan <shuah@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Gabor Kertesz <gabor.kertesz@arm.com>
Cc: Amit Daniel Kachhap <amit.kachhap@arm.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
tools/testing/selftests/arm64/mte/check_user_mem.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/testing/selftests/arm64/mte/check_user_mem.c b/tools/testing/selftests/arm64/mte/check_user_mem.c
index 594e98e76880..4bfa80f2a8c3 100644
--- a/tools/testing/selftests/arm64/mte/check_user_mem.c
+++ b/tools/testing/selftests/arm64/mte/check_user_mem.c
@@ -92,9 +92,13 @@ int main(int argc, char *argv[])
err = mte_default_setup();
if (err)
return err;
+
/* Register signal handlers */
mte_register_signal(SIGSEGV, mte_default_handler);
+ /* Set test plan */
+ ksft_set_plan(4);
+
evaluate_test(check_usermem_access_fault(USE_MMAP, MTE_SYNC_ERR, MAP_PRIVATE),
"Check memory access from kernel in sync mode, private mapping and mmap memory\n");
evaluate_test(check_usermem_access_fault(USE_MMAP, MTE_SYNC_ERR, MAP_SHARED),
--
2.28.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 6/6] kselftest/arm64: Fix check_user_mem test
2020-10-26 12:12 ` [PATCH 6/6] kselftest/arm64: Fix check_user_mem test Vincenzo Frascino
@ 2020-10-27 10:34 ` Amit Kachhap
0 siblings, 0 replies; 14+ messages in thread
From: Amit Kachhap @ 2020-10-27 10:34 UTC (permalink / raw)
To: Vincenzo Frascino, linux-arm-kernel, linux-kernel, linux-kselftest
Cc: Shuah Khan, Catalin Marinas, Will Deacon, Gabor Kertesz
On 10/26/20 5:42 PM, Vincenzo Frascino wrote:
> The check_user_mem test reports the error below because the test
> plan is not declared correctly:
>
> # Planned tests != run tests (0 != 4)
>
> Fix the test adding the correct test plan declaration.
This change looks fine and got missed earlier.
Acked by: Amit Daniel Kachhap <amit.kachhap@arm.com>
>
> Fixes: 4dafc08d0ba4 ("kselftest/arm64: Check mte tagged user address in kernel")
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Gabor Kertesz <gabor.kertesz@arm.com>
> Cc: Amit Daniel Kachhap <amit.kachhap@arm.com>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> ---
> tools/testing/selftests/arm64/mte/check_user_mem.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tools/testing/selftests/arm64/mte/check_user_mem.c b/tools/testing/selftests/arm64/mte/check_user_mem.c
> index 594e98e76880..4bfa80f2a8c3 100644
> --- a/tools/testing/selftests/arm64/mte/check_user_mem.c
> +++ b/tools/testing/selftests/arm64/mte/check_user_mem.c
> @@ -92,9 +92,13 @@ int main(int argc, char *argv[])
> err = mte_default_setup();
> if (err)
> return err;
> +
> /* Register signal handlers */
> mte_register_signal(SIGSEGV, mte_default_handler);
>
> + /* Set test plan */
> + ksft_set_plan(4);
> +
> evaluate_test(check_usermem_access_fault(USE_MMAP, MTE_SYNC_ERR, MAP_PRIVATE),
> "Check memory access from kernel in sync mode, private mapping and mmap memory\n");
> evaluate_test(check_usermem_access_fault(USE_MMAP, MTE_SYNC_ERR, MAP_SHARED),
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/6] kselftest/arm64: MTE fixes
2020-10-26 12:12 [PATCH 0/6] kselftest/arm64: MTE fixes Vincenzo Frascino
` (5 preceding siblings ...)
2020-10-26 12:12 ` [PATCH 6/6] kselftest/arm64: Fix check_user_mem test Vincenzo Frascino
@ 2020-10-28 15:12 ` Will Deacon
6 siblings, 0 replies; 14+ messages in thread
From: Will Deacon @ 2020-10-28 15:12 UTC (permalink / raw)
To: Vincenzo Frascino, linux-kernel, linux-kselftest, linux-arm-kernel
Cc: catalin.marinas, kernel-team, Will Deacon, Shuah Khan,
Gabor Kertesz, Amit Daniel Kachhap
On Mon, 26 Oct 2020 12:12:42 +0000, Vincenzo Frascino wrote:
> This series contains a set of fixes for the arm64 MTE kselftests [1].
>
> A version of the fixes rebased on 5.10-rc1 can be found at [2].
>
> To verify the fixes it is possible to use the command below:
>
> make -C tools/testing/selftests/ ARCH=arm64 TARGETS=arm64 ARM64_SUBTARGETS=mte \
> CC=<gcc compiler with MTE support>
>
> [...]
Applied to arm64 (for-next/fixes), thanks!
[1/6] kselftest/arm64: Fix check_buffer_fill test
https://git.kernel.org/arm64/c/5bc7c1156f3f
[2/6] kselftest/arm64: Fix check_tags_inclusion test
https://git.kernel.org/arm64/c/041fa41f5422
[3/6] kselftest/arm64: Fix check_child_memory test
https://git.kernel.org/arm64/c/386cf789fa6d
[4/6] kselftest/arm64: Fix check_mmap_options test
https://git.kernel.org/arm64/c/7419390a466e
[5/6] kselftest/arm64: Fix check_ksm_options test
https://git.kernel.org/arm64/c/cbb268af05de
[6/6] kselftest/arm64: Fix check_user_mem test
https://git.kernel.org/arm64/c/493b35db0548
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
^ permalink raw reply [flat|nested] 14+ messages in thread