tp-qemu icon indicating copy to clipboard operation
tp-qemu copied to clipboard

rh_kselftests_vm: kernel selftests execution in guest

Open mcasquer opened this issue 1 year ago • 28 comments

rh_kselftests_vm: kernel selftests execution in guest

Creates a new test case that executes the kernel selftests inside the VM through the RPM that has been previously downloaded and installed. Could be expanded with more tests in the future.

Signed-off-by: mcasquer [email protected] ID: 2637

mcasquer avatar Jul 23 '24 07:07 mcasquer

 (1/1) Host_RHEL.m9.u5.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.x86_64.io-github-autotest-qemu.vm_hugetlb_selftests.q35: STARTED
 (1/1) Host_RHEL.m9.u5.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.x86_64.io-github-autotest-qemu.vm_hugetlb_selftests.q35: PASS (171.86 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

mcasquer avatar Jul 23 '24 07:07 mcasquer

@zhenyzha @MiriamDeng @fbq815 @zhencliu @YongxueHong please could you review this PR? Thanks !

mcasquer avatar Jul 23 '24 07:07 mcasquer

@zhenyzha @MiriamDeng @fbq815 @zhencliu @YongxueHong this is a kindly reminder, please could you review this PR? Thanks !

mcasquer avatar Aug 07 '24 07:08 mcasquer

@mcasquer Could you provide the test results of rhel.10? I have not been able to compile successfully on 10 recently. qemu.vm_hugetlb_selftests.arm64-pci: FAIL: Error during mm selftests compilation: <sys/capability.h>

zhenyzha avatar Aug 08 '24 08:08 zhenyzha

@mcasquer Could you provide the test results of rhel.10? I have not been able to compile successfully on 10 recently. qemu.vm_hugetlb_selftests.arm64-pci: FAIL: Error during mm selftests compilation: <sys/capability.h>

Indeed, good catch !

mcasquer avatar Aug 08 '24 11:08 mcasquer

Hi @mcasquer , I have a quick look with the kernel CKI testing for the mm part, any code change with the following trigger source will trigger the test automatically,

trigger_sources:
  - tools/testings/selftests/.*
  - mm/.*
  - arch/x86/mm/.*
  - arch/s390/mm/.*
  - arch/arm64/mm/.*
  - arch/powerpc/mm.*

hugetlb was covered with: https://gitlab.com/redhat/centos-stream/tests/kernel/kpet-db/-/blob/main/cases/selftests/kselftests/mm.yaml?ref_type=heads#L64

I would like to double confirm does this meet your requirements, or it is must to check it in a qemu-kvm based VM os which is the purpose of this patch ? Thanks

yanan-fu avatar Aug 22 '24 06:08 yanan-fu

I would like to double confirm does this meet your requirements, or it is must to check it in a qemu-kvm based VM os which is the purpose of this patch ? Thanks

@yanan-fu the idea is to execute those tests inside a VM backed by hugepages, my understanding is the kernel team is not covering this scenario so that's why we need the test case

mcasquer avatar Aug 26 '24 10:08 mcasquer

I would like to double confirm does this meet your requirements, or it is must to check it in a qemu-kvm based VM os which is the purpose of this patch ? Thanks

@yanan-fu the idea is to execute those tests inside a VM backed by hugepages, my understanding is the kernel team is not covering this scenario so that's why we need the test case

Hi @mcasquer , I am curious do we need to cover different page size? Or the page size is a part of test matrix?

zhencliu avatar Aug 26 '24 10:08 zhencliu

I would like to double confirm does this meet your requirements, or it is must to check it in a qemu-kvm based VM os which is the purpose of this patch ? Thanks

@yanan-fu the idea is to execute those tests inside a VM backed by hugepages, my understanding is the kernel team is not covering this scenario so that's why we need the test case

Hi @mcasquer , I am curious do we need to cover different page size? Or the page size is a part of test matrix?

@zhencliu not really, at least for x86_64 the 2MB hugepages are fine

mcasquer avatar Aug 26 '24 10:08 mcasquer

@YongxueHong @zhencliu could you review again this PR? Thanks!

mcasquer avatar Sep 02 '24 14:09 mcasquer

@zhenyzha @fbq815 do you consider this test case can be supported in you corresponding archs? Please have a look to the issue and to the internal patch as well

mcasquer avatar Sep 03 '24 07:09 mcasquer

@zhenyzha @fbq815 do you consider this test case can be supported in you corresponding archs? Please have a look to the issue and to the internal patch as well

That way I will delete the only x86_64 key from cfg

mcasquer avatar Sep 03 '24 07:09 mcasquer

 (1/1) Host_RHEL.m9.u5.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.x86_64.io-github-autotest-qemu.vm_hugetlb_selftests.q35: STARTED
 (1/1) Host_RHEL.m9.u5.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.x86_64.io-github-autotest-qemu.vm_hugetlb_selftests.q35: PASS (164.08 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

mcasquer avatar Sep 12 '24 06:09 mcasquer

@yanan-fu @zhencliu @YongxueHong please, could you review this PR? Thanks !

mcasquer avatar Sep 12 '24 06:09 mcasquer

@zhenyzha @fbq815 please could you provide your test results? Thanks !

mcasquer avatar Sep 12 '24 06:09 mcasquer

ERROR: Shell command failed: 'brew download-build --rpm kernel-selftests-internal-****.aarch64+64k.rpm' (status: 1, output: 'No such rpm: kernel-selftests-internal-**.aarch64+64k.rpm\n') Please exclude the arm platformno aarch64`

zhenyzha avatar Sep 12 '24 07:09 zhenyzha

As our discussion internally, suggest add new test kselftests with multiple variants, and mm is only one we need now for this PR.

yanan-fu avatar Sep 12 '24 07:09 yanan-fu

ERROR: Shell command failed: 'brew download-build --rpm kernel-selftests-internal-****.aarch64+64k.rpm' (status: 1, output: 'No such rpm: kernel-selftests-internal-**.aarch64+64k.rpm\n') Please exclude the arm platformno aarch64`

The correct rpm name for aarch64 is: kernel-selftests-internal-***.aarch64.rpm, it does not distinguish 4k and 64k for aarch64.

@mcasquer @zhenyzha kernel version (uname -r) need strip the +*** if i understand correctly, could you have a try ? Thanks!

yanan-fu avatar Sep 12 '24 07:09 yanan-fu

As our discussion internally, suggest add new test kselftests with multiple variants, and mm is only one we need now for this PR.

@yanan-fu in that case should I rename the test case? as it contais the hugetlb keyword in the title

mcasquer avatar Sep 12 '24 08:09 mcasquer

ERROR: Shell command failed: 'brew download-build --rpm kernel-selftests-internal-****.aarch64+64k.rpm' (status: 1, output: 'No such rpm: kernel-selftests-internal-**.aarch64+64k.rpm\n') Please exclude the arm platformno aarch64`

@zhenyzha code updated, could you try again? Thanks !

mcasquer avatar Sep 12 '24 08:09 mcasquer

(1/1) Host_RHEL.m9.u5.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.aarch64.page_4k.io-github-autotest-qemu.vm_hugetlb_selftests.arm64-pci: PASS (134.19 s)

LGTM.Acked-by: Zhenyu Zhang [email protected]

zhenyzha avatar Sep 12 '24 10:09 zhenyzha

could skip s390x since we don't really use the hugepage

fbq815 avatar Sep 12 '24 10:09 fbq815

could skip s390x since we don't really use the hugepage

Updated !

mcasquer avatar Sep 12 '24 10:09 mcasquer

As our discussion internally, suggest add new test kselftests with multiple variants, and mm is only one we need now for this PR.

@yanan-fu in that case should I rename the test case? as it contais the hugetlb keyword in the title

Yes, what do you think about the rh_kselftests_vm to indicate it is to support the kselftest in vm

yanan-fu avatar Sep 12 '24 10:09 yanan-fu

As our discussion internally, suggest add new test kselftests with multiple variants, and mm is only one we need now for this PR.

@yanan-fu in that case should I rename the test case? as it contais the hugetlb keyword in the title

Yes, what do you think about the rh_kselftests_vm to indicate it is to support the kselftest in vm

Updated !

mcasquer avatar Sep 12 '24 11:09 mcasquer

@yanan-fu @zhencliu @YongxueHong could you review again this PR? Thanks !

mcasquer avatar Sep 12 '24 11:09 mcasquer

 (1/1) Host_RHEL.m9.u5.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.x86_64.io-github-autotest-qemu.rh_ksleftests_vm.mm.q35: STARTED
 (1/1) Host_RHEL.m9.u5.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.x86_64.io-github-autotest-qemu.rh_ksleftests_vm.mm.q35: PASS (163.29 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

mcasquer avatar Sep 12 '24 12:09 mcasquer

 (1/1) Host_RHEL.m9.u5.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.x86_64.io-github-autotest-qemu.rh_kselftests_vm.mm.q35: STARTED
 (1/1) Host_RHEL.m9.u5.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.x86_64.io-github-autotest-qemu.rh_kselftests_vm.mm.q35: PASS (171.08 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

mcasquer avatar Sep 13 '24 05:09 mcasquer

Hi @MiriamDeng Could you help to review it from the PPC platform? Thanks in advance.

YongxueHong avatar Sep 14 '24 02:09 YongxueHong

It seems @maxujun is now in charge of ppc testing... could you help to review this PR? Thanks !

mcasquer avatar Sep 19 '24 05:09 mcasquer