On Thu, Sep 03, 2026 at 04:38:43PM -0400, Peter Xu wrote: > On Wed, Sep 02, 2026 at 07:15:37PM -0300, Fabiano Rosas wrote: > > The following patches will change how parameters are set and shown in > > HMP, including readline completion so add two minimal tests. > > > > - set/info migrate_parameters > > > > The test uses qtest facilities to issue HMP migrate_set_parameters for > > each of the existing migration parameters and queries them back with > > the info command. A list is kept with the expected strings. A > > substring match function inspired by glib's g_str_match_string is > > implemented for this test so the test can produce a decent error > > output instead of just assert failure. E.g: > > > > # HMP output mismatch for entry at line 55: > > # expected vs. found: > > # > > # max-bandwidth: 10356305952768 bytes/hour > > # --- > > # max-bandwidth: 10356305952768 bytes/second > > > > (note that line 55 above is the source line where the test case for > > max-bandwith is) > > > > - readline completion > > > > The test puts the monitor on a chardev via socket and bypasses qtest > > facilities because it needs to emit raw codes to readline. It > > therefore requires a couple of new helpers to read/write to the > > monitor socket. > > > > Usage: > > QTEST_QEMU_BINARY=./qemu-system-x86_64 \ > > ./tests/qtest/migration-test --full -p /x86_64/migration/hmp > > > > Signed-off-by: Fabiano Rosas <[email protected]> > > Acked-by: Peter Xu <[email protected]>
Ah I forgot to say: Logically this test should not be in migration-test, simply because it uses 1 VM not 2.. hence MigrateCommon doesn't make sense to be passed into the two HMP tests. But can be done later too. Also feel free to also keep my A-b if you lightly update it, e.g. add set-parameter test entries, duplicate g_test_message()s, etc. -- Peter Xu
