Commit f0e5126f authored by Daniel Zahka's avatar Daniel Zahka Committed by Paolo Abeni
Browse files

selftests: drv-net: psp: fix test names in ipver_test_builder()



test_case will only take on the formatted name after being
called. This does not work with the way ksft_run() currently
works. Assign the name after the test_case is created.

Fixes: 81236c74 ("selftests: drv-net: psp: add test for auto-adjusting TCP MSS")
Signed-off-by: default avatarDaniel Zahka <daniel.zahka@gmail.com>
Link: https://patch.msgid.link/20251216-psp-test-fix-v1-2-3b5a6dde186f@gmail.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent d52668ca
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -583,8 +583,9 @@ def ipver_test_builder(name, test_func, ipver):
    """Build test cases for each IP version"""
    def test_case(cfg):
        cfg.require_ipver(ipver)
        test_case.__name__ = f"{name}_ip{ipver}"
        test_func(cfg, ipver)

    test_case.__name__ = f"{name}_ip{ipver}"
    return test_case