Skip to content

Commit e68dcbb

Browse files
berrangephilmd
authored andcommitted
tests: add testing of parameter=1 for SMP topology
Validate that it is possible to pass 'parameter=1' for any SMP topology parameter, since unsupported parameters are implicitly considered to always have a value of 1. Signed-off-by: Daniel P. Berrangé <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Reviewed-by: Ján Tomko <[email protected]> Message-ID: <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
1 parent 9d7950e commit e68dcbb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/unit/test-smp-parse.c

+8
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,14 @@ static const struct SMPTestData data_generic_valid[] = {
330330
.config = SMP_CONFIG_GENERIC(T, 8, T, 2, T, 4, T, 2, T, 16),
331331
.expect_prefer_sockets = CPU_TOPOLOGY_GENERIC(8, 2, 4, 2, 16),
332332
.expect_prefer_cores = CPU_TOPOLOGY_GENERIC(8, 2, 4, 2, 16),
333+
}, {
334+
/*
335+
* Unsupported parameters are always allowed to be set to '1'
336+
* config: -smp 8,books=1,drawers=1,sockets=2,modules=1,dies=1,cores=2,threads=2,maxcpus=8
337+
* expect: cpus=8,sockets=2,cores=2,threads=2,maxcpus=8 */
338+
.config = SMP_CONFIG_WITH_FULL_TOPO(8, 1, 1, 2, 1, 1, 2, 2, 8),
339+
.expect_prefer_sockets = CPU_TOPOLOGY_GENERIC(8, 2, 2, 2, 8),
340+
.expect_prefer_cores = CPU_TOPOLOGY_GENERIC(8, 2, 2, 2, 8),
333341
},
334342
};
335343

0 commit comments

Comments
 (0)