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

rh_kselftests_vm.mm: updates the pattern based on the guest OS version #4256

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mcasquer
Copy link
Contributor

rh_kselftests_vm.mm: updates the pattern based on the guest OS version

The output of the selftests changes, for RHEL 8 versions, it
seems to not contain hastags '#' at the beggining of each line.
Opportunistically, increase the RPM download timeout.

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

The output of the selftests changes, for RHEL 8 versions, it
seems to not contain hastags '#' at the beggining of each line.
Opportunistically, increase the RPM download timeout.

Signed-off-by: mcasquer <[email protected]>
@mcasquer mcasquer marked this pull request as ready for review January 31, 2025 08:36
@mcasquer
Copy link
Contributor Author

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

@mcasquer
Copy link
Contributor Author

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

Comment on lines -44 to 47
summary = re.findall(r"\# SUMMARY.+", o)
summary_pattern = params.get("summary_pattern")
pattern = rf"{summary_pattern}"
summary = re.findall(pattern, o)
num_failed_tests = int(re.findall(r"FAIL\=\d+", str(summary))[0].split("=")[1])
Copy link
Contributor

Choose a reason for hiding this comment

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

what about using a single line pattern to get the count of failed cases, e.g.

o = re.search(r"SUMMARY:.+FAIL=(?P\d+?)", s)
o.group("fail")
'0'

Just an example, please re-consider the pattern string
Then we dont need two findall calls

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