Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
5fcf63f
e2e: add lib/test.bash test helper library.
klihub Aug 27, 2026
90e3dc7
e2e: add pod and namespace cleanup helpers, use them in the tests.
klihub Aug 27, 2026
e368de2
e2e: add expect-launch-failure helper.
klihub Aug 26, 2026
aa71a92
e2e: add wait-pod-gone helper.
klihub Aug 26, 2026
00a477a
e2e: add container state and creation error helpers.
klihub Aug 26, 2026
e2ab3fe
e2e: add plugin log retrieval helpers.
klihub Aug 26, 2026
0add141
e2e: add plugin log assertion helpers.
klihub Aug 26, 2026
e0e1e99
e2e: add node extended resource helpers.
klihub Aug 26, 2026
886d917
e2e: add CPU list arithmetic helpers.
klihub Aug 26, 2026
442a4c2
e2e: add container cpuset lookup helpers.
klihub Aug 26, 2026
90f9bbd
e2e: add interrupt affinity test helpers.
klihub Aug 26, 2026
746e543
e2e: add scheduling class verification helper.
klihub Aug 26, 2026
7ffa8cc
e2e: add policy configuration status helpers.
klihub Aug 26, 2026
28956cc
e2e: add helm-reconfigure and patch-policy-config.
klihub Aug 26, 2026
bf6c7c9
e2e: add CLOS and CPU frequency assertion helpers.
klihub Aug 26, 2026
a6a07d7
e2e: add node reboot, kernel command line and NUMA helpers.
klihub Aug 26, 2026
501b706
e2e: move the node resource topology helpers to the shared library.
klihub Aug 26, 2026
6ddcbdb
e2e: move the metrics helpers to the shared library.
klihub Aug 26, 2026
9a15867
e2e: fix pod names in test07-maxballoons error messages.
klihub Aug 26, 2026
711e3d4
e2e: add relaunch-policy helper.
klihub Aug 26, 2026
bf3d247
e2e: document the shared test helpers.
klihub Aug 26, 2026
23e3318
e2e: drop the unused cleanup function of test17-cstates-scheduling.
klihub Aug 26, 2026
e2e18d3
e2e: use the cleanup helpers in the n6-hbm-cxl tests.
klihub Aug 26, 2026
41ef1f3
e2e: use the shared NRT helpers in the n6-hbm-cxl tests.
klihub Aug 26, 2026
9101468
e2e: distil the memory type verifications of the n6-hbm-cxl tests.
klihub Aug 26, 2026
2c2b5a3
e2e: add CPU hot-plug helpers.
klihub Aug 26, 2026
40c4ff0
e2e: add kernel version and kubepods cpuset check helpers.
klihub Aug 26, 2026
4213501
e2e: use the existing shared helpers in the s8c4k tests.
klihub Aug 26, 2026
2a68a99
e2e: use the shared helpers in the n4c128 test.
klihub Aug 26, 2026
03111b3
e2e: distil the repeated loops of the n4c128 test.
klihub Aug 26, 2026
a3c525a
e2e: stop deleting namespaces the n4c128 test never creates.
klihub Aug 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions test/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,41 @@ Before running E2E tests ensure that you have all the required components locall
policies.test-suite balloons test09-isolated : PASS
policies.test-suite balloons test10-health-checking : PASS
```

## Writing tests

A test case is a `code.var.sh` file in a
`TEST-SUITE/POLICY/TOPOLOGY/TEST/` directory. In addition to the script API of
`run.sh` (run `./run.sh help` to list it), test cases have shared helpers
available:

- `lib/test.bash` contains helpers that are useful for more than one test case:

| group | helpers |
| --- | --- |
| waiting | `retry-until` |
| pods and containers | `container-state`, `wait-container-waiting-reason`, `verify-container-error`, `wait-pod-gone` |
| launching the plugin | `relaunch-policy`, `expect-launch-failure` |
| cleaning up | `delete-pods`, `create-namespaces`, `delete-namespaces`, `remove-policy-cache`, `kill-test-processes` |
| log of the plugin | `plugin-daemonset`, `plugin-log`, `plugin-log-tail`, `assert-log-contains`, `assert-log-not-contains`, `wait-assert-log-contains`, `wait-assert-log-grew`, `assert-cpu-clos`, `assert-cpu-freq` |
| metrics | `verify-metrics-has-line`, `verify-metrics-has-no-line` |
| node resource topology | `nrt-query`, `nrt-dump`, `nrt-verify-zone-attribute`, `nrt-verify-zone-resource` |
| node state | `require-kernel-version`, `verify-kubepods-cpus`, `clear-isolcpus`, `disable-numa`, `enable-numa` |
| CPU lists | `expand-cpulist`, `cpulist-difference`, `container-cpus`, `allowed-cpu-ids` |
| extended resources | `get-node-resource`, `wait-node-resource` |
| interrupts | `resolve-irq`, `irq-cpu-ids`, `verify-irq-cpus` |
| scheduling | `verify-sched`, `SCHED_*` |

Some of them are configured by variables a test case can set, notably
`plugin_log_filter`, which restricts the log assertions to the log lines of
the subsystem under test.

Add a helper here once a second test case needs it. Run `./run.sh help` for
the documentation of each of them.

- `TEST-SUITE/POLICY/*.source.sh` files contain policy-specific helpers.

`*.source.sh` files are sourced before the test case code, starting from the
test suite directory and ending in the test case directory, `lib/test.bash`
being the first one. Therefore a test case, or all test cases of a policy or a
topology, can override any shared helper simply by redefining it.
Loading
Loading