Skip to content
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 virtio-mem access and discard setting #5290

Merged

Conversation

nanli1
Copy link
Contributor

@nanli1 nanli1 commented Nov 22, 2023

xxxx-299163: Virtio-mem memory device with access and discard settings

Signed-off-by: nanli [email protected]

rhel9 & x86

avocado run --vt-type libvirt --test-runner=runner --vt-machine-type q35 memory.devices.virtio_mem.access_and_discard.with_numa
 (1/9) type_specific.io-github-autotest-libvirt.memory.devices.virtio_mem.access_and_discard.with_numa.undefined.file: PASS (83.18 s)
 (2/9) type_specific.io-github-autotest-libvirt.memory.devices.virtio_mem.access_and_discard.with_numa.undefined.anonymous: PASS (78.08 s)
 (3/9) type_specific.io-github-autotest-libvirt.memory.devices.virtio_mem.access_and_discard.with_numa.undefined.memfd: PASS (82.58 s)
 (4/9) type_specific.io-github-autotest-libvirt.memory.devices.virtio_mem.access_and_discard.with_numa.shared_and_discard.file: PASS (83.88 s)
 (5/9) type_specific.io-github-autotest-libvirt.memory.devices.virtio_mem.access_and_discard.with_numa.shared_and_discard.anonymous: PASS (81.49 s)
 (6/9) type_specific.io-github-autotest-libvirt.memory.devices.virtio_mem.access_and_discard.with_numa.shared_and_discard.memfd: PASS (78.68 s)
 (7/9) type_specific.io-github-autotest-libvirt.memory.devices.virtio_mem.access_and_discard.with_numa.private_and_no_discard.file: PASS (83.69 s)
 (8/9) type_specific.io-github-autotest-libvirt.memory.devices.virtio_mem.access_and_discard.with_numa.private_and_no_discard.anonymous: PASS (85.91 s)
 (9/9) type_specific.io-github-autotest-libvirt.memory.devices.virtio_mem.access_and_discard.with_numa.private_and_no_discard.memfd: PASS (82.90 s)

rhel9 & aarch64


avocado run --vt-type libvirt --test-runner=runner --vt-machine-type arm64-mmio   memory.devices.virtio_mem.access_and_discard
 (1/9) type_specific.io-github-autotest-libvirt.memory.devices.virtio_mem.access_and_discard.with_numa.undefined.file: PASS (70.83 s)
 (2/9) type_specific.io-github-autotest-libvirt.memory.devices.virtio_mem.access_and_discard.with_numa.undefined.anonymous: PASS (70.47 s)
 (3/9) type_specific.io-github-autotest-libvirt.memory.devices.virtio_mem.access_and_discard.with_numa.undefined.memfd: PASS (69.11 s)
 (4/9) type_specific.io-github-autotest-libvirt.memory.devices.virtio_mem.access_and_discard.with_numa.shared_and_discard.file: PASS (67.19 s)
 (5/9) type_specific.io-github-autotest-libvirt.memory.devices.virtio_mem.access_and_discard.with_numa.shared_and_discard.anonymous: PASS (70.45 s)
 (6/9) type_specific.io-github-autotest-libvirt.memory.devices.virtio_mem.access_and_discard.with_numa.shared_and_discard.memfd: PASS (69.58 s)
 (7/9) type_specific.io-github-autotest-libvirt.memory.devices.virtio_mem.access_and_discard.with_numa.private_and_no_discard.file: PASS (70.28 s)
 (8/9) type_specific.io-github-autotest-libvirt.memory.devices.virtio_mem.access_and_discard.with_numa.private_and_no_discard.anonymous: PASS (66.03 s)
 (9/9) type_specific.io-github-autotest-libvirt.memory.devices.virtio_mem.access_and_discard.with_numa.private_and_no_discard.memfd: PASS (67.12 s)



@nanli1 nanli1 force-pushed the add_case_for_virtio_mem_access_and_discard branch 2 times, most recently from 00e4357 to 53a734f Compare November 22, 2023 08:47
@nanli1
Copy link
Contributor Author

nanli1 commented Nov 22, 2023

@dzhengfy Could you please help add request arm label on this pr , and I have tested and updated it on rhel9 & aarch 64 ,PASSED

@nanli1 nanli1 force-pushed the add_case_for_virtio_mem_access_and_discard branch from 53a734f to 79acd2f Compare November 27, 2023 07:02
@nanli1 nanli1 force-pushed the add_case_for_virtio_mem_access_and_discard branch 3 times, most recently from 2276248 to dd0547e Compare December 13, 2023 11:56
    xxxx-299163: Virtio-mem memory device with access and discard settings
Signed-off-by: nanli <[email protected]>
@nanli1 nanli1 force-pushed the add_case_for_virtio_mem_access_and_discard branch from dd0547e to 123b5ee Compare December 13, 2023 11:57
Copy link
Contributor

@cliping cliping left a comment

Choose a reason for hiding this comment

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

LGTM

return mem_list


def check_access_and_discard(test, params, vm,
Copy link
Contributor

Choose a reason for hiding this comment

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

vm , expected_share, expected_discard ,those values can be extracted from params, so they are not necessary to be pass in as independent parameters

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks you advice chunfu. There maybe sometimes that the def check_access_and_discard is not always checking the same expected result in one case. So I splitted the expected result out of the function.

@nanli1 nanli1 requested a review from chunfuwen December 18, 2023 03:43
Copy link
Contributor

@chunfuwen chunfuwen left a comment

Choose a reason for hiding this comment

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

lgtm

@chunfuwen chunfuwen merged commit e302976 into autotest:master Dec 19, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants