mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
Remove many old deprecated features
The following features have been deprecated for well over the 2 release cycle we promise ``-drive file=json:{...{'driver':'file'}}`` (since 3.0) ``-vnc acl`` (since 4.0.0) ``-mon ...,control=readline,pretty=on|off`` (since 4.1) ``migrate_set_downtime`` and ``migrate_set_speed`` (since 2.8.0) ``query-named-block-nodes`` result ``encryption_key_missing`` (since 2.10.0) ``query-block`` result ``inserted.encryption_key_missing`` (since 2.10.0) ``migrate-set-cache-size`` and ``query-migrate-cache-size`` (since 2.11.0) ``query-named-block-nodes`` and ``query-block`` result dirty-bitmaps[i].status (since 4.0) ``query-cpus`` (since 2.12.0) ``query-cpus-fast`` ``arch`` output member (since 3.0.0) ``query-events`` (since 4.0) chardev client socket with ``wait`` option (since 4.0) ``acl_show``, ``acl_reset``, ``acl_policy``, ``acl_add``, ``acl_remove`` (since 4.0.0) ``ide-drive`` (since 4.2) ``scsi-disk`` (since 4.2) -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE2vOm/bJrYpEtDo4/vobrtBUQT98FAmBTHBsACgkQvobrtBUQ T9/6cA//QVlWFvNJjmYuXMFOkYdokqde9W66iMO2vt+p3LSqlcxVa59+ZOcb5XWc 7xYcZlDHEHRMe8DWrTwUyjftJ7Ild+/HY5Nz8NqDFvX08umIhC6qmzBSG64O3fU5 KtSLWe+KfbUH2usmczQO1zGG8mSIAMnOdugpLln9W13v7X9NO4yC+/O36Mm8l4VK VEF+o9w7+s2l7QloLdhVe7RVOrqz6+9TFHx1+q1pPhMbzlv5vbfp9vIreiCgmqiO rPLXB4bjklktWSkJBe/2Jt7ixNQZrT0DfnCmshHJmmBxTCI1+b798Xy+7j9Dz8ER LzKHhlsilCv/jb8QKlIZSxvoDE02vAgwyVXlqxc7FdyaLmg/Emwr5LGUFHKCyhDR 3hmJafNokdWPcHwBYwRTdbG1OlgKA+yHSBzQ4OnjsTsKrrzlBrm9B9DiDVABXadS 5NnhvjZfaRmzjXZinf1th7fdMtLs4k+9XKn6szkrp2QhtlX9gyhkXuOhdwRVcyJB V/8dLZDdOB3Kpbu5DGlmmIzdHQx5bo/tQqZlvJJNmcOWe+TKwHg56WRUYQ3PFQZK M2A4XTd5kil6+PT7AnDHLoYAFdfScq6R32V38AI7S34kPrejftbSbDz8EVRXnrzj zzXGNWtSQpIDZGgNEg3Ta6aIf28TxLCA7nRhuPYIDcswlUsHn4c= =cFRH -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/berrange-gitlab/tags/dep-many-pull-request' into staging Remove many old deprecated features The following features have been deprecated for well over the 2 release cycle we promise ``-drive file=json:{...{'driver':'file'}}`` (since 3.0) ``-vnc acl`` (since 4.0.0) ``-mon ...,control=readline,pretty=on|off`` (since 4.1) ``migrate_set_downtime`` and ``migrate_set_speed`` (since 2.8.0) ``query-named-block-nodes`` result ``encryption_key_missing`` (since 2.10.0) ``query-block`` result ``inserted.encryption_key_missing`` (since 2.10.0) ``migrate-set-cache-size`` and ``query-migrate-cache-size`` (since 2.11.0) ``query-named-block-nodes`` and ``query-block`` result dirty-bitmaps[i].status (since 4.0) ``query-cpus`` (since 2.12.0) ``query-cpus-fast`` ``arch`` output member (since 3.0.0) ``query-events`` (since 4.0) chardev client socket with ``wait`` option (since 4.0) ``acl_show``, ``acl_reset``, ``acl_policy``, ``acl_add``, ``acl_remove`` (since 4.0.0) ``ide-drive`` (since 4.2) ``scsi-disk`` (since 4.2) # gpg: Signature made Thu 18 Mar 2021 09:23:39 GMT # gpg: using RSA key DAF3A6FDB26B62912D0E8E3FBE86EBB415104FDF # gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>" [full] # gpg: aka "Daniel P. Berrange <berrange@redhat.com>" [full] # Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E 8E3F BE86 EBB4 1510 4FDF * remotes/berrange-gitlab/tags/dep-many-pull-request: block: remove support for using "file" driver with block/char devices block: remove 'dirty-bitmaps' field from 'BlockInfo' struct block: remove dirty bitmaps 'status' field block: remove 'encryption_key_missing' flag from QAPI hw/scsi: remove 'scsi-disk' device hw/ide: remove 'ide-drive' device chardev: reject use of 'wait' flag for socket client chardevs machine: remove 'arch' field from 'query-cpus-fast' QMP command machine: remove 'query-cpus' QMP command migrate: remove QMP/HMP commands for speed, downtime and cache size monitor: remove 'query-events' QMP command monitor: raise error when 'pretty' option is used with HMP ui, monitor: remove deprecated VNC ACL option and HMP commands Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
1b507e55f8
64 changed files with 369 additions and 1801 deletions
|
@ -658,53 +658,6 @@ static void test_migrate_end(QTestState *from, QTestState *to, bool test_dest)
|
|||
cleanup("dest_serial");
|
||||
}
|
||||
|
||||
static void deprecated_set_downtime(QTestState *who, const double value)
|
||||
{
|
||||
QDict *rsp;
|
||||
|
||||
rsp = qtest_qmp(who,
|
||||
"{ 'execute': 'migrate_set_downtime',"
|
||||
" 'arguments': { 'value': %f } }", value);
|
||||
g_assert(qdict_haskey(rsp, "return"));
|
||||
qobject_unref(rsp);
|
||||
migrate_check_parameter_int(who, "downtime-limit", value * 1000);
|
||||
}
|
||||
|
||||
static void deprecated_set_speed(QTestState *who, long long value)
|
||||
{
|
||||
QDict *rsp;
|
||||
|
||||
rsp = qtest_qmp(who, "{ 'execute': 'migrate_set_speed',"
|
||||
"'arguments': { 'value': %lld } }", value);
|
||||
g_assert(qdict_haskey(rsp, "return"));
|
||||
qobject_unref(rsp);
|
||||
migrate_check_parameter_int(who, "max-bandwidth", value);
|
||||
}
|
||||
|
||||
static void deprecated_set_cache_size(QTestState *who, long long value)
|
||||
{
|
||||
QDict *rsp;
|
||||
|
||||
rsp = qtest_qmp(who, "{ 'execute': 'migrate-set-cache-size',"
|
||||
"'arguments': { 'value': %lld } }", value);
|
||||
g_assert(qdict_haskey(rsp, "return"));
|
||||
qobject_unref(rsp);
|
||||
migrate_check_parameter_int(who, "xbzrle-cache-size", value);
|
||||
}
|
||||
|
||||
static void test_deprecated(void)
|
||||
{
|
||||
QTestState *from;
|
||||
|
||||
from = qtest_init("-machine none");
|
||||
|
||||
deprecated_set_downtime(from, 0.12345);
|
||||
deprecated_set_speed(from, 12345);
|
||||
deprecated_set_cache_size(from, 4096);
|
||||
|
||||
qtest_quit(from);
|
||||
}
|
||||
|
||||
static int migrate_postcopy_prepare(QTestState **from_ptr,
|
||||
QTestState **to_ptr,
|
||||
MigrateStart *args)
|
||||
|
@ -1486,7 +1439,6 @@ int main(int argc, char **argv)
|
|||
|
||||
qtest_add_func("/migration/postcopy/unix", test_postcopy);
|
||||
qtest_add_func("/migration/postcopy/recovery", test_postcopy_recovery);
|
||||
qtest_add_func("/migration/deprecated", test_deprecated);
|
||||
qtest_add_func("/migration/bad_dest", test_baddest);
|
||||
qtest_add_func("/migration/precopy/unix", test_precopy_unix);
|
||||
qtest_add_func("/migration/precopy/tcp", test_precopy_tcp);
|
||||
|
|
|
@ -72,7 +72,7 @@ static void test_mon_partial(const void *data)
|
|||
|
||||
static QList *get_cpus(QTestState *qts, QDict **resp)
|
||||
{
|
||||
*resp = qtest_qmp(qts, "{ 'execute': 'query-cpus' }");
|
||||
*resp = qtest_qmp(qts, "{ 'execute': 'query-cpus-fast' }");
|
||||
g_assert(*resp);
|
||||
g_assert(qdict_haskey(*resp, "return"));
|
||||
return qdict_get_qlist(*resp, "return");
|
||||
|
@ -97,10 +97,10 @@ static void test_query_cpus(const void *data)
|
|||
int64_t cpu_idx, node;
|
||||
|
||||
cpu = qobject_to(QDict, e);
|
||||
g_assert(qdict_haskey(cpu, "CPU"));
|
||||
g_assert(qdict_haskey(cpu, "cpu-index"));
|
||||
g_assert(qdict_haskey(cpu, "props"));
|
||||
|
||||
cpu_idx = qdict_get_int(cpu, "CPU");
|
||||
cpu_idx = qdict_get_int(cpu, "cpu-index");
|
||||
props = qdict_get_qdict(cpu, "props");
|
||||
g_assert(qdict_haskey(props, "node-id"));
|
||||
node = qdict_get_int(props, "node-id");
|
||||
|
|
|
@ -252,7 +252,7 @@ static void test_qmp_oob(void)
|
|||
* Try any command that does not support OOB but with OOB flag. We
|
||||
* should get failure.
|
||||
*/
|
||||
resp = qtest_qmp(qts, "{ 'exec-oob': 'query-cpus' }");
|
||||
resp = qtest_qmp(qts, "{ 'exec-oob': 'query-cpus-fast' }");
|
||||
g_assert(qdict_haskey(resp, "error"));
|
||||
qobject_unref(resp);
|
||||
|
||||
|
@ -289,7 +289,7 @@ static void test_qmp_preconfig(void)
|
|||
g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-commands' }")));
|
||||
|
||||
/* forbidden commands, expected error */
|
||||
g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus' }")));
|
||||
g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus-fast' }")));
|
||||
|
||||
/* check that query-status returns preconfig state */
|
||||
rsp = qtest_qmp(qs, "{ 'execute': 'query-status' }");
|
||||
|
@ -313,7 +313,7 @@ static void test_qmp_preconfig(void)
|
|||
g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'x-exit-preconfig' }")));
|
||||
|
||||
/* enabled commands, no error expected */
|
||||
g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus' }")));
|
||||
g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus-fast' }")));
|
||||
|
||||
qtest_quit(qs);
|
||||
}
|
||||
|
|
|
@ -45,9 +45,9 @@ static const char *hmp_cmds[] = {
|
|||
"log all",
|
||||
"log none",
|
||||
"memsave 0 4096 \"/dev/null\"",
|
||||
"migrate_set_cache_size 1",
|
||||
"migrate_set_downtime 1",
|
||||
"migrate_set_speed 1",
|
||||
"migrate_set_parameter xbzrle_cache_size 1",
|
||||
"migrate_set_parameter downtime_limit 1",
|
||||
"migrate_set_parameter max_bandwidth 1",
|
||||
"netdev_add user,id=net1",
|
||||
"set_link net1 off",
|
||||
"set_link net1 on",
|
||||
|
|
|
@ -13,12 +13,12 @@ static char *get_cpu0_qom_path(void)
|
|||
QDict *cpu0;
|
||||
char *path;
|
||||
|
||||
resp = qmp("{'execute': 'query-cpus', 'arguments': {}}");
|
||||
resp = qmp("{'execute': 'query-cpus-fast', 'arguments': {}}");
|
||||
g_assert(qdict_haskey(resp, "return"));
|
||||
ret = qdict_get_qlist(resp, "return");
|
||||
|
||||
cpu0 = qobject_to(QDict, qlist_peek(ret));
|
||||
path = g_strdup(qdict_get_str(cpu0, "qom_path"));
|
||||
path = g_strdup(qdict_get_str(cpu0, "qom-path"));
|
||||
qobject_unref(resp);
|
||||
return path;
|
||||
}
|
||||
|
|
|
@ -756,8 +756,8 @@ static void test_migrate(void *obj, void *arg, QGuestAllocator *alloc)
|
|||
|
||||
/* slow down migration to have time to fiddle with log */
|
||||
/* TODO: qtest could learn to break on some places */
|
||||
rsp = qmp("{ 'execute': 'migrate_set_speed',"
|
||||
"'arguments': { 'value': 10 } }");
|
||||
rsp = qmp("{ 'execute': 'migrate-set-parameters',"
|
||||
"'arguments': { 'max-bandwidth': 10 } }");
|
||||
g_assert(qdict_haskey(rsp, "return"));
|
||||
qobject_unref(rsp);
|
||||
|
||||
|
@ -776,8 +776,8 @@ static void test_migrate(void *obj, void *arg, QGuestAllocator *alloc)
|
|||
munmap(log, size);
|
||||
|
||||
/* speed things up */
|
||||
rsp = qmp("{ 'execute': 'migrate_set_speed',"
|
||||
"'arguments': { 'value': 0 } }");
|
||||
rsp = qmp("{ 'execute': 'migrate-set-parameters',"
|
||||
"'arguments': { 'max-bandwidth': 0 } }");
|
||||
g_assert(qdict_haskey(rsp, "return"));
|
||||
qobject_unref(rsp);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue