Skip to content

Store dut type to ptf host#12588

Merged
wangxin merged 1 commit intosonic-net:masterfrom
xwjiang-ms:store_dut_type_to_ptf
Apr 26, 2024
Merged

Store dut type to ptf host#12588
wangxin merged 1 commit intosonic-net:masterfrom
xwjiang-ms:store_dut_type_to_ptf

Conversation

@xwjiang-ms
Copy link
Copy Markdown
Contributor

@xwjiang-ms xwjiang-ms commented Apr 25, 2024

Description of PR

Summary:
Fixes # (issue)

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205
  • 202305
  • 202311

Approach

What is the motivation for this PR?

We are adding more data plane test scripts to PR test, but some traffic test using ptf_runner can't be tested on KVM platform, we need to test configuration and skip ptf_runner test if needed
To minimize the change on testcases, it's a better approach to get dut type in ptf_runner and use a flag to decide whether the case could be run on KVM dut, other than add if else in all testcases using ptf_runner

How did you do it?

Store dut type to file in ptf host in add-top and restart-ptf, then we will be able to get dut type in ptf_runner

How did you verify/test it?

Any platform specific information?

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

Documentation

@wangxin
Copy link
Copy Markdown
Collaborator

wangxin commented Apr 26, 2024

Can you improve the PR description to elaborate the motivation and thinking behind this PR?

@xwjiang-ms
Copy link
Copy Markdown
Contributor Author

Can you improve the PR description to elaborate the motivation and thinking behind this PR?

Updated

@wangxin wangxin merged commit 26ce29b into sonic-net:master Apr 26, 2024
@xwjiang-ms xwjiang-ms deleted the store_dut_type_to_ptf branch April 29, 2024 03:13
wangxin pushed a commit that referenced this pull request May 8, 2024
What is the motivation for this PR?
We are adding more data plane test scripts to PR test, but some traffic test using ptf_runner can't be tested on KVM platform, we need to test configuration and skip ptf_runner test if needed
It's a better approach to get dut type in ptf_runner and use a flag to decide whether the case could be run on KVM dut, and dut type already stored in ptf with PR #12588

How did you do it?
1. Get dut_type and kvm_support flag at the beginning of ptf runner, if dut is kvm and kvm_support is false, return True to skip ptf_runner test
2. Consider default kvm_support is True, because some data plane tests in pr test require to run ptf_runner, and test result are also related to the behavior of ptf, so set default to True and will add False if new data plane test do not support kvm platform
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants