sonic-net / sonic-mgmt

Configuration management examples for SONiC
Other
195 stars 715 forks source link

[Bug]: test_ecmp_hash_seed_value test fails with IndexError #14829

Open dayouliu1 opened 1 week ago

dayouliu1 commented 1 week ago

Issue Description

test_ecmp_hash_seed_value will fail when loading the check_dut_asic_type fixture

Results you see

test_ecmp_hash_seed_value will fail on setup with IndexError: Bad index 'None' type <class 'NoneType'> when loading check_dut_asic_type fixture

Results you expected to see

Expect to see no failure

Is it platform specific

generic

Relevant log output

failed on setup with "IndexError: Bad index 'None' type <class 'NoneType'>"
==========================
request = <SubRequest 'check_dut_asic_type' for <Function test_ecmp_hash_seed_value[dut]>>
duthosts = [<MultiAsicSonicHost dut>], rand_one_dut_hostname = None

    @pytest.fixture(scope="function")
    def check_dut_asic_type(request, duthosts, rand_one_dut_hostname):
>       duthost = duthosts[rand_one_dut_hostname]

duthosts   = [<dut>]
rand_one_dut_hostname = None
request    = <SubRequest 'check_dut_asic_type' for <Function test_ecmp_hash_seed_value[dut]>>

common/plugins/custom_fixtures/check_dut_asic_type.py:7:

Output of show version

202405

Attach files (if any)

No response

ZhaohuiS commented 12 hours ago

it's fixed by https://github.com/sonic-net/sonic-mgmt/pull/14935#event-14583285299

https://github.com/sonic-net/sonic-mgmt/pull/14075 was forgot to do cherry pick into 202405