Commit 301d6815 authored by Rishabh Bhatnagar's avatar Rishabh Bhatnagar Committed by Shuah Khan
Browse files

kselftests: Sort the collections list to avoid duplicate tests



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: default avatarRishabh Bhatnagar <risbhat@amazon.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent bcda4c86
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -90,7 +90,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)