Skip to content

Commit

Permalink
topology2qemuopts: fix single node topology output.
Browse files Browse the repository at this point in the history
Omit generating extra memory parameters altogether when
we are generating topology for a single node VM.

Signed-off-by: Krisztian Litkey <[email protected]>
  • Loading branch information
klihub authored and askervin committed Mar 6, 2025
1 parent 312d72c commit 74c95ab
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions test/e2e/lib/topology2qemuopts.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,26 +360,34 @@ def qemuopts(numalist):
raise ValueError("no initial memory in any NUMA node - cannot boot with hotpluggable memory")

if separated_output_vars == True:
extras = "EXTRA:"
if nodecount > 1:
extras = (extras + ", ".join(map(lambda x: "\"" + x + "\"", numaparams)) +
" " +
", ".join(map(lambda x: "\"" + x + "\"", deviceparams)) +
"," +
", ".join(map(lambda x: "\"" + x + "\"", objectparams)) + "|"
)

return ("MACHINE:" + machineparam + "|" +
"CPU:" + cpuparam + "|" +
"MEM:" + memparam + "|" +
"EXTRA:" +
", ".join(map(lambda x: "\"" + x + "\"", numaparams)) +
" " +
", ".join(map(lambda x: "\"" + x + "\"", deviceparams)) +
"," +
", ".join(map(lambda x: "\"" + x + "\"", objectparams)) + "|"
extras
)
else:
return (machineparam + " " +
cpuparam + " " +
memparam + " " +
extras = ""
if nodecount > 1:
extras = (" " + memparam + " " +
" ".join(numaparams) +
" " +
" ".join(deviceparams) +
" " +
" ".join(objectparams)
)
return (machineparam + " " +
cpuparam +
extras
)

def main(input_file):
try:
Expand Down

0 comments on commit 74c95ab

Please sign in to comment.