Skip to content

Conversation

@junaruga
Copy link

@junaruga junaruga commented Feb 4, 2026

Add the test_version_cmp_centos_stream and test_version_cmp_rhel.

The main purpose to add these tests is to make sure the distro: centos-stream-rawhide and distro: rhel-X.rawhide such as distro: rhel-10.rawhide, distro: rhel-9.rawhide work.
Because I heard that the distro: rhel-10.rawhide work

For the documentation, there is the following document about the fedora-rawahide. Let me know if you want to update the document with centos-stream and rhel.

https://fmf.readthedocs.io/en/stable/context.html#context
https://github.com/teemtee/fmf/blob/39af408279b305bd8744e1a74c4ad09958394587/docs/context.rst#major-version

fedora-33 < fedora-rawhide ---> True (rawhide is newer than any number)

Checklist

  • implement the feature
  • write the documentation
  • extend the test coverage
  • mention the version
  • include a release note

@junaruga junaruga force-pushed the wip/context-distro-rhel-rawhide branch 2 times, most recently from 1c85abe to d9d8ba2 Compare February 5, 2026 11:00
@LecrisUT
Copy link
Contributor

LecrisUT commented Feb 5, 2026

This just feels wrong. My understanding is that the current comparison works just because of the accident of string comparison. I would prefer if we can start work on #289, and instead define more explicitly how the context need to be ordered.

@junaruga
Copy link
Author

junaruga commented Feb 5, 2026

@LecrisUT Thanks for your response. I think you are right. The name rhel-X.rawhide means actually the latest minor version of the rhel-X, and centos-stream-rawhide means actually the latest version of the centos-stream. But there are no official definition of rawhide in RHEL and CentOS Stream. This may confuse people. So, I hope you guys would work on the feature #289.

My understanding is that the current comparison works just because of the accident of string comparison.

I suppose that the ContextValue version_cmp method calls ContextValue.compare method converting the string into integer at the following lines.

fmf/fmf/context.py

Lines 159 to 161 in 39af408

# convert to int
first_version = int(first)
second_version = int(second)

However, while the comparing logic is to convert the version string to integer, there is already the document about the "fedora-33 < fedora-rawhide ---> True". And it seems the rhel-X.rawhide is already used in practice in my company.

Add the test_version_cmp_centos_stream and test_version_cmp_rhel.

The main purpose to add these tests are to make sure the
`distro: centos-stream-rawhide` and `distro: rhel-10.rawhide` work.
@junaruga junaruga force-pushed the wip/context-distro-rhel-rawhide branch from d9d8ba2 to 30a4f52 Compare February 5, 2026 12:23
@junaruga
Copy link
Author

junaruga commented Feb 5, 2026

It seems the CI testing-farm failures are not related to this PR.

For example, for the testing-farm:fedora-rawhide-x86_64 case:

https://artifacts.dev.testing-farm.io/8b1bb6af-012e-4798-87c2-58c1d092e346/

https://artifacts.dev.testing-farm.io/8b1bb6af-012e-4798-87c2-58c1d092e346/work-integrationf2bjxab0/plans/integration/execute/data/guest/default-0/tests/core/about-2/data/List-plugins-as-YAML/output.txt

:: [ 14:03:50 ] :: [   FAIL   ] :: Command 'yq '. | to_entries | [.[] | "\(.key): \(.value | sort | join(\" \"))"] | sort | .[]' /var/tmp/rlRun_LOG.laN6NHNJ > /tmp/tmp.O9vCfgKQ11/actual-plugin-list.txt' (Expected 0, got 3)
:: [ 14:03:50 ] :: [   FAIL   ] :: Command 'diff -u /tmp/tmp.O9vCfgKQ11/expected-plugin-list.txt /tmp/tmp.O9vCfgKQ11/actual-plugin-list.txt' (Expected 0, got 1)

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