linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V3] selftests/vm: Add protection_keys tests to run_vmtests
@ 2022-06-17 11:10 Kalpana Shetty
  2022-06-17 19:31 ` Shuah Khan
  0 siblings, 1 reply; 3+ messages in thread
From: Kalpana Shetty @ 2022-06-17 11:10 UTC (permalink / raw)
  To: akpm, shuah, linux-mm, linux-kselftest, linux-kernel; +Cc: Kalpana Shetty

Adding "protected_keys" tests to "run_vmtests.sh" would help out to run all VM related tests
from a single shell script.

Signed-off-by: Kalpana Shetty <kalpana.shetty@amd.com>
---
Changes in V3:
 Shuah Khan's review comments incorporated, added protection_keys binary check.

 tools/testing/selftests/vm/run_vmtests.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tools/testing/selftests/vm/run_vmtests.sh b/tools/testing/selftests/vm/run_vmtests.sh
index 41fce8bea929..b19c6b1b84c4 100755
--- a/tools/testing/selftests/vm/run_vmtests.sh
+++ b/tools/testing/selftests/vm/run_vmtests.sh
@@ -179,4 +179,15 @@ run_test ./ksm_tests -N -m 1
 # KSM test with 2 NUMA nodes and merge_across_nodes = 0
 run_test ./ksm_tests -N -m 0
 
+# protection_keys tests
+if ./protection_keys_32 &> /dev/null
+then
+	run_test ./protection_keys_32
+fi
+
+if ./protection_keys_64 &> /dev/null
+then
+	run_test ./protection_keys_64
+fi
+
 exit $exitcode
-- 
2.25.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH V3] selftests/vm: Add protection_keys tests to run_vmtests
  2022-06-17 11:10 [PATCH V3] selftests/vm: Add protection_keys tests to run_vmtests Kalpana Shetty
@ 2022-06-17 19:31 ` Shuah Khan
  2022-06-17 20:31   ` Shetty, Kalpana
  0 siblings, 1 reply; 3+ messages in thread
From: Shuah Khan @ 2022-06-17 19:31 UTC (permalink / raw)
  To: Kalpana Shetty, akpm, shuah, linux-mm, linux-kselftest, linux-kernel
  Cc: Shuah Khan

On 6/17/22 5:10 AM, Kalpana Shetty wrote:
> Adding "protected_keys" tests to "run_vmtests.sh" would help out to run all VM related tests
> from a single shell script.
> 
> Signed-off-by: Kalpana Shetty <kalpana.shetty@amd.com>
> ---
> Changes in V3:
>   Shuah Khan's review comments incorporated, added protection_keys binary check.
> 
>   tools/testing/selftests/vm/run_vmtests.sh | 11 +++++++++++
>   1 file changed, 11 insertions(+)
> 
> diff --git a/tools/testing/selftests/vm/run_vmtests.sh b/tools/testing/selftests/vm/run_vmtests.sh
> index 41fce8bea929..b19c6b1b84c4 100755
> --- a/tools/testing/selftests/vm/run_vmtests.sh
> +++ b/tools/testing/selftests/vm/run_vmtests.sh
> @@ -179,4 +179,15 @@ run_test ./ksm_tests -N -m 1
>   # KSM test with 2 NUMA nodes and merge_across_nodes = 0
>   run_test ./ksm_tests -N -m 0
>   
> +# protection_keys tests
> +if ./protection_keys_32 &> /dev/null
> +then
> +	run_test ./protection_keys_32
> +fi
> +
> +if ./protection_keys_64 &> /dev/null
> +then
> +	run_test ./protection_keys_64
> +fi
> +
>   exit $exitcode
> 

Why not use file test operators. -x works for this case.
There is no need to run attempt to run the test.

thanks,
-- Shuah


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH V3] selftests/vm: Add protection_keys tests to run_vmtests
  2022-06-17 19:31 ` Shuah Khan
@ 2022-06-17 20:31   ` Shetty, Kalpana
  0 siblings, 0 replies; 3+ messages in thread
From: Shetty, Kalpana @ 2022-06-17 20:31 UTC (permalink / raw)
  To: Shuah Khan, akpm, shuah, linux-mm, linux-kselftest, linux-kernel


On 6/18/2022 1:01 AM, Shuah Khan wrote:
> On 6/17/22 5:10 AM, Kalpana Shetty wrote:
>> Adding "protected_keys" tests to "run_vmtests.sh" would help out to 
>> run all VM related tests
>> from a single shell script.
>>
>> Signed-off-by: Kalpana Shetty <kalpana.shetty@amd.com>
>> ---
>> Changes in V3:
>>   Shuah Khan's review comments incorporated, added protection_keys 
>> binary check.
>>
>>   tools/testing/selftests/vm/run_vmtests.sh | 11 +++++++++++
>>   1 file changed, 11 insertions(+)
>>
>> diff --git a/tools/testing/selftests/vm/run_vmtests.sh 
>> b/tools/testing/selftests/vm/run_vmtests.sh
>> index 41fce8bea929..b19c6b1b84c4 100755
>> --- a/tools/testing/selftests/vm/run_vmtests.sh
>> +++ b/tools/testing/selftests/vm/run_vmtests.sh
>> @@ -179,4 +179,15 @@ run_test ./ksm_tests -N -m 1
>>   # KSM test with 2 NUMA nodes and merge_across_nodes = 0
>>   run_test ./ksm_tests -N -m 0
>>   +# protection_keys tests
>> +if ./protection_keys_32 &> /dev/null
>> +then
>> +    run_test ./protection_keys_32
>> +fi
>> +
>> +if ./protection_keys_64 &> /dev/null
>> +then
>> +    run_test ./protection_keys_64
>> +fi
>> +
>>   exit $exitcode
>>
>
> Why not use file test operators. -x works for this case.
> There is no need to run attempt to run the test.
Sure; thanks for the suggestion. Sent V4 patch.
>
> thanks,
> -- Shuah

Thanks,

Kalpana



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-17 20:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-17 11:10 [PATCH V3] selftests/vm: Add protection_keys tests to run_vmtests Kalpana Shetty
2022-06-17 19:31 ` Shuah Khan
2022-06-17 20:31   ` Shetty, Kalpana

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox