selftests: drv-net: adjust tests before defaulting to shell=False

Clean up tests which expect shell=True without explicitly passing
that param to cmd(). There seems to be only one such case, and
in fact it's better converted to a direct write.

Reviewed-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20250830184317.696121-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Jakub Kicinski
2025-08-30 11:43:16 -07:00
parent 5d14bbf9d1
commit c2e5108649

View File

@@ -24,7 +24,8 @@ def _assert_napi_threaded_disabled(nl, napi_id) -> None:
def _set_threaded_state(cfg, threaded) -> None:
cmd(f"echo {threaded} > /sys/class/net/{cfg.ifname}/threaded")
with open(f"/sys/class/net/{cfg.ifname}/threaded", "wb") as fp:
fp.write(str(threaded).encode('utf-8'))
def _setup_deferred_cleanup(cfg) -> None: