-
Notifications
You must be signed in to change notification settings - Fork 771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collect DB dump when test failed #5197
Conversation
What is the motivation for this PR? Need new test: Inject route flapping and instability How did you do it? 1.choose one route, and ping it continiously 2.withdraw announce some other routes at the same time, to see whether the route stable or not 3. add the completeness level to set loop time How did you verify/test it? Run test in some loops Any platform specific information? Supported testbed topology if it's a new test case?
What is the motivation for this PR? Need new test: Inject route flapping and instability How did you do it? 1.choose one route, and ping it continiously 2.withdraw announce some other routes at the same time, to see whether the route stable or not 3. add the completeness level to set loop time How did you verify/test it? Run test in some loops Any platform specific information? Supported testbed topology if it's a new test case?
What is the motivation for this PR? Collect DB dump when test failed How did you do it? Add a common fixture collect_db_dump set as autouse. When test failed, all of the DBs will be dumped, collected and sent to the test server How did you verify/test it? Failed a test and check the collection Any platform specific information? Supported testbed topology if it's a new test case?
1. fetch to tests/logs/ 2. rm whole log document
# Collect DB dump | ||
duthosts.file(path=db_dump_path, state="directory") | ||
for i in dbs: | ||
duthosts.shell("redis-dump -d {} -y -o {}/{}".format(i, db_dump_path, i)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On duthost, it would be better to generate the dump files to "/tmp".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK,I will change the path
tests/conftest.py
Outdated
When test failed, teardown of this fixture will dump all the DB and collect to the test servers | ||
''' | ||
yield | ||
collect_db_dump_on_duts(request, duthosts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually we add a new line at the end of a file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
1. dut file path: /tmp/db_dump 2. clean .tar.gz in dut
this is erroring out in multi-ASIC platform. created #5251 |
Description of PR
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
Collect DB dump when test failed
How did you do it?
Add a common fixture collect_db_dump set as autouse. When test failed, all of the DBs will be dumped, collected and sent to the test server
How did you verify/test it?
Failed a test and check the collection
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation