* [PATCH] selftests: tc-testing: preserve list order when removing duplicates
@ 2026-02-22 9:55 mr.navi8680
2026-02-24 12:19 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: mr.navi8680 @ 2026-02-22 9:55 UTC (permalink / raw)
To: jhs, jiri, shuah; +Cc: netdev, linux-kselftest, linux-kernel, Naveen Anandhan
From: Naveen Anandhan <mr.navi8680@gmail.com>
Using set() removes duplicates but breaks ordering.
Test output should be deterministic, so replace with dict.fromkeys().
Signed-off-by: Naveen Anandhan <mr.navi8680@gmail.com>
---
tools/testing/selftests/tc-testing/tdc_helper.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/tc-testing/tdc_helper.py b/tools/testing/selftests/tc-testing/tdc_helper.py
index 0440d252c4c5..e06f03c0fb5d 100644
--- a/tools/testing/selftests/tc-testing/tdc_helper.py
+++ b/tools/testing/selftests/tc-testing/tdc_helper.py
@@ -16,9 +16,9 @@ def get_categorized_testlist(alltests, ucat):
def get_unique_item(lst):
- """ For a list, return a list of the unique items in the list. """
+ """Return unique items while preserving original order."""
if len(lst) > 1:
- return list(set(lst))
+ return list(dict.fromkeys(lst))
else:
return lst
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] selftests: tc-testing: preserve list order when removing duplicates
2026-02-22 9:55 [PATCH] selftests: tc-testing: preserve list order when removing duplicates mr.navi8680
@ 2026-02-24 12:19 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-02-24 12:19 UTC (permalink / raw)
To: None; +Cc: jhs, jiri, shuah, netdev, linux-kselftest, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Sun, 22 Feb 2026 15:25:36 +0530 you wrote:
> From: Naveen Anandhan <mr.navi8680@gmail.com>
>
> Using set() removes duplicates but breaks ordering.
> Test output should be deterministic, so replace with dict.fromkeys().
>
> Signed-off-by: Naveen Anandhan <mr.navi8680@gmail.com>
>
> [...]
Here is the summary with links:
- selftests: tc-testing: preserve list order when removing duplicates
https://git.kernel.org/netdev/net-next/c/8ac768bb198c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-24 12:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-22 9:55 [PATCH] selftests: tc-testing: preserve list order when removing duplicates mr.navi8680
2026-02-24 12:19 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox