Add printf and formatted asserts in the guest
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest5 patches 7 repliesIn review
- v26 patches 6 repliesSuperseded
- v18 patches 14 repliesSuperseded
Changes in v3 from the cover letter
- s/kvm_vsnprintf/guest_vsnprintf/ [Sean]
- GUEST_ASSERT on error in guest_vsnprintf() [Sean]
- Added "Fixes" tag to patch #3 [Sean]
- Removed memset to zero ucall.buffer to save cycles [Sean]
- Added REPORT_GUEST_PRINTF() for the host [Sean]
- Removed ucall_fmt2() and squashed it into __GUEST_ASSERT_FMT [Sean]
- Fixed stack overflow in guest_print_test Sean called out
- Refactored test_limits() in guest_print_test to account for updates
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | KVM: selftests: Add strnlen() to the string overridestools/ tools/ | +10 | 0 replies | |
| 2/5 | KVM: selftests: Add guest_snprintf() to KVM selfteststools/ tools/ tools/ | +311 | 0 replies | |
| 3/5 | KVM: selftests: Add additional pages to the guest to accommodate ucalltools/ tools/ tools/ | +10 | 0 replies | |
| 4/5 | KVM: selftests: Add string formatting options to ucalltools/ tools/ | +40 | 0 replies | |
| 5/5 | KVM: selftests: Add a selftest for guest prints and formatted assertstools/ tools/ | +223 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH v3 0/5] Add printf and formatted asserts in the guest
Extend the ucall framework to offer GUEST_PRINTF() and GUEST_ASSERT_FMT() in selftests. This will allow for better and easier guest debugging.
v2 -> v3
- s/kvm_vsnprintf/guest_vsnprintf/ [Sean]
- GUEST_ASSERT on error in guest_vsnprintf() [Sean]
- Added "Fixes" tag to patch #3 [Sean]
- Removed memset to zero ucall.buffer to save cycles [Sean]
- Added REPORT_GUEST_PRINTF() for the host [Sean]
- Removed ucall_fmt2() and squashed it into __GUEST_ASSERT_FMT [Sean]
- Fixed stack overflow in guest_print_test Sean called out
- Refactored test_limits() in guest_print_test to account for updates
v1 -> v2:
- Added a proper selftest [Sean]
- Added support for snprintf [Shaoqin]
- Added ucall_nr_pages_required() [Sean]
- Added ucall_fmt2() for GUEST_ASSERT_FMT()
- Dropped the original version of printf.c [Sean]
- Dropped patches 1-2 and 8 [Sean]
Aaron Lewis (5):
KVM: selftests: Add strnlen() to the string overrides
KVM: selftests: Add guest_snprintf() to KVM selftests
KVM: selftests: Add additional pages to the guest to accommodate ucall
KVM: selftests: Add string formatting options to ucall
KVM: selftests: Add a selftest for guest prints and formatted asserts
tools/testing/selftests/kvm/Makefile | 3 + .../testing/selftests/kvm/guest_print_test.c | 222 +++++++++++++ .../testing/selftests/kvm/include/test_util.h | 3 + .../selftests/kvm/include/ucall_common.h | 24 ++ .../testing/selftests/kvm/lib/guest_sprintf.c | 307 ++++++++++++++++++ tools/testing/selftests/kvm/lib/kvm_util.c | 4 + .../selftests/kvm/lib/string_override.c | 9 + .../testing/selftests/kvm/lib/ucall_common.c | 22 ++ 8 files changed, 594 insertions(+) create mode 100644 tools/testing/selftests/kvm/guest_print_test.c create mode 100644 tools/testing/selftests/kvm/lib/guest_sprintf.c
Signature · 1 line
2.41.0.rc0.172.g3f132b7071-goog