]> www.infradead.org Git - users/jedix/linux-maple.git/commit
netconsole: selftest: Delete all userdata keys
authorBreno Leitao <leitao@debian.org>
Wed, 8 Jan 2025 11:50:27 +0000 (03:50 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 10 Jan 2025 02:06:36 +0000 (18:06 -0800)
commit7dcb65351b30500a759c857590b73b98c05ac7fd
tree16dd7bc8dd17e8928dbd5ad279ca997aa6a10f18
parent61f51cc6defeb0faad1f60f1dbc41613e93f31da
netconsole: selftest: Delete all userdata keys

Modify the cleanup function to remove all userdata keys created during the
test, instead of just deleting a single predefined key. This ensures a
more thorough cleanup of temporary resources.

Move the KEY_PATH variable definition inside the set_user_data function
to reduce global variables and improve encapsulation. The KEY_PATH
variable is now dynamically created when setting user data.

This change has no effect on the current test, while improving an
upcoming test that would create several userdata entries.

Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250108-netcons_overflow_test-v3-3-3d85eb091bec@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/drivers/net/lib/sh/lib_netcons.sh