Repository navigation
Commit 9082575
committed
tests: test_serial_io: Start large TX before snapshot
Commit 6c70c6d ("devices: serial: Save/restore UART state to/from
snapshots") fixed a bug where the guest driver would hang after a
snapshot restore because Firecracker didn't properly restore the state
of the UART device.
Amend the test_serial_after_snapshot() case to test this.
Start a large transmission before taking the snapshot. This will
saturate the TX buffer of the emulated UART and will make the guest
driver enable TX interrupts. Without the fix, the test case fails
because the driver is stuck waiting for a TX interrupt that will never
be delivered.
Note that the serial.tx("") that sends a newline to flush the buffer
needs to be removed now since a new line is sent as part of the command
that starts the large transmission before the snapshot is taken.
Signed-off-by: Ilias Stamatis <ilstam@amazon.com>1 parent 6c70c6d commit 9082575
1 file changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
36 | 43 | | |
37 | 44 | | |
38 | 45 | | |
| |||
45 | 52 | | |
46 | 53 | | |
47 | 54 | | |
48 | | - | |
49 | | - | |
50 | | - | |
| 55 | + | |
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
| |||
0 commit comments