Skip to content

Add check of dut type and kvm support flag in ptf_runner#12598

Merged
wangxin merged 6 commits intosonic-net:masterfrom
xwjiang-ms:add_param_if_skip_ptf_runner_in_kvm
May 8, 2024
Merged

Add check of dut type and kvm support flag in ptf_runner#12598
wangxin merged 6 commits intosonic-net:masterfrom
xwjiang-ms:add_param_if_skip_ptf_runner_in_kvm

Conversation

@xwjiang-ms
Copy link
Copy Markdown
Contributor

@xwjiang-ms xwjiang-ms commented Apr 26, 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
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

How did you verify/test it?

Any platform specific information?

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

Documentation



def get_dut_type(host):
dut_type_exists = host.stat(path="/sonic/dut_type.txt")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable indeed holds "stat" of file /sonic/dut_type.txt. It means more than just "exists". Maybe dut_type_stat is a better variable name?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree

@xwjiang-ms xwjiang-ms requested a review from wangxin April 29, 2024 03:13
@wangxin wangxin merged commit 417d6c0 into sonic-net:master May 8, 2024
@xwjiang-ms xwjiang-ms deleted the add_param_if_skip_ptf_runner_in_kvm branch May 8, 2024 05:13
wangxin pushed a commit that referenced this pull request Nov 7, 2024
What is the motivation for this PR?
In PR #12598, we set default kvm_support to True in ptf_runner params, but most of tests do not support traffic test in KVM, to minimize code change in testcases, it's better to set default kvm_support to False

How did you do it?
Set default kvm_support to False and set kvm_support to True in tests currently running ptf_runner

How did you verify/test it?
veronica-arista pushed a commit to veronica-arista/sonic-mgmt that referenced this pull request Nov 7, 2024
What is the motivation for this PR?
In PR sonic-net#12598, we set default kvm_support to True in ptf_runner params, but most of tests do not support traffic test in KVM, to minimize code change in testcases, it's better to set default kvm_support to False

How did you do it?
Set default kvm_support to False and set kvm_support to True in tests currently running ptf_runner

How did you verify/test it?
sreejithsreekumaran pushed a commit to sreejithsreekumaran/sonic-mgmt that referenced this pull request Nov 15, 2024
What is the motivation for this PR?
In PR sonic-net#12598, we set default kvm_support to True in ptf_runner params, but most of tests do not support traffic test in KVM, to minimize code change in testcases, it's better to set default kvm_support to False

How did you do it?
Set default kvm_support to False and set kvm_support to True in tests currently running ptf_runner

How did you verify/test it?
yutongzhang-microsoft pushed a commit to yutongzhang-microsoft/sonic-mgmt that referenced this pull request Nov 21, 2024
What is the motivation for this PR?
In PR sonic-net#12598, we set default kvm_support to True in ptf_runner params, but most of tests do not support traffic test in KVM, to minimize code change in testcases, it's better to set default kvm_support to False

How did you do it?
Set default kvm_support to False and set kvm_support to True in tests currently running ptf_runner

How did you verify/test it?
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