migration-helpers.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * QTest migration helpers
  3. *
  4. * Copyright (c) 2016-2018 Red Hat, Inc. and/or its affiliates
  5. * based on the vhost-user-test.c that is:
  6. * Copyright (c) 2014 Virtual Open Systems Sarl.
  7. *
  8. * This work is licensed under the terms of the GNU GPL, version 2 or later.
  9. * See the COPYING file in the top-level directory.
  10. *
  11. */
  12. #ifndef MIGRATION_HELPERS_H_
  13. #define MIGRATION_HELPERS_H_
  14. #include "libqtest.h"
  15. extern bool got_stop;
  16. G_GNUC_PRINTF(3, 4)
  17. QDict *wait_command_fd(QTestState *who, int fd, const char *command, ...);
  18. G_GNUC_PRINTF(2, 3)
  19. QDict *wait_command(QTestState *who, const char *command, ...);
  20. G_GNUC_PRINTF(3, 4)
  21. void migrate_qmp(QTestState *who, const char *uri, const char *fmt, ...);
  22. QDict *migrate_query(QTestState *who);
  23. void wait_for_migration_status(QTestState *who,
  24. const char *goal, const char **ungoals);
  25. void wait_for_migration_complete(QTestState *who);
  26. void wait_for_migration_fail(QTestState *from, bool allow_active);
  27. #endif /* MIGRATION_HELPERS_H_ */