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

Doc: Update the unit test section for privileged tests #11433

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 23 additions & 0 deletions Documentation/contributing/testing/unit.rst
Expand Up @@ -63,6 +63,29 @@ run the unit tests and tear down the prerequisites:

$ make unit-tests TESTPKGS=github.com/cilium/cilium/pkg/kvstore

Some packages have privileged tests. They are not run by default when you run
the unit tests for the respective package. The privileged test files have an
entry at the top of the test file as shown.

::

+build privileged_tests

There are two ways that you can run the 'privileged' tests.

1. To run all the 'privileged' tests for cilium follow the instructions below.

::

$ sudo -E make tests-privileged

2. To run a specific package 'privileged' test, follow the instructions below.
Here for example we are trying to run the tests for 'routing' package.

::

$ TESTPKGS="pkg/aws/eni/routing" sudo -E make tests-privileged

Running individual tests
^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down