libvirt/tests/libxlxml2domconfigdata/single-serial.json
Rayhan Faizel cb2a6ef8b5 libxl_conf: Fix config generation for multiple serial devices
Currently, an array of libxl_string_list (char **) or in other words,
a triple char pointer is initialized. This is dereferenced to a char ** type
and stored in serial_list, which is NULL at this point. There is an attempt to
reference an element of this serial_list when making a call to
libxlMakeChrdevStr which causes a segmentation fault.

To fix this, we simply allocate an array of char * instead of
libxl_string_list.

This patch also adds testcases to extend coverage over both single serial and
multiple serial cases.

Signed-off-by: Rayhan Faizel <rayhan.faizel@gmail.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2024-10-02 16:06:50 +02:00

53 lines
977 B
JSON

{
"c_info": {
"type": "hvm",
"name": "test-hvm",
"uuid": "2147d599-9cc6-c0dc-92ab-4064b5446e9b"
},
"b_info": {
"max_vcpus": 4,
"avail_vcpus": [
0,
1,
2,
3
],
"max_memkb": 1048576,
"target_memkb": 1048576,
"shadow_memkb": 1234,
"sched_params": {
},
"acpi": "True",
"apic": "True",
"type.hvm": {
"pae": "True",
"nographic": "True",
"vga": {
"kind": "none"
},
"vnc": {
"enable": "False"
},
"sdl": {
"enable": "False"
},
"spice": {
},
"serial": "pty",
"boot": "c",
"rdm": {
}
},
"arch_arm": {
},
"arch_x86": {
}
},
"on_reboot": "restart"
}