On Thu, Apr 17, 2025 at 09:26:22AM +0200, Paolo Abeni wrote:
On 4/17/25 3:32 AM, Joe Damato wrote:
diff --git a/tools/testing/selftests/drivers/net/napi_id.py b/tools/testing/selftests/drivers/net/napi_id.py new file mode 100755 index 000000000000..aee6f90be49b --- /dev/null +++ b/tools/testing/selftests/drivers/net/napi_id.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: GPL-2.0
+from lib.py import ksft_run, ksft_exit +from lib.py import ksft_eq, NetDrvEpEnv +from lib.py import bkg, cmd, rand_port, NetNSEnter
+def test_napi_id(cfg) -> None:
- port = rand_port()
- listen_cmd = f'{cfg.test_dir / "napi_id_helper"} {cfg.addr_v['4']} {port}'
Not really a full review, but this is apparently causing self-tests failures:
# selftests: drivers/net: napi_id.py # File "/home/virtme/testing-17/tools/testing/selftests/drivers/net/./napi_id.py", line 10 # listen_cmd = f'{cfg.test_dir / "napi_id_helper"} {cfg.addr_v['4']} {port}' # ^ # SyntaxError: f-string: unmatched '[' not ok 1 selftests: drivers/net: napi_id.py # exit=1
the second "'" char is closing the python format string, truncating the cfg.addr_v['4'] expression.
Please run the self test locally before the next submission, thanks!
I did run it locally, many times, and it works for me:
$ sudo ./tools/testing/selftests/drivers/net/napi_id.py TAP version 13 1..1 ok 1 napi_id.test_napi_id # Totals: pass:1 fail:0 xfail:0 xpass:0 skip:0 error:0
Maybe this has something to do with the Python version on my system vs yours/the test host?
I am using Python 3.13.1 from Ubuntu 24.04.
Please let me know what Python version you are using so I can try to reproduce this locally ?