public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kselftests: Sort the collections list to avoid duplicate tests
@ 2023-06-01 21:11 Rishabh Bhatnagar
  2023-06-05 19:40 ` Shuah Khan
  0 siblings, 1 reply; 2+ messages in thread
From: Rishabh Bhatnagar @ 2023-06-01 21:11 UTC (permalink / raw)
  To: shuah; +Cc: linux-kselftest, linux-kernel, Rishabh Bhatnagar

If the collections list is not sorted uniq doesn't weed out duplicate
tests correctly. Make sure to sort it before running uniq.

Signed-off-by: Rishabh Bhatnagar <risbhat@amazon.com>
---
 tools/testing/selftests/run_kselftest.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/run_kselftest.sh b/tools/testing/selftests/run_kselftest.sh
index 97165a83df63..e0cb10c85169 100755
--- a/tools/testing/selftests/run_kselftest.sh
+++ b/tools/testing/selftests/run_kselftest.sh
@@ -85,7 +85,7 @@ if [ -n "$TESTS" ]; then
 	available="$(echo "$valid" | sed -e 's/ /\n/g')"
 fi
 
-collections=$(echo "$available" | cut -d: -f1 | uniq)
+collections=$(echo "$available" | cut -d: -f1 | sort | uniq)
 for collection in $collections ; do
 	[ -w /dev/kmsg ] && echo "kselftest: Running tests in $collection" >> /dev/kmsg
 	tests=$(echo "$available" | grep "^$collection:" | cut -d: -f2)
-- 
2.39.2


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

* Re: [PATCH] kselftests: Sort the collections list to avoid duplicate tests
  2023-06-01 21:11 [PATCH] kselftests: Sort the collections list to avoid duplicate tests Rishabh Bhatnagar
@ 2023-06-05 19:40 ` Shuah Khan
  0 siblings, 0 replies; 2+ messages in thread
From: Shuah Khan @ 2023-06-05 19:40 UTC (permalink / raw)
  To: Rishabh Bhatnagar, shuah; +Cc: linux-kselftest, linux-kernel, Shuah Khan

On 6/1/23 15:11, Rishabh Bhatnagar wrote:
> If the collections list is not sorted uniq doesn't weed out duplicate
> tests correctly. Make sure to sort it before running uniq.
> 
> Signed-off-by: Rishabh Bhatnagar <risbhat@amazon.com>
> ---
>   tools/testing/selftests/run_kselftest.sh | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/run_kselftest.sh b/tools/testing/selftests/run_kselftest.sh
> index 97165a83df63..e0cb10c85169 100755
> --- a/tools/testing/selftests/run_kselftest.sh
> +++ b/tools/testing/selftests/run_kselftest.sh
> @@ -85,7 +85,7 @@ if [ -n "$TESTS" ]; then
>   	available="$(echo "$valid" | sed -e 's/ /\n/g')"
>   fi
>   
> -collections=$(echo "$available" | cut -d: -f1 | uniq)
> +collections=$(echo "$available" | cut -d: -f1 | sort | uniq)
>   for collection in $collections ; do
>   	[ -w /dev/kmsg ] && echo "kselftest: Running tests in $collection" >> /dev/kmsg
>   	tests=$(echo "$available" | grep "^$collection:" | cut -d: -f2)

Applied to linux-kselftest next for Linux 6.5-rc1.

thanks,
-- Shuah

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

end of thread, other threads:[~2023-06-05 19:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-01 21:11 [PATCH] kselftests: Sort the collections list to avoid duplicate tests Rishabh Bhatnagar
2023-06-05 19:40 ` Shuah Khan

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