selftests: net: cleanup busy_poller.c
authorJoe Damato <jdamato@fastly.com>
Wed, 4 Dec 2024 16:32:39 +0000 (16:32 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 7 Dec 2024 01:42:15 +0000 (17:42 -0800)
commit48697bdfb65d21bab8c686830b04bf2e47b96d52
tree34e8189f44697f557643d37e5850b80b030209aa
parent6c36b5c244d6cb22ef8ea2f6b5da46f5171b37a5
selftests: net: cleanup busy_poller.c

Fix various integer type conversions by using strtoull and a temporary
variable which is bounds checked before being casted into the
appropriate cfg_* variable for use by the test program.

While here:
  - free the strdup'd cfg string for overall hygenie.
  - initialize napi_id = 0 in setup_queue to avoid warnings on some
    compilers.

Signed-off-by: Joe Damato <jdamato@fastly.com>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Link: https://patch.msgid.link/20241204163239.294123-1-jdamato@fastly.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/busy_poller.c