* Some small qtest fixes

* One documentation update
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAl+34jMRHHRodXRoQHJl
 ZGhhdC5jb20ACgkQLtnXdP5wLbWQ3g//Tm8qr8HVoCZ+8mSFLR3WBAyEqxMeAgSD
 rAtoYXto3UkAjnSyg5xUXO1TCNqMtDnP/T9dZ8sK1bFF3r43KDMeAIAmvvJcPUqf
 AOg4ud2Wc2ELsqldyIPAS/47lC9cWZC6UQuj5Ov/LIphm3+SdXNr065Vuae0t3Z5
 Y55K4GHP6mqtDzKqQidWb1kPgwktWZtvccPlbBJ+ZL+BlxWCzTIIqsFHchXjN5Cc
 0xlEwIE8w6aC59r+KkESLBw9UAGdmZSGEkQ11x8pe2LqdeulKRu9FOpbWpJU5rGH
 myb7Dt4nAYOtexGp5PZNC+5guIfSJHydKuXZdSu10QqRA/0q97nyDqQkZfVYdlc0
 ReFidIjDA0Af8l9vqdlUXDmUdjMXHI3VD+9Pdhft8UzAIRegGNrAEMLAM7tR901n
 DYCoHOosK7zQ4utzr0CBsCQ32g+IXn2nL+GGjjfAGpSd/tnu5wB5Pr2GcePOqzci
 DjS5/t4fuiJb/w43PUt+JMOkfx2NRSn8yk8AATeBSRJ6sSQAWDYwq/C0tIqyGOCw
 BdBnYTnX+FhhO0jcrHsq07UsLBGADmWgYwni2txvf9cXMSmVRCgun9Yk2FOrmDBq
 RE7R5fs4KjNhLb62H/TT4xeT7P8yN1s82n3koTEHn2qsr/R0DRljxtK0u+XVSckE
 F/XnaGTZhRs=
 =1VEG
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2020-11-20' into staging

* Some small qtest fixes
* One documentation update

# gpg: Signature made Fri 20 Nov 2020 15:35:15 GMT
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* remotes/huth-gitlab/tags/pull-request-2020-11-20:
  qtest: do not return freed argument vector from qtest_rsp
  tests/qtest: fix memleak in npcm7xx_watchdog_timer-test
  tests/qtest: variable defined by g_autofree need to be initialized
  docs: Get rid of the weird _005f links in the man page

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2020-11-20 17:19:33 +00:00
commit 7761e07c3f
10 changed files with 36 additions and 33 deletions

View File

@ -1,4 +1,4 @@
.. _gdb_005fusage:
.. _GDB usage:
GDB usage
---------

View File

@ -1,4 +1,4 @@
.. _disk_005fimages:
.. _disk images:
Disk Images
-----------

View File

@ -1,4 +1,4 @@
.. _pcsys_005fmonitor:
.. _QEMU monitor:
QEMU Monitor
------------

View File

@ -1,4 +1,4 @@
.. _mux_005fkeys:
.. _keys in the character backend multiplexer:
Keys in the character backend multiplexer
-----------------------------------------

View File

@ -8,7 +8,7 @@ plug virtual USB devices or real host USB devices (only works with
certain host operating systems). QEMU will automatically create and
connect virtual USB hubs as necessary to connect multiple USB devices.
.. _usb_005fdevices:
.. _Connecting USB devices:
Connecting USB devices
~~~~~~~~~~~~~~~~~~~~~~
@ -27,8 +27,8 @@ option or the ``device_add`` monitor command. Available devices are:
activated.
``usb-storage,drive=drive_id``
Mass storage device backed by drive_id (see
:ref:`disk_005fimages`)
Mass storage device backed by drive_id (see the :ref:`disk images`
chapter in the System Emulation Users Guide)
``usb-uas``
USB attached SCSI device, see

View File

@ -1,4 +1,4 @@
.. _vnc_005fsecurity:
.. _VNC security:
VNC security
------------

View File

@ -913,8 +913,8 @@ SRST
``-fda file``
\
``-fdb file``
Use file as floppy disk 0/1 image (see
:ref:`disk_005fimages`).
Use file as floppy disk 0/1 image (see the :ref:`disk images` chapter in
the System Emulation Users Guide).
ERST
DEF("hda", HAS_ARG, QEMU_OPTION_hda,
@ -931,8 +931,8 @@ SRST
``-hdc file``
\
``-hdd file``
Use file as hard disk 0, 1, 2 or 3 image (see
:ref:`disk_005fimages`).
Use file as hard disk 0, 1, 2 or 3 image (see the :ref:`disk images`
chapter in the System Emulation Users Guide).
ERST
DEF("cdrom", HAS_ARG, QEMU_OPTION_cdrom,
@ -1189,9 +1189,9 @@ SRST
In addition, it knows the following options:
``file=file``
This option defines which disk image (see
:ref:`disk_005fimages`) to use with this drive. If
the filename contains comma, you must double it (for instance,
This option defines which disk image (see the :ref:`disk images`
chapter in the System Emulation Users Guide) to use with this drive.
If the filename contains comma, you must double it (for instance,
"file=my,,file" to use file "my,file").
Special files such as iSCSI devices can be specified using
@ -1400,8 +1400,8 @@ SRST
``-snapshot``
Write to temporary files instead of disk image files. In this case,
the raw disk image you use is not written back. You can however
force the write back by pressing C-a s (see
:ref:`disk_005fimages`).
force the write back by pressing C-a s (see the :ref:`disk images`
chapter in the System Emulation Users Guide).
ERST
DEF("fsdev", HAS_ARG, QEMU_OPTION_fsdev,
@ -1687,8 +1687,8 @@ DEF("usbdevice", HAS_ARG, QEMU_OPTION_usbdevice,
SRST
``-usbdevice devname``
Add the USB device devname. Note that this option is deprecated,
please use ``-device usb-...`` instead. See
:ref:`usb_005fdevices`.
please use ``-device usb-...`` instead. See the chapter about
:ref:`Connecting USB devices` in the System Emulation Users Guide.
``mouse``
Virtual Mouse. This will override the PS/2 mouse emulation when
@ -2110,7 +2110,7 @@ SRST
connections.
The password must be set separately using the ``set_password``
command in the :ref:`pcsys_005fmonitor`. The
command in the :ref:`QEMU monitor`. The
syntax to change your password is:
``set_password <protocol> <password>`` where <protocol> could be
either "vnc" or "spice".
@ -2155,8 +2155,8 @@ SRST
and 'x509' settings to enable use of SSL and server
certificates. This ensures a data encryption preventing
compromise of authentication credentials. See the
:ref:`vnc_005fsecurity` section for details on
using SASL authentication.
:ref:`VNC security` section in the System Emulation Users Guide
for details on using SASL authentication.
``sasl-authz=ID``
Provides the ID of the QAuthZ authorization object against which
@ -3082,7 +3082,9 @@ The general form of a character device option is:
-serial chardev:char1
When you're using a multiplexed character device, some escape
sequences are interpreted in the input. See :ref:`mux_005fkeys`.
sequences are interpreted in the input. See the chapter about
:ref:`keys in the character backend multiplexer` in the
System Emulation Users Guide for more details.
Note that some other command line options may implicitly create
multiplexed character backends; for instance ``-serial mon:stdio``
@ -3755,8 +3757,8 @@ DEF("gdb", HAS_ARG, QEMU_OPTION_gdb, \
QEMU_ARCH_ALL)
SRST
``-gdb dev``
Accept a gdb connection on device dev (see
:ref:`gdb_005fusage`). Note that this option does not pause QEMU
Accept a gdb connection on device dev (see the :ref:`GDB usage` chapter
in the System Emulation Users Guide). Note that this option does not pause QEMU
execution -- if you want QEMU to not start the guest until you
connect with gdb and issue a ``continue`` command, you will need to
also pass the ``-S`` option to QEMU.
@ -3781,7 +3783,7 @@ DEF("s", 0, QEMU_OPTION_s, \
SRST
``-s``
Shorthand for -gdb tcp::1234, i.e. open a gdbserver on TCP port 1234
(see :ref:`gdb_005fusage`).
(see the :ref:`GDB usage` chapter in the System Emulation Users Guide).
ERST
DEF("d", HAS_ARG, QEMU_OPTION_d, \

View File

@ -545,6 +545,7 @@ redo:
}
} else {
g_strfreev(words);
words = NULL;
}
return words;

View File

@ -512,11 +512,9 @@ static void test_disable_on_expiration(gconstpointer test_data)
*/
static void tim_add_test(const char *name, const TestData *td, GTestDataFunc fn)
{
g_autofree char *full_name;
full_name = g_strdup_printf("npcm7xx_timer/tim[%d]/timer[%d]/%s",
tim_index(td->tim), timer_index(td->timer),
name);
g_autofree char *full_name = g_strdup_printf(
"npcm7xx_timer/tim[%d]/timer[%d]/%s", tim_index(td->tim),
timer_index(td->timer), name);
qtest_add_data_func(full_name, td, fn);
}

View File

@ -204,6 +204,7 @@ static void test_enabling_flags(gconstpointer watchdog)
{
const Watchdog *wd = watchdog;
QTestState *qts;
QDict *rsp;
/* Neither WTIE or WTRE is set, no interrupt or reset should happen */
qts = qtest_init("-machine quanta-gsj");
@ -240,8 +241,9 @@ static void test_enabling_flags(gconstpointer watchdog)
g_assert_false(qtest_get_irq(qts, wd->irq));
qtest_clock_step(qts, watchdog_calculate_steps(RESET_CYCLES,
watchdog_prescaler(qts, wd)));
g_assert_false(strcmp(qdict_get_str(get_watchdog_action(qts), "action"),
"reset"));
rsp = get_watchdog_action(qts);
g_assert_false(strcmp(qdict_get_str(rsp, "action"), "reset"));
qobject_unref(rsp);
qtest_qmp_eventwait(qts, "RESET");
qtest_quit(qts);