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

kola run-ext: Add support for running an externally defined test #1159

Closed
cgwalters opened this issue Feb 10, 2020 · 3 comments
Closed

kola run-ext: Add support for running an externally defined test #1159

cgwalters opened this issue Feb 10, 2020 · 3 comments

Comments

@cgwalters
Copy link
Member

I'd like to propose something like:

$ kola run-ext-script /path/to/binary

Takes a single binary at /path/to/binary, injects it and a generated basic systemd unit kola-test-ext-$(basename binary).service that runs it.
kola connects via ssh and runs systemctl --wait is-active (does that work? if not find another command).

When the service exits successfully the test is considered successful. When it exits with an EXITCODE error, the test has failed. If it exits from SIGTERM, then we assume the host is rebooting and continue waiting.

Then we support a much bigger generalization of this,

kola run-ext /path/to/dir

which injects a full directory for dependencies, and which would have at least a kola-test.service unit, and maybe we support a container image?

This would allow us to more easily adapt e.g. the ostree test suite to run inside kola. So in ostree's upstream CI we could use that. And importantly the reverse works - run the ostree tests downstream too, i.e. reverse dependency testing. e.g. in FCOS pipeline, when the kernel/systemd change, run ostree's tests.

@arithx
Copy link
Contributor

arithx commented Feb 10, 2020

The proposal sounds like it has a lot of overlap to what we're already doing with kolet so it should be relatively straightforward to implement.

One idea is to also allow some specification of the binaries and whether or not the tests are entirely self-contained to allow for re-use of the same machine which could be valuable when running on non-qemu platforms.

@cgwalters
Copy link
Member Author

Another idea here is:

kola run-ext-container quay.io/coreos/ostree-tests:latest

We could define a simple schema for "test containers" - perhaps two cases:

  • run unprivileged with the host filesystem mounted readonly at /host, can run multiple in parallel/sequence
  • run privileged, assumed to be destructive and only one run per VM

@cgwalters cgwalters transferred this issue from coreos/mantle Feb 27, 2020
cgwalters added a commit to cgwalters/coreos-assembler that referenced this issue Mar 5, 2020
Related: coreos#1159

I want to start converting some of the ostree/rpm-ostree
tests to using kola more "natively".  This is part of that; the
`run-ext-bin` command injects a single binary into the target
system, driving it via a systemd unit to completion.

There are further elaborations of this, including injecting
a full container, etc.  (That is cheap in the local qemu
case particularly once we have virtio-fs)
cgwalters added a commit to cgwalters/coreos-assembler that referenced this issue Mar 11, 2020
Related: coreos#1159

I want to start converting some of the ostree/rpm-ostree
tests to using kola more "natively".  This is part of that; the
`run-ext-bin` command injects a single binary into the target
system, driving it via a systemd unit to completion.

There are further elaborations of this, including injecting
a full container, etc.  (That is cheap in the local qemu
case particularly once we have virtio-fs)
cgwalters added a commit to cgwalters/coreos-assembler that referenced this issue Mar 11, 2020
Related: coreos#1159

I want to start converting some of the ostree/rpm-ostree
tests to using kola more "natively".  This is part of that; the
`run-ext-bin` command injects a single binary into the target
system, driving it via a systemd unit to completion.

There are further elaborations of this, including injecting
a full container, etc.  (That is cheap in the local qemu
case particularly once we have virtio-fs)
cgwalters added a commit to cgwalters/coreos-assembler that referenced this issue Mar 11, 2020
Related: coreos#1159

I want to start converting some of the ostree/rpm-ostree
tests to using kola more "natively".  This is part of that; the
`run-ext-bin` command injects a single binary into the target
system, driving it via a systemd unit to completion.

There are further elaborations of this, including injecting
a full container, etc.  (That is cheap in the local qemu
case particularly once we have virtio-fs)
cgwalters added a commit to cgwalters/coreos-assembler that referenced this issue Mar 12, 2020
Related: coreos#1159

I want to start converting some of the ostree/rpm-ostree
tests to using kola more "natively".  This is part of that; the
`run-ext-bin` command injects a single binary into the target
system, driving it via a systemd unit to completion.

There are further elaborations of this, including injecting
a full container, etc.  (That is cheap in the local qemu
case particularly once we have virtio-fs)
openshift-merge-robot pushed a commit that referenced this issue Mar 14, 2020
Related: #1159

I want to start converting some of the ostree/rpm-ostree
tests to using kola more "natively".  This is part of that; the
`run-ext-bin` command injects a single binary into the target
system, driving it via a systemd unit to completion.

There are further elaborations of this, including injecting
a full container, etc.  (That is cheap in the local qemu
case particularly once we have virtio-fs)
jcajka pushed a commit to jcajka/coreos-assembler that referenced this issue Mar 24, 2020
@cgwalters
Copy link
Member Author

This exists now.

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

No branches or pull requests

2 participants