-
Notifications
You must be signed in to change notification settings - Fork 158
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
tests: add distro tags to FCOS only tests #1322
Conversation
This removes the individually symlinked tests in favor of a symlink to the entire FCOS external tests directory. With the external tests properly categorized with the `distros` tag, only tests that are applicable to both FCOS + RHCOS should run from the `shared` directory. Requires: coreos/fedora-coreos-config#1322
This removes the individually symlinked tests in favor of a symlink to the entire FCOS external tests directory. With the external tests properly categorized with the `distros` tag, only tests that are applicable to both FCOS + RHCOS should run from the `shared` directory. Requires: coreos/fedora-coreos-config#1322
This removes the individually symlinked tests in favor of a symlink to the entire FCOS external tests directory. With the external tests properly categorized with the `distros` tag, only tests that are applicable to both FCOS + RHCOS should run from the `shared` directory. Requires: coreos/fedora-coreos-config#1322
Looks good to me |
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.
Thanks for doing this work @miabbott.
A few suggestions.. Mostly LGTM, but I'd like to advocate for adding reasons why tests only apply to FCOS even if it's blatantly obvious. I really do feel that stating the obvious is a good thing sometimes especially when new people stumble onto the code and might not know the history.
Great suggestion, Dusty! I'll work that into the next revision. |
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.
I second Dusty's idea of adding a short description of why is test is limited to FCOS. Besides that changes look good overall!
d3b751f
to
dfde190
Compare
@@ -13,7 +13,8 @@ | |||
|
|||
# Only run on QEMU to reduce CI costs as nothing is platform specific here. | |||
# Toolbox container is currently available only for x86_64 and aarch64 in Fedora | |||
# kola: { "tags": "needs-internet", "platforms": "qemu-unpriv", "architectures": "x86_64 aarch64" } | |||
# This test only runs on FCOS because RHCOS is missing the `machinectl` command. |
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.
I think this might be able to be improved. While technically accurate that RHCOS might be missing the machinectl
command I think there are other reasons that we would only want this test to run on FCOS. i.e. I imagine the default container they pull should be different and the test we want to validate is probably different. So we'd either need to adapt the test to work on both or just state that this test is targeted at FCOS and we should create a RHCOS specific toolbox test in the future.
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.
Side note: remember soon "RHCOS" will be ambiguous. It'd be more accurate to say "RHCOS8" for example, because perhaps we do choose to pull in machinectl
in RHCOS9.
This is actually another reason why longer term these distro tags are going to be less sustainable than doing e.g. feature detection. IOW skipping the test if machinectl
doesn't exist.
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.
I think the current practice is probably most efficient. Basically what we have been doing typically is using feature detection if it's easy. Sometimes this is easily done by querying a program other times not. Sometimes it can also be done by querying a version of a particular software (i.e. systemd
or NetworkManager
). Other times it's not so easy and kind of complex. In those cases I think we should basically switch off RHCOS/FCOS
and then do "version detection" (i.e. F34, F35, RHEL 8.X, RHEL 9.X) within the embedded logic.
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.
LGTM - I just had one suggestion for improvement, but that's optional.
dfde190
to
c8b9364
Compare
Are we planning to hold this until #1325? Otherwise I think this will need an additional pass for all the tests split out of misc-ro. |
c8b9364
to
21643de
Compare
Rebased after #1325 landed, but now I see #1337, so might be another rebase in my future. I tweaked three tests as separate commits to make them work seamlessly across FCOS/RHCOS. (@dustymabe interested in any feedback re: the networking test I changed) There are other tests in there that could be modified for the same outcome, but require a little more investigation. |
21643de
to
7fa7a5d
Compare
Rebased again on top of #1337. Added additional comments (grep for |
Thank you so much for working on this @miabbott! |
7fa7a5d
to
a798715
Compare
Rebased one more time and dropped the commit to change the network test that was covered by #1339 |
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.
LGTM - one spelling fix suggestion
tests/kola/containers/cgroups-v2
Outdated
@@ -1,5 +1,8 @@ | |||
#!/bin/bash | |||
# kola: { "exclusive": false } | |||
# This test only runs on FCOS because RHCOS does not currently support cgroupsv2 | |||
# by defaulr. |
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.
# by defaulr. | |
# by default. |
Hurry up and merge before anything else lands! |
This is a first pass at categorizing the existing external tests using the `distros` tag to indicate that the tests are only supported on FCOS. This should allow better sharing of tests with RHCOS. Note: some of these tests may be able to be adapted for RHCOS; will investigate in a follow-up PR. See: openshift/os#661 See: coreos/coreos-assembler#2521
Omitting the "." from the `jq` expression on RHCOS causes the command to fail. By including the ".", the test can run on FCOS + RHCOS.
The version of `find` on RHCOS does not accept a comma-separated list of file types to the `-type` argument. Splitting it into multiple args should allow the test to work with FCOS/RHCOS.
a798715
to
06bcd7d
Compare
This removes the individually symlinked tests in favor of a symlink to the entire FCOS external tests directory. With the external tests properly categorized with the `distros` tag, only tests that are applicable to both FCOS + RHCOS should run from the `shared` directory. Requires: coreos/fedora-coreos-config#1322
The version of `systemd-udev` on RHCOS does not include the `systemd-repart` service. Missed this test as part of coreos#1322.
The version of `systemd-udev` on RHCOS does not include the `systemd-repart` service. Missed this test as part of coreos#1322.
The version of `systemd-udev` on RHCOS does not include the `systemd-repart` service. Missed this test as part of #1322.
This removes the individually symlinked tests in favor of a symlink to the entire FCOS external tests directory. With the external tests properly categorized with the `distros` tag, only tests that are applicable to both FCOS + RHCOS should run from the `shared` directory. Requires: coreos/fedora-coreos-config#1322
With the work related to coreos/fedora-coreos-config#1322, we can now share the external tests from FCOS more sanely with RHCOS. This introduces a 'shared' directory under `tests/kola` that symlinks to the FOCS external tests. Those external tests are currently categorized to run only on the supported distros, so including the whole directory is safe to do.
With the work related to coreos/fedora-coreos-config#1322, we can now share the external tests from FCOS more sanely with RHCOS. This introduces a 'shared' directory under `tests/kola` that symlinks to the FOCS external tests. Those external tests are currently categorized to run only on the supported distros, so including the whole directory is safe to do. Additionally, any duplicated tests have been removed from this directory; we should default to writing tests that support both FCOS/RHCOS and only stray from that default when absolutely necessary.
With the work related to coreos/fedora-coreos-config#1322, we can now share the external tests from FCOS more sanely with RHCOS. This introduces a 'shared' directory under `tests/kola` that symlinks to the FOCS external tests. Those external tests are currently categorized to run only on the supported distros, so including the whole directory is safe to do. Additionally, any duplicated tests have been removed from this directory; we should default to writing tests that support both FCOS/RHCOS and only stray from that default when absolutely necessary.
With the work related to coreos/fedora-coreos-config#1322, we can now share the external tests from FCOS more sanely with RHCOS. This introduces a 'shared' directory under `tests/kola` that symlinks to the FOCS external tests. Those external tests are currently categorized to run only on the supported distros, so including the whole directory is safe to do. Additionally, any duplicated tests have been removed from this directory; we should default to writing tests that support both FCOS/RHCOS and only stray from that default when absolutely necessary.
The version of `systemd-udev` on RHCOS does not include the `systemd-repart` service. Missed this test as part of coreos#1322.
The version of `systemd-udev` on RHCOS does not include the `systemd-repart` service. Missed this test as part of coreos#1322.
This is a first pass at categorizing the existing external tests using
the
distros
tag to indicate that the tests are only supported onFCOS. This should allow better sharing of tests with RHCOS.
Note: some of these tests may be able to be adapted for RHCOS; will
investigate in a follow-up PR.
See: openshift/os#661
See: coreos/coreos-assembler#2521