mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-21 00:04:19 +01:00
qemu: add pvpanic device to get GUEST_PANICKED event
Listening to the events channel from QEMU and a guest panic event issued, then we can get the event and do some work for the special event. Fixes: #152 Signed-off-by: bin liu <bin@hyper.sh>
This commit is contained in:
@@ -1203,3 +1203,18 @@ func TestAppendFwcfg(t *testing.T) {
|
||||
}
|
||||
testAppend(fwcfg, fwcfgString, t)
|
||||
}
|
||||
|
||||
func TestAppendPVPanicDevice(t *testing.T) {
|
||||
testCases := []struct {
|
||||
dev Device
|
||||
out string
|
||||
}{
|
||||
{nil, ""},
|
||||
{PVPanicDevice{}, "-device pvpanic"},
|
||||
{PVPanicDevice{NoShutdown: true}, "-device pvpanic -no-shutdown"},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
testAppend(tc.dev, tc.out, t)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user