[kata-dev] Up for a challenge? Unit testing y'all!

Hunt, James O james.o.hunt at intel.com
Fri Jun 5 16:54:29 UTC 2020


Hi All,

- Want to learn more about the internals of Kata but don't know where to
start?
- Are you keen to contribute to Kata?
- Can you code in golang or rust?

If you answer yes to those questions, read on...! ;)

# Summary

We're looking to increase the unit test coverage for the development
versions of the Kata 2.0 [1]. Specifically, we want to increase coverage
levels for the following Kata 2.0 components:

- runtime (written in golang) [2]
- the new agent (written in rust) [3]

The unit test coverage levels have slipped for the runtime and the new
agent is so new it still lacks tests in certain areas.

This is an important activity as you have the chance to find (and
potentially fix!) bugs before they are unleashed into the wild.

# Details

There is a top-level issue for each component (runtime [4], agent [5]).

Each of those top-level issues has a number of related issues that breaks
the work down into smaller chunks (there is an issue per directory/module,
or even per file in some cases).

# Tracking

I've added all those task issues into the Kata 2.0 GitHub project [6].

# Get involved

If you'd like to be involved, please let us know by adding a comment to [4]
or [5] and we can help you find an interesting area to work on with us.
Conversely, please don't start writing tests without telling us to avoid
disappointment when we discover multiple people are writing the same set of
tests!

# Advice

You should definitely read [7] first and you may find [8] and [9] helpful
(the latter for golang tests).

Before writing any new tests, please look at the existing tests for
inspiration. Note also that some tests must run as root, whereas others
must run as a non-privileged user. It's important to always consider which
users your tests should run as (and we have infrastructure to ensure the
tests DTRT).

# Team effort

If you want to volunteer to write some tests for a particular area and are
happy to do that on your own, great! However, please don't think this is
expected - if you volunteer, we're more than happy to help you out -
remember that GitHub issues can be assigned to multiple users :-)

Cheers,

James

[1] - Although we're focussing on 2.0, these new tests will also be
backported where possible.
[2] -
https://github.com/kata-containers/kata-containers/tree/2.0-dev/src/runtime
[3] -
https://github.com/kata-containers/kata-containers/tree/2.0-dev/src/agent
[4] - https://github.com/kata-containers/kata-containers/issues/237
[5] - https://github.com/kata-containers/kata-containers/issues/275
[6] - https://github.com/kata-containers/kata-containers/projects/2
[7] -
https://github.com/kata-containers/community/blob/master/CONTRIBUTING.md
[8] -
https://github.com/kata-containers/tests/blob/master/Unit-Test-Advice.md
[9] -
https://github.com/kata-containers/kata-containers/tree/2.0-dev/src/runtime/pkg/katatestutils

---
https://katacontainers.io/ | https://github.com/kata-containers
<https://github.com/clearcontainers>
Open Source Technology Center
Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3
1RJ.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.katacontainers.io/pipermail/kata-dev/attachments/20200605/5a3fc58c/attachment.html>


More information about the kata-dev mailing list