Skip to content

[tests/conftest.py] Add parameter for collecting dump: "since yesterday"#1855

Merged
wangxin merged 1 commit intosonic-net:masterfrom
stephenxs:collect-dump-since-yesterday
Jul 10, 2020
Merged

[tests/conftest.py] Add parameter for collecting dump: "since yesterday"#1855
wangxin merged 1 commit intosonic-net:masterfrom
stephenxs:collect-dump-since-yesterday

Conversation

@stephenxs
Copy link
Contributor

Description of PR

Summary:
The sonic dump will be collected when a test case fails.
However, it can be very time-consuming to collect dump in a switch with a lot of log files.
To collect dump since yesterday prevents DUT from consuming too much time on it.

Signed-off-by: Stephen Sun [email protected]

Type of change

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

Approach

What is the motivation for this PR?

To reduce the time consumed by collecting sonic dump when a test case fails

How did you do it?

Add "s yesterday"

How did you verify/test it?

Any platform specific information?

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

Documentation

sonic dump will be collected when a test case fail.
However, it can be very time-consuming to collect dump in a switch with a lot of log files.
To collect dump since yesterday prevents DUT from consuming too much time on it.

Signed-off-by: Stephen Sun <[email protected]>
testname = request.node.name
if request.config.getoption("--collect_techsupport") and request.node.rep_call.failed:
res = duthost.shell("generate_dump")
res = duthost.shell("generate_dump -s yesterday")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you make the time range configurable? When config option is not supplied, use default -s yesterday?

Copy link
Contributor Author

@stephenxs stephenxs Jul 8, 2020

Choose a reason for hiding this comment

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

Looks like to make the time range configurable doesn't yield too much benefit.

  • So far we don't have any test case which requires log information for more than 1 day. In this sense, this modification doesn't affect test cases current running.
  • to make the time range shorter doesn't reduce the size of tarball too much.

How do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sounds OK if there is no much improvement in dump tarball size if the time range is reduced to hours.

@wangxin
Copy link
Collaborator

wangxin commented Jul 9, 2020

retest this please

1 similar comment
@stephenxs
Copy link
Contributor Author

retest this please

@wangxin wangxin merged commit 2c233f8 into sonic-net:master Jul 10, 2020
@stephenxs stephenxs deleted the collect-dump-since-yesterday branch July 10, 2020 03:42
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
* d240291 Update port_rates & rif_rates lua scripts to convert poll_interval to MS (sonic-net#1855)
* a71a5d3 [acl mirror action] Mirror session ref count fix at acl rule attachment (sonic-net#1761)
* 197f427 Fix vs test failure in test_buffer_traditional (sonic-net#1881)
* 8471f42 Revert "[debugcounterorch] check if counter type is supported before querying… (sonic-net#1789)" (sonic-net#1884)

Signed-off-by: Volodymyr Samotiy <[email protected]>
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
sonic-swss commits

5fbd113 [Flex-counters] Fix the delay of flex counters flow to prevent infinite loop (sonic-net#1899)
dc685b6 [portsorch] Add an extra check before setting oper speed to APPL_DB (sonic-net#1885)
ceef728 Update port_rates & rif_rates lua scripts to convert poll_interval to MS (sonic-net#1855)

sonic-utilities commits

3160753 [ci]: Support PR coverage (sonic-net#1806)
3316fdb fix wrong code indent in sfputil (sonic-net#1808)
c33e3a8 [config reload] Fix config reload failure due to sonic.target job cancellation (sonic-net#1814)
4f7e107 [portconfig] Validate duplicate speed value and interface type value (sonic-net#1745)
59817e2 [warm-reboot] Add new preboot health check: verify database integrity (sonic-net#1785)
bf2ff3c [portstat, intfstat] added rates and utilization (sonic-net#1750)
3bf962c [show][platform] Revise chassis info fallback to only fall back on pmon crash (sonic-net#1751)
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