qemu-e2k/softmmu
Peter Maydell 537a1388e6 qtest: Don't assert on "-qtest chardev:myid"
If the -qtest command line argument is passed a string that says
"use this chardev for I/O", then it will assert:

$ ./build/clang/qemu-system-i386 -chardev file,path=/dev/null,id=myid -qtest chardev:myid
Unexpected error in qtest_set_chardev() at ../../softmmu/qtest.c:1011:
qemu-system-i386: Cannot find character device 'qtest'
Aborted (core dumped)

This is because in qtest_server_init() we assume that when we create
the chardev with qemu_chr_new() it will always have the name "qtest".
This is true if qemu_chr_new() had to create a new chardev, but not
true if one already existed and is being referred to with
"chardev:myid".

Use the name of the chardev we get back from qemu_chr_new() as the
string to set the qtest 'chardev' property to, instead of hardcoding
it to "qtest".

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20230413150724.404304-2-peter.maydell@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-04-20 06:50:11 +02:00
..
arch_init.c
balloon.c
bootdevice.c
cpu-throttle.c
cpu-timers.c
cpus.c include/block: Untangle inclusion loops 2023-01-20 07:24:28 +01:00
datadir.c
device_tree.c device-tree: add re-randomization helper function 2022-10-27 11:34:31 +01:00
dirtylimit.c Drop duplicate #include 2023-02-08 07:28:05 +01:00
dma-helpers.c dma-helpers: prevent dma_blk_cb() vs dma_aio_cancel() race 2023-02-23 19:49:35 +01:00
globals.c hw/xen: Add xenstore operations to allow redirection to internal emulation 2023-03-07 17:04:30 +00:00
icount.c
ioport.c
main.c
memory_mapping.c bulk: Rename TARGET_FMT_plx -> HWADDR_FMT_plx 2023-01-18 11:14:34 +01:00
memory.c Revert "memory: Optimize replay of guest mapping" 2023-04-05 13:31:52 +01:00
meson.build softmmu: Restore use of CPU watchpoint for all accelerators 2023-03-28 15:24:06 -07:00
physmem.c accel/tcg: Pass last not end to tb_invalidate_phys_range 2023-03-28 15:23:10 -07:00
qdev-monitor.c qdev: Move HMP command completion from monitor to softmmu/ 2023-02-04 07:56:54 +01:00
qemu-seccomp.c
qtest.c qtest: Don't assert on "-qtest chardev:myid" 2023-04-20 06:50:11 +02:00
rtc.c replay: Simplify setting replay blockers 2023-02-23 14:10:17 +01:00
runstate-action.c
runstate-hmp-cmds.c runstate: Move HMP commands from monitor/ to softmmu/ 2023-02-04 07:56:54 +01:00
runstate.c gdbstub: move syscall handling to new file 2023-03-07 20:44:08 +00:00
timers-state.h
tpm-hmp-cmds.c tpm: Move HMP commands from monitor/ to softmmu/ 2023-02-04 07:56:54 +01:00
tpm.c
trace-events
trace.h
vl.c vl: defuse PID file path resolve error 2023-03-15 11:52:25 +01:00
watchpoint.c softmmu: Restore use of CPU watchpoint for all accelerators 2023-03-28 15:24:06 -07:00