Skip to content

Commit

Permalink
WIP: document tests
Browse files Browse the repository at this point in the history
Start a document for summerizing the complex tests with  and  configuration

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
  • Loading branch information
Tal-or committed May 10, 2022
1 parent 38d5953 commit 5ab8f21
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions pkg/noderesourcetopology/TESTS.md
@@ -0,0 +1,69 @@
## NodeResourceTopologyMatch Tests

The NodeResourceTopologyMatch plugins involves with different Topology Manager configurations.

This differences leads to changing in the plugins behavior and needs to be tested in comprehensive way.

The most complicated and common case for these plugins is when ```TopologyManagerPolicy=single-numa-node``` and ```TopologyMangerPolicy=container```.

Since this specific configuration has so many edge cases and permutations, we decided to summarize all of them in a table below.
This will help us track the coverage and made sure the plugins are fully tested.

### Table guidelines:
- All pods are ```Guaranteed``` QoS pods, IOW all containers are asking for an equal ```request``` and ```limit``` values.
- The table describes the coverage of the ```TopologyManagerPolicy=single-numa-node``` and ```TopologyMangerPolicy=container``` configuration. ```TopologyMangerScope=pod``` is basically the same case as ```TopologyMangerPolicy=container``` but with a single container.

#### <a>Test types</a>:
- Each test type can be tested with various resources types. For example a test that check for overallocation, can be tested with CPUs overallocation or Memory overallocation or both.

#### Table legend:
- R = Requested resources by the container
- NUMA = Resources available under a NUMA.
- R [<,=,>] NUMA = The requested resources by the container is (less/equal/more) than the resources available under the NUMA.
- R [<,=,>] Node = The requested resources by the container is (less/equal/more) than the resources available under the Node.
- SUM(R) = accumulate the resources of all containers
- Node = Resources available under the whole node.
- N = Any number of containers
- NVM = What ever value in the field, it won't affect the test result (a placeholder for any possible value).


| test type | init containers | requests | containers | requests | state |
|:----------|-----------------|----------------------------------|------------|----------------------------------|---------|
| 1 | 0 | N/A | 1 | R < NUMA | Running |
| 2 | 0 | N/A | 1 | NUMA < R < Node | Pending |
| 3 | 0 | N/A | N > 1 | R < NUMA | Running |
| 4 | 0 | N/A | N > 1 | NUMA < SUM(R) < Node && R < NUMA | Running |
| 5 | 0 | N/A | N > 1 | SUM(R) > Node && R < NUMA | Pending |
| 6 | 0 | N/A | N > 1 | NUMA < R < Node | Pending |
| 7 | 1 | R < NUMA | 0 | N/A | Running |
| 8 | 1 | NUMA < R < Node | NVM | NVM | Pending |
| 9 | 1 | R < NUMA | 1 | R < NUMA | Running |
| 10 | 1 | R < NUMA | 1 | NUMA < R < Node | Pending |
| 11 | 1 | R < NUMA | N > 1 | R < NUMA | Running |
| 12 | 1 | R < NUMA | N > 1 | NUMA < SUM(R) < Node && R < NUMA | Running |
| 13 | 1 | R < NUMA | N > 1 | SUM(R) > Node && R < NUMA | Pending |
| 14 | 1 | R < NUMA | N > 1 | NUMA < R < Node | Pending |
| 15 | N > 1 | R < NUMA | 1 | R < NUMA | Running |
| 16 | N > 1 | R < NUMA | 1 | NUMA < R < Node | Pending |
| 17 | N > 1 | R < NUMA | N > 1 | R < NUMA | Running |
| 18 | N > 1 | R < NUMA | N > 1 | NUMA < SUM(R) < Node && R < NUMA | Running |
| 19 | N > 1 | R < NUMA | N > 1 | SUM(R) > Node && R < NUMA | Pending |
| 20 | N > 1 | R < NUMA | N > 1 | NUMA < R < Node | Pending |
| 21 | N > 1 | NUMA < SUM(R) < Node && R < NUMA | 1 | R < NUMA | Running |
| 22 | N > 1 | NUMA < SUM(R) < Node && R < NUMA | 1 | NUMA < R < Node | Pending |
| 23 | N > 1 | NUMA < SUM(R) < Node && R < NUMA | N > 1 | R < NUMA | Pending |
| 24 | N > 1 | NUMA < SUM(R) < Node && R < NUMA | N > 1 | NUMA < SUM(R) < Node && R < NUMA | Running |
| 25 | N > 1 | NUMA < SUM(R) < Node && R < NUMA | N > 1 | SUM(R) > Node && R < NUMA | Pending |
| 26 | N > 1 | NUMA < SUM(R) < Node && R < NUMA | N > 1 | NUMA < R < Node | Pending |
| 27 | N > 1 | SUM(R) > Node && R < NUMA | 1 | R < NUMA | Running |
| 28 | N > 1 | SUM(R) > Node && R < NUMA | 1 | NUMA < R < Node | Pending |
| 29 | N > 1 | SUM(R) > Node && R < NUMA | N > 1 | R < NUMA | Running |
| 30 | N > 1 | SUM(R) > Node && R < NUMA | N > 1 | NUMA < SUM(R) < Node && R < NUMA | Running |
| 32 | N > 1 | SUM(R) > Node && R < NUMA | N > 1 | SUM(R) > Node && R < NUMA | Pending |
| 33 | N > 1 | SUM(R) > Node && R < NUMA | N > 1 | NUMA < R < Node | Pending |
| 34 | N > 1 | NUMA < R < Node | NVM | NVM | Pending |

### Test Tiers
#### Tier1

#### Tier2

0 comments on commit 5ab8f21

Please sign in to comment.