-
Notifications
You must be signed in to change notification settings - Fork 168
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
add case for nvdimm turned to dram #6216
base: master
Are you sure you want to change the base?
Conversation
xxxx-302271:Turned nvdimm to the regular DRAM Signed-off-by: nanli <[email protected]>
206a320
to
2bc5c9c
Compare
@liang-cong-red-hat could you help review? |
LGTM.Acked-by: Zhenyu Zhang [email protected] |
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.
Others LGTM
from provider.memory import memory_base | ||
|
||
|
||
def execute_cmd_in_guest(test, session, cmd): |
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.
Is it simpler to reuse cmd_status_output() in avocado_vt/virttest/utils_misc.py ?
@@ -270,3 +272,52 @@ def compare_values(test, expected, actual, check_item=''): | |||
check_item, expected, actual)) | |||
else: | |||
test.log.debug("Check %s %s PASS", check_item, actual) | |||
|
|||
|
|||
def check_boot_config(session, test): |
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.
Please help add a new paramater for check_list and move this function into avocado-vt/virttest/utils_libvirt/libvirt_bios.py
test.fail('/boot/config content not correct: %s not exist' % item) | ||
|
||
|
||
def check_used_memory_info(test, session=None): |
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.
The function name is inaccurate. Is it better if using get_memory_info_by_free_cmd() ?
Please move this function into avocado-vt/virttest/utils_libvirt/libvirt_memory.py
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.
And there is similar func here:avocado-vt/virttest/vt_utils/memory.py, you could use them directly if possible., like, get_used_mem, get_free_mem, etc.
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.
And there is similar func here:avocado-vt/virttest/vt_utils/memory.py, you could use them directly if possible., like, get_used_mem, get_free_mem, etc.
I did not see this vt_utils before. Yes, it seems better than libvirt_memory.py
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.
Just 2 comments, others LGTM
test.log.info("TEST_STEP5:Turned nvdimm to the regular DRAM, and hot-added memory matches the expectation") | ||
if not utils_package.package_install('daxctl', session=session): | ||
test.fail('Cannot install daxctl to vm') | ||
if distro.detect().name == 'rhel' and int(distro.detect().version) == 9: |
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.
here better change to >=9
test.fail('/boot/config content not correct: %s not exist' % item) | ||
|
||
|
||
def check_used_memory_info(test, session=None): |
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.
And there is similar func here:avocado-vt/virttest/vt_utils/memory.py, you could use them directly if possible., like, get_used_mem, get_free_mem, etc.
Signed-off-by: nanli [email protected]