Skip to content

[lag_member] add necessary missed imports to test#16021

Merged
liat-grozovik merged 1 commit intosonic-net:masterfrom
AntonHryshchuk:lag_member
Dec 18, 2024
Merged

[lag_member] add necessary missed imports to test#16021
liat-grozovik merged 1 commit intosonic-net:masterfrom
AntonHryshchuk:lag_member

Conversation

@AntonHryshchuk
Copy link
Contributor

Description of PR

Summary:
During movement test to Python 3 (#14944), were deleted necessary imports of fixtures with "autouse=True":
copy_ptftests_directory
copy_arp_responder_py

copy_arp_responder_py:
The fixture copied required configuration files. The arp responder configurations used in the test by method setup_arp_responder
Error from test without this fixture:

failed = True
changed = True
end = 2024-12-11 05:18:59.588230
cmd = supervisorctl restart arp_responder
delta = 0:00:02.249219
rc = 7
invocation = {'module_args': {'creates': None, 'executable': None, '_uses_shell': True, 'strip_empty_ends': True, '_raw_params': 'supervisorctl restart arp_responder', 'removes': None, 'argv': None, 'warn': False, 'chdir': None, 'stdin_add_newline': True, 'stdin': None}}
start = 2024-12-11 05:18:57.339011
msg = non-zero return code
_ansible_no_log = None
stdout =
arp_responder: ERROR (not running)
arp_responder: ERROR (spawn error)stderr =

cmd supervisorctl restart arp_responder called in sonic-mgmt/tests/pc/test_lag_member.py: line 225

copy_ptftests_directory:
Error from test without this fixture:

cmd = /root/env-python3/bin/ptf --test-dir acstests/py3 lag_test.LagMemberTrafficTest --platform-dir /root/ptftests --platform remote -t 'dut_mac='"'"'9c:05:91:99:26:00'"'"';dut_vlan={'"'"'id'"'"': 109, '"'"'ip'"'"': '"'"'192.168.9.1/24'"'"'};ptf_lag={'"'"'port_list'"'"': ['"'"'eth1'"'"', '"'"'eth2'"'"', '"'"'eth3'"'"', '"'"'eth8'"'"', '"'"'eth9'"'"', '"'"'eth10'"'"', '"'"'eth11'"'"', '"'"'eth56'"'"'], '"'"'ip'"'"': '"'"'192.168.9.2/24'"'"'};port_not_behind_lag={'"'"'port_id'"'"': 16, '"'"'port_name'"'"': '"'"'eth16'"'"', '"'"'ip'"'"': '"'"'192.168.9.3/24'"'"'};kvm_support=True' --relax --debug info
delta = 0:00:00.433834
rc = 1
invocation = {'module_args': {'creates': None, 'executable': None, 'chdir': '/root', 'strip_empty_ends': True, '_raw_params': '/root/env-python3/bin/ptf --test-dir acstests/py3 lag_test.LagMemberTrafficTest --platform-dir /root/ptftests --platform remote -t \'dut_mac=\'"\'"\'9c:05:91:99:26:00\'"\......}
start = 2024-12-11 14:33:11.478026
msg = non-zero return code
_ansible_no_log = None
stdout =
Using packet manipulation module: ptf.packet_scapystderr =
Traceback (most recent call last):
  File "/root/env-python3/bin/ptf", line 820, in <module>
    platform_mod = import_module(config["platform_dir"], platform_name)
  File "/root/env-python3/bin/ptf", line 112, in import_module
    return module_specs.loader.load_module()
AttributeError: 'NoneType' object has no attribute 'loader'

Only when the test is executed with these imports does it pass.

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

Approach

What is the motivation for this PR?

Stabilaze lag_member test

How did you do it?

Added removed imports

How did you verify/test it?

Executed on setup

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@AntonHryshchuk
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 16021 in repo sonic-net/sonic-mgmt

@AharonMalkin
Copy link
Contributor

AharonMalkin commented Dec 12, 2024

/azpw run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 16021 in repo sonic-net/sonic-mgmt

@AntonHryshchuk
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@AntonHryshchuk
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@AntonHryshchuk
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik
Copy link
Collaborator

@AntonHryshchuk to which branches this fix should get in?

@liat-grozovik liat-grozovik merged commit 0116c9f into sonic-net:master Dec 18, 2024
@AntonHryshchuk
Copy link
Contributor Author

@liat-grozovik
the root change was introduced only to master - #14944
But already created 202411 from master. We also need it in 202411

mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Feb 17, 2025
During movement test to Python 3 (sonic-net#14944), were deleted necessary imports of fixtures with "autouse=True":
copy_ptftests_directory
copy_arp_responder_py

copy_arp_responder_py:
The fixture copied required configuration files. The arp responder configurations used in the test by method setup_arp_responder

Signed-off-by: AntonHryshchuk <[email protected]>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202411: #16990

mssonicbld pushed a commit that referenced this pull request Feb 17, 2025
During movement test to Python 3 (#14944), were deleted necessary imports of fixtures with "autouse=True":
copy_ptftests_directory
copy_arp_responder_py

copy_arp_responder_py:
The fixture copied required configuration files. The arp responder configurations used in the test by method setup_arp_responder

Signed-off-by: AntonHryshchuk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants