treewide: do not use short-form boolean options

They are going to be deprecated, avoid warnings on stdout while the
tests run.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2020-11-13 03:10:52 -05:00
parent 29daa894b6
commit 991c180d74
8 changed files with 34 additions and 34 deletions

View File

@ -343,7 +343,7 @@ In case an Arm virt machine is emulated, use the following command line:
-device tpm-tis-device,tpmdev=tpm0 \ -device tpm-tis-device,tpmdev=tpm0 \
-device virtio-blk-pci,drive=drv0 \ -device virtio-blk-pci,drive=drv0 \
-drive format=qcow2,file=hda.qcow2,if=none,id=drv0 \ -drive format=qcow2,file=hda.qcow2,if=none,id=drv0 \
-drive if=pflash,format=raw,file=flash0.img,readonly \ -drive if=pflash,format=raw,file=flash0.img,readonly=on \
-drive if=pflash,format=raw,file=flash1.img -drive if=pflash,format=raw,file=flash1.img
In case SeaBIOS is used as firmware, it should show the TPM menu item In case SeaBIOS is used as firmware, it should show the TPM menu item

View File

@ -292,7 +292,7 @@ class QEMUMachine:
for _ in range(self._console_index): for _ in range(self._console_index):
args.extend(['-serial', 'null']) args.extend(['-serial', 'null'])
if self._console_set: if self._console_set:
chardev = ('socket,id=console,path=%s,server,nowait' % chardev = ('socket,id=console,path=%s,server=on,wait=off' %
self._console_address) self._console_address)
args.extend(['-chardev', chardev]) args.extend(['-chardev', chardev])
if self._console_device_type is None: if self._console_device_type is None:

View File

@ -1406,25 +1406,25 @@ ERST
DEF("fsdev", HAS_ARG, QEMU_OPTION_fsdev, DEF("fsdev", HAS_ARG, QEMU_OPTION_fsdev,
"-fsdev local,id=id,path=path,security_model=mapped-xattr|mapped-file|passthrough|none\n" "-fsdev local,id=id,path=path,security_model=mapped-xattr|mapped-file|passthrough|none\n"
" [,writeout=immediate][,readonly][,fmode=fmode][,dmode=dmode]\n" " [,writeout=immediate][,readonly=on][,fmode=fmode][,dmode=dmode]\n"
" [[,throttling.bps-total=b]|[[,throttling.bps-read=r][,throttling.bps-write=w]]]\n" " [[,throttling.bps-total=b]|[[,throttling.bps-read=r][,throttling.bps-write=w]]]\n"
" [[,throttling.iops-total=i]|[[,throttling.iops-read=r][,throttling.iops-write=w]]]\n" " [[,throttling.iops-total=i]|[[,throttling.iops-read=r][,throttling.iops-write=w]]]\n"
" [[,throttling.bps-total-max=bm]|[[,throttling.bps-read-max=rm][,throttling.bps-write-max=wm]]]\n" " [[,throttling.bps-total-max=bm]|[[,throttling.bps-read-max=rm][,throttling.bps-write-max=wm]]]\n"
" [[,throttling.iops-total-max=im]|[[,throttling.iops-read-max=irm][,throttling.iops-write-max=iwm]]]\n" " [[,throttling.iops-total-max=im]|[[,throttling.iops-read-max=irm][,throttling.iops-write-max=iwm]]]\n"
" [[,throttling.iops-size=is]]\n" " [[,throttling.iops-size=is]]\n"
"-fsdev proxy,id=id,socket=socket[,writeout=immediate][,readonly]\n" "-fsdev proxy,id=id,socket=socket[,writeout=immediate][,readonly=on]\n"
"-fsdev proxy,id=id,sock_fd=sock_fd[,writeout=immediate][,readonly]\n" "-fsdev proxy,id=id,sock_fd=sock_fd[,writeout=immediate][,readonly=on]\n"
"-fsdev synth,id=id\n", "-fsdev synth,id=id\n",
QEMU_ARCH_ALL) QEMU_ARCH_ALL)
SRST SRST
``-fsdev local,id=id,path=path,security_model=security_model [,writeout=writeout][,readonly][,fmode=fmode][,dmode=dmode] [,throttling.option=value[,throttling.option=value[,...]]]`` ``-fsdev local,id=id,path=path,security_model=security_model [,writeout=writeout][,readonly=on][,fmode=fmode][,dmode=dmode] [,throttling.option=value[,throttling.option=value[,...]]]``
\ \
``-fsdev proxy,id=id,socket=socket[,writeout=writeout][,readonly]`` ``-fsdev proxy,id=id,socket=socket[,writeout=writeout][,readonly=on]``
\ \
``-fsdev proxy,id=id,sock_fd=sock_fd[,writeout=writeout][,readonly]`` ``-fsdev proxy,id=id,sock_fd=sock_fd[,writeout=writeout][,readonly=on]``
\ \
``-fsdev synth,id=id[,readonly]`` ``-fsdev synth,id=id[,readonly=on]``
Define a new file system device. Valid options are: Define a new file system device. Valid options are:
``local`` ``local``
@ -1467,7 +1467,7 @@ SRST
guest only when the data has been reported as written by the guest only when the data has been reported as written by the
storage subsystem. storage subsystem.
``readonly`` ``readonly=on``
Enables exporting 9p share as a readonly mount for guests. By Enables exporting 9p share as a readonly mount for guests. By
default read-write access is given. default read-write access is given.
@ -1532,18 +1532,18 @@ ERST
DEF("virtfs", HAS_ARG, QEMU_OPTION_virtfs, DEF("virtfs", HAS_ARG, QEMU_OPTION_virtfs,
"-virtfs local,path=path,mount_tag=tag,security_model=mapped-xattr|mapped-file|passthrough|none\n" "-virtfs local,path=path,mount_tag=tag,security_model=mapped-xattr|mapped-file|passthrough|none\n"
" [,id=id][,writeout=immediate][,readonly][,fmode=fmode][,dmode=dmode][,multidevs=remap|forbid|warn]\n" " [,id=id][,writeout=immediate][,readonly=on][,fmode=fmode][,dmode=dmode][,multidevs=remap|forbid|warn]\n"
"-virtfs proxy,mount_tag=tag,socket=socket[,id=id][,writeout=immediate][,readonly]\n" "-virtfs proxy,mount_tag=tag,socket=socket[,id=id][,writeout=immediate][,readonly=on]\n"
"-virtfs proxy,mount_tag=tag,sock_fd=sock_fd[,id=id][,writeout=immediate][,readonly]\n" "-virtfs proxy,mount_tag=tag,sock_fd=sock_fd[,id=id][,writeout=immediate][,readonly=on]\n"
"-virtfs synth,mount_tag=tag[,id=id][,readonly]\n", "-virtfs synth,mount_tag=tag[,id=id][,readonly=on]\n",
QEMU_ARCH_ALL) QEMU_ARCH_ALL)
SRST SRST
``-virtfs local,path=path,mount_tag=mount_tag ,security_model=security_model[,writeout=writeout][,readonly] [,fmode=fmode][,dmode=dmode][,multidevs=multidevs]`` ``-virtfs local,path=path,mount_tag=mount_tag ,security_model=security_model[,writeout=writeout][,readonly=on] [,fmode=fmode][,dmode=dmode][,multidevs=multidevs]``
\ \
``-virtfs proxy,socket=socket,mount_tag=mount_tag [,writeout=writeout][,readonly]`` ``-virtfs proxy,socket=socket,mount_tag=mount_tag [,writeout=writeout][,readonly=on]``
\ \
``-virtfs proxy,sock_fd=sock_fd,mount_tag=mount_tag [,writeout=writeout][,readonly]`` ``-virtfs proxy,sock_fd=sock_fd,mount_tag=mount_tag [,writeout=writeout][,readonly=on]``
\ \
``-virtfs synth,mount_tag=mount_tag`` ``-virtfs synth,mount_tag=mount_tag``
Define a new virtual filesystem device and expose it to the guest using Define a new virtual filesystem device and expose it to the guest using
@ -1598,7 +1598,7 @@ SRST
guest only when the data has been reported as written by the guest only when the data has been reported as written by the
storage subsystem. storage subsystem.
``readonly`` ``readonly=on``
Enables exporting 9p share as a readonly mount for guests. By Enables exporting 9p share as a readonly mount for guests. By
default read-write access is given. default read-write access is given.

View File

@ -674,14 +674,14 @@ static void test_acpi_one(const char *params, test_data *data)
if (data->cd) { if (data->cd) {
args = g_strdup_printf("-machine %s %s -accel tcg " args = g_strdup_printf("-machine %s %s -accel tcg "
"-nodefaults -nographic " "-nodefaults -nographic "
"-drive if=pflash,format=raw,file=%s,readonly " "-drive if=pflash,format=raw,file=%s,readonly=on "
"-drive if=pflash,format=raw,file=%s,snapshot=on -cdrom %s %s", "-drive if=pflash,format=raw,file=%s,snapshot=on -cdrom %s %s",
data->machine, data->tcg_only ? "" : "-accel kvm", data->machine, data->tcg_only ? "" : "-accel kvm",
data->uefi_fl1, data->uefi_fl2, data->cd, params ? params : ""); data->uefi_fl1, data->uefi_fl2, data->cd, params ? params : "");
} else { } else {
args = g_strdup_printf("-machine %s %s -accel tcg " args = g_strdup_printf("-machine %s %s -accel tcg "
"-nodefaults -nographic " "-nodefaults -nographic "
"-drive if=pflash,format=raw,file=%s,readonly " "-drive if=pflash,format=raw,file=%s,readonly=on "
"-drive if=pflash,format=raw,file=%s,snapshot=on %s", "-drive if=pflash,format=raw,file=%s,snapshot=on %s",
data->machine, data->tcg_only ? "" : "-accel kvm", data->machine, data->tcg_only ? "" : "-accel kvm",
data->uefi_fl1, data->uefi_fl2, params ? params : ""); data->uefi_fl1, data->uefi_fl2, params ? params : "");

View File

@ -261,7 +261,7 @@ static void test_geometry(const void *opaque)
const FlashConfig *config = opaque; const FlashConfig *config = opaque;
QTestState *qtest; QTestState *qtest;
qtest = qtest_initf("-M musicpal" qtest = qtest_initf("-M musicpal"
" -drive if=pflash,file=%s,format=raw,copy-on-read" " -drive if=pflash,file=%s,format=raw,copy-on-read=on"
/* Device geometry properties. */ /* Device geometry properties. */
" -global driver=cfi.pflash02," " -global driver=cfi.pflash02,"
"property=num-blocks0,value=%d" "property=num-blocks0,value=%d"
@ -581,7 +581,7 @@ static void test_cfi_in_autoselect(const void *opaque)
const FlashConfig *config = opaque; const FlashConfig *config = opaque;
QTestState *qtest; QTestState *qtest;
qtest = qtest_initf("-M musicpal" qtest = qtest_initf("-M musicpal"
" -drive if=pflash,file=%s,format=raw,copy-on-read", " -drive if=pflash,file=%s,format=raw,copy-on-read=on",
image_path); image_path);
FlashConfig explicit_config = expand_config_defaults(config); FlashConfig explicit_config = expand_config_defaults(config);
explicit_config.qtest = qtest; explicit_config.qtest = qtest;

View File

@ -95,8 +95,8 @@ static void test_redirector_tx(void)
qts = qtest_initf( qts = qtest_initf(
"-netdev socket,id=qtest-bn0,fd=%d " "-netdev socket,id=qtest-bn0,fd=%d "
"-device %s,netdev=qtest-bn0,id=qtest-e0 " "-device %s,netdev=qtest-bn0,id=qtest-e0 "
"-chardev socket,id=redirector0,path=%s,server,nowait " "-chardev socket,id=redirector0,path=%s,server=on,wait=off "
"-chardev socket,id=redirector1,path=%s,server,nowait " "-chardev socket,id=redirector1,path=%s,server=on,wait=off "
"-chardev socket,id=redirector2,path=%s " "-chardev socket,id=redirector2,path=%s "
"-object filter-redirector,id=qtest-f0,netdev=qtest-bn0," "-object filter-redirector,id=qtest-f0,netdev=qtest-bn0,"
"queue=tx,outdev=redirector0 " "queue=tx,outdev=redirector0 "
@ -165,8 +165,8 @@ static void test_redirector_rx(void)
qts = qtest_initf( qts = qtest_initf(
"-netdev socket,id=qtest-bn0,fd=%d " "-netdev socket,id=qtest-bn0,fd=%d "
"-device %s,netdev=qtest-bn0,id=qtest-e0 " "-device %s,netdev=qtest-bn0,id=qtest-e0 "
"-chardev socket,id=redirector0,path=%s,server,nowait " "-chardev socket,id=redirector0,path=%s,server=on,wait=off "
"-chardev socket,id=redirector1,path=%s,server,nowait " "-chardev socket,id=redirector1,path=%s,server=on,wait=off "
"-chardev socket,id=redirector2,path=%s " "-chardev socket,id=redirector2,path=%s "
"-object filter-redirector,id=qtest-f0,netdev=qtest-bn0," "-object filter-redirector,id=qtest-f0,netdev=qtest-bn0,"
"queue=rx,indev=redirector0 " "queue=rx,indev=redirector0 "

View File

@ -537,7 +537,7 @@ static void test_server_create_chr(TestServer *server, const gchar *opt)
static void test_server_listen(TestServer *server) static void test_server_listen(TestServer *server)
{ {
test_server_create_chr(server, ",server,nowait"); test_server_create_chr(server, ",server=on,wait=off");
} }
static void test_server_free(TestServer *server) static void test_server_free(TestServer *server)
@ -846,7 +846,7 @@ static void *vhost_user_test_setup_reconnect(GString *cmd_line, void *arg)
g_thread_new("connect", connect_thread, s); g_thread_new("connect", connect_thread, s);
append_mem_opts(s, cmd_line, 256, TEST_MEMFD_AUTO); append_mem_opts(s, cmd_line, 256, TEST_MEMFD_AUTO);
s->vu_ops->append_opts(s, cmd_line, ",server"); s->vu_ops->append_opts(s, cmd_line, ",server=on");
g_test_queue_destroy(vhost_user_test_cleanup, s); g_test_queue_destroy(vhost_user_test_cleanup, s);
@ -883,7 +883,7 @@ static void *vhost_user_test_setup_connect_fail(GString *cmd_line, void *arg)
g_thread_new("connect", connect_thread, s); g_thread_new("connect", connect_thread, s);
append_mem_opts(s, cmd_line, 256, TEST_MEMFD_AUTO); append_mem_opts(s, cmd_line, 256, TEST_MEMFD_AUTO);
s->vu_ops->append_opts(s, cmd_line, ",server"); s->vu_ops->append_opts(s, cmd_line, ",server=on");
g_test_queue_destroy(vhost_user_test_cleanup, s); g_test_queue_destroy(vhost_user_test_cleanup, s);
@ -898,7 +898,7 @@ static void *vhost_user_test_setup_flags_mismatch(GString *cmd_line, void *arg)
g_thread_new("connect", connect_thread, s); g_thread_new("connect", connect_thread, s);
append_mem_opts(s, cmd_line, 256, TEST_MEMFD_AUTO); append_mem_opts(s, cmd_line, 256, TEST_MEMFD_AUTO);
s->vu_ops->append_opts(s, cmd_line, ",server"); s->vu_ops->append_opts(s, cmd_line, ",server=on");
g_test_queue_destroy(vhost_user_test_cleanup, s); g_test_queue_destroy(vhost_user_test_cleanup, s);

View File

@ -413,7 +413,7 @@ static void char_websock_test(void)
CharBackend client_be; CharBackend client_be;
Chardev *chr_client; Chardev *chr_client;
Chardev *chr = qemu_chr_new("server", Chardev *chr = qemu_chr_new("server",
"websocket:127.0.0.1:0,server,nowait", NULL); "websocket:127.0.0.1:0,server=on,wait=off", NULL);
const char handshake[] = "GET / HTTP/1.1\r\n" const char handshake[] = "GET / HTTP/1.1\r\n"
"Upgrade: websocket\r\n" "Upgrade: websocket\r\n"
"Connection: Upgrade\r\n" "Connection: Upgrade\r\n"
@ -696,7 +696,7 @@ char_socket_addr_to_opt_str(SocketAddress *addr, bool fd_pass,
fd = ioc->fd; fd = ioc->fd;
ioc->fd = -1; ioc->fd = -1;
optstr = g_strdup_printf("socket,id=cdev0,fd=%d%s", optstr = g_strdup_printf("socket,id=cdev0,fd=%d%s",
fd, is_listen ? ",server,nowait" : ""); fd, is_listen ? ",server=on,wait=off" : "");
object_unref(OBJECT(ioc)); object_unref(OBJECT(ioc));
return optstr; return optstr;
} else { } else {
@ -706,13 +706,13 @@ char_socket_addr_to_opt_str(SocketAddress *addr, bool fd_pass,
addr->u.inet.host, addr->u.inet.host,
addr->u.inet.port, addr->u.inet.port,
reconnect ? reconnect : "", reconnect ? reconnect : "",
is_listen ? ",server,nowait" : ""); is_listen ? ",server=on,wait=off" : "");
case SOCKET_ADDRESS_TYPE_UNIX: case SOCKET_ADDRESS_TYPE_UNIX:
return g_strdup_printf("socket,id=cdev0,path=%s%s%s", return g_strdup_printf("socket,id=cdev0,path=%s%s%s",
addr->u.q_unix.path, addr->u.q_unix.path,
reconnect ? reconnect : "", reconnect ? reconnect : "",
is_listen ? ",server,nowait" : ""); is_listen ? ",server=on,wait=off" : "");
default: default:
g_assert_not_reached(); g_assert_not_reached();