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

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



test_case will only take on its formatted name after it is called by
the test runner. Move the assignment to test_case.__name__ to when the
test_case is constructed, not called.

Fixes: 8f90dc6e ("selftests: drv-net: psp: add basic data transfer and key rotation tests")
Signed-off-by: default avatarDaniel Zahka <daniel.zahka@gmail.com>
Link: https://patch.msgid.link/20251216-psp-test-fix-v1-1-3b5a6dde186f@gmail.com


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

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