diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2024-01-09 10:32:04 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2024-01-09 10:32:04 +0000 |
commit | c1df5b4f165f011cf058e9bafb07b5504abb1b3d (patch) | |
tree | 6c3e825e38fb42c8d49323cd8a40b68f9104aa94 /chardev | |
parent | b345ffad3eec861d48065f96a414afeb5ec2ec4d (diff) | |
parent | c2ef5ee89d76f0ab77c4dd6a1c9eeed4d35d20ed (diff) |
Merge tag 'pull-replay-fixes-080124-1' of https://gitlab.com/stsquad/qemu into staging
Record/replay fixes for replay_kernel tests
- add a 32 bit x86 replay test case
- fix some typos
- use modern snapshot setting for tests
- update replay_dump for current ABI
- remove stale replay variables
- improve kdoc for ReplayState
- introduce common error path for replay
- always fully drain chardevs when in replay
- catch unexpected waitio on playback
- remove flaky tags from replay_kernel tests
# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmWcAJgACgkQ+9DbCVqe
# KkS/TQf+PuIPtuX71ENajfRBjz6450IbGqLUJ1HEaPGYGRj+fR6rg5g5u8qaBrT7
# TUv9ef9L22NtyL+Gbs1OGpGDWKoqV6RQc+A/MHa8IKFpcS24nUo3k4psIC6NSGRH
# 6w3++fPC1Q5cDk9Lei3Qt8fXzcnUZz+NTiIK05aC0xh7D6uGfdADvKqHeLav7qi+
# X2ztNdBsy/WJWCuWcMVzb/dGwDBtuyyxvqTD4EF+zn+gSYq9od2G8XdF+0o6ZVLM
# mXEHwNwB6UjOkLt2cYaay59SXcJFvwxKbEGTDnA7T+kgd3rknuBaWdVBIazoSPQh
# +522nPz5qq/3wO1l7+iQXuvd38fWyw==
# =nKRx
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 08 Jan 2024 14:03:04 GMT
# gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full]
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44
* tag 'pull-replay-fixes-080124-1' of https://gitlab.com/stsquad/qemu:
tests/avocado: remove skips from replay_kernel
chardev: force write all when recording replay logs
replay: stop us hanging in rr_wait_io_event
replay/replay-char: use report_sync_error
replay: introduce a central report point for sync errors
replay: make has_unread_data a bool
replay: add proper kdoc for ReplayState
replay: remove host_clock_last
scripts/replay_dump: track total number of instructions
scripts/replay-dump: update to latest format
tests/avocado: modernise the drive args for replay_linux
tests/avocado: fix typo in replay_linux
tests/avocado: add a simple i386 replay kernel test
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'chardev')
-rw-r--r-- | chardev/char.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chardev/char.c b/chardev/char.c index 119b548784..185b5ea255 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -171,6 +171,18 @@ int qemu_chr_write(Chardev *s, const uint8_t *buf, int len, bool write_all) return res; } + if (replay_mode == REPLAY_MODE_RECORD) { + /* + * When recording we don't want temporary conditions to + * perturb the result. By ensuring we write everything we can + * while recording we avoid playback being out of sync if it + * doesn't encounter the same temporary conditions (usually + * triggered by external programs not reading the chardev fast + * enough and pipes filling up). + */ + write_all = true; + } + res = qemu_chr_write_buffer(s, buf, len, &offset, write_all); if (qemu_chr_replay(s) && replay_mode == REPLAY_MODE_RECORD) { |