mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-18 14:54:19 +01:00
qemu: add migration incoming defer support
qemu commandline supports -incoming defer and qmp supports migrate-incoming uri. Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
@@ -1349,6 +1349,23 @@ func TestExecuteVirtSerialPortAdd(t *testing.T) {
|
||||
<-disconnectedCh
|
||||
}
|
||||
|
||||
// Check migration incoming
|
||||
func TestExecuteMigrationIncoming(t *testing.T) {
|
||||
connectedCh := make(chan *QMPVersion)
|
||||
disconnectedCh := make(chan struct{})
|
||||
buf := newQMPTestCommandBuffer(t)
|
||||
buf.AddCommand("migrate-incoming", nil, "return", nil)
|
||||
cfg := QMPConfig{Logger: qmpTestLogger{}}
|
||||
q := startQMPLoop(buf, cfg, connectedCh, disconnectedCh)
|
||||
checkVersion(t, connectedCh)
|
||||
err := q.ExecuteMigrationIncoming(context.Background(), "uri")
|
||||
if err != nil {
|
||||
t.Fatalf("Unexpected error %v", err)
|
||||
}
|
||||
q.Shutdown()
|
||||
<-disconnectedCh
|
||||
}
|
||||
|
||||
// Checks migration status
|
||||
func TestExecuteQueryMigration(t *testing.T) {
|
||||
connectedCh := make(chan *QMPVersion)
|
||||
|
||||
Reference in New Issue
Block a user