QemuOpts util/cutils: Fix and clean up number conversions
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest24 patches 1 replyIn review
- v124 patches 53 repliesSuperseded
Changes in v2 from the cover letter
* PATCH 01+04: Use g_assert_cmphex() instead of g_assert_cmpuint() in a few places
* PATCH 01+09: Cover invalid input and leading whitespace in tests [Marc-André]
* PATCH 04: Prettier literal numbers
* PATCH 07+08: Rename to @libc_errno instead of @eno [Paolo]
* PATCH 15+18: Rename to qemu_strtosz_MiB() instead of _mebi() [Paolo]
* Commit messages massaged a bit
* R-bys retained
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/24 | test-qemu-opts: Cover qemu_opts_parse()tests/ | +310 | 1 reply | |
| 2/24 | option: Assert value string isn't nullutil/ | +39 | 0 replies | |
| 3/24 | test-cutils: Add missing qemu_strtol()... endptr checkstests/ | +12 | 0 replies | |
| 4/24 | test-cutils: Clean up qemu_strtoul() result checkstests/ | +30 | 0 replies | |
| 5/24 | util/cutils: Rewrite documentation of qemu_strtol() & friendsutil/ | +45 | 0 replies | |
| 6/24 | util/cutils: Rename qemu_strtoll(), qemu_strtoull()include/ qobject/ qtest.c +3 more | +224 | 0 replies | |
| 7/24 | util/cutils: Clean up variable names around qemu_strtol()util/ | +21 | 0 replies | |
| 8/24 | util/cutils: Clean up control flow around qemu_strtol() a bitutil/ | +45 | 0 replies | |
| 9/24 | option: Fix to reject invalid and overflowing numberstests/ util/ | +16 | 0 replies | |
| 10/24 | test-cutils: Add missing qemu_strtosz()... endptr checkstests/ | +26 | 0 replies | |
| 11/24 | test-cutils: Cover qemu_strtosz() invalid inputtests/ | +24 | 0 replies | |
| 12/24 | test-cutils: Cover qemu_strtosz() with trailing craptests/ | +19 | 0 replies | |
| 13/24 | test-cutils: Cover qemu_strtosz() around range limitstests/ | +59 | 0 replies | |
| 14/24 | util/cutils: New qemu_strtosz_metric()include/ target/ tests/ +1 more | +17 | 0 replies | |
| 15/24 | util/cutils: Rename qemu_strtosz() to qemu_strtosz_MiB()hmp.c hw/ include/ +3 more | +24 | 0 replies | |
| 16/24 | util/cutils: New qemu_strtosz()include/ qapi/ qemu-img.c +3 more | +30 | 0 replies | |
| 17/24 | util/cutils: Drop QEMU_STRTOSZ_DEFSUFFIX_* macrosutil/ | +10 | 0 replies | |
| 18/24 | test-cutils: Use qemu_strtosz() more oftentests/ | +17 | 0 replies | |
| 19/24 | test-cutils: Drop suffix from test_qemu_strtosz_simple()tests/ | +4 | 0 replies | |
| 20/24 | qemu-img: Wrap cvtnum() around qemu_strtosz()qemu-img.c | +31 | 0 replies | |
| 21/24 | util/cutils: Let qemu_strtosz*() optionally reject trailing craphmp.c hw/ qapi/ +5 more | +25 | 0 replies | |
| 22/24 | util/cutils: Return qemu_strtosz*() error and value separatelyhmp.c hw/ include/ +7 more | +119 | 0 replies | |
| 23/24 | util/cutils: Change qemu_strtosz*() from int64_t to uint64_thmp.c hw/ include/ +7 more | +50 | 0 replies | |
| 24/24 | option: Fix checking of sizes for overflow and trailing craptests/ util/ | +22 | 0 replies |
Reviews trailers per patch
All 24 patches have a Reviewed-by or Acked-by.
| Patch | Eric Blake | Philippe Mathieu-Daudé | Dr. David Alan Gilbert |
|---|---|---|---|
| 1/24 | R-b | ||
| 2/24 | R-b | ||
| 3/24 | R-b | R-b | |
| 4/24 | R-b | ||
| 5/24 | R-b | R-b | |
| 6/24 | R-b | R-b | |
| 7/24 | R-b | ||
| 8/24 | R-b | ||
| 9/24 | R-b | ||
| 10/24 | R-b | R-b | |
| 11/24 | R-b | ||
| 12/24 | R-b | ||
| 13/24 | R-b | ||
| 14/24 | R-b | ||
| 15/24 | R-b | ||
| 16/24 | R-b | ||
| 17/24 | R-b | R-b | |
| 18/24 | R-b | ||
| 19/24 | R-b | ||
| 20/24 | R-b | ||
| 21/24 | R-b | R-b | |
| 22/24 | R-b | R-b | |
| 23/24 | R-b | R-b | |
| 24/24 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [Qemu-devel] [PATCH v2 00/24] QemuOpts util/cutils: Fix and clean up number conversions
QemuOpts has its own code to convert strings to numbers, and being QemuOpts, it gets it wrong. util/cutils is less wrong. Fix it up some, and reuse it for QemuOpts.
v2:
* PATCH 01+04: Use g_assert_cmphex() instead of g_assert_cmpuint() in a few places
* PATCH 01+09: Cover invalid input and leading whitespace in tests [Marc-André]
* PATCH 04: Prettier literal numbers
* PATCH 07+08: Rename to @libc_errno instead of @eno [Paolo]
* PATCH 15+18: Rename to qemu_strtosz_MiB() instead of _mebi() [Paolo]
* Commit messages massaged a bit
* R-bys retained
Markus Armbruster (24):
test-qemu-opts: Cover qemu_opts_parse()
option: Assert value string isn't null
test-cutils: Add missing qemu_strtol()... endptr checks
test-cutils: Clean up qemu_strtoul() result checks util/cutils: Rewrite documentation of qemu_strtol() & friends util/cutils: Rename qemu_strtoll(), qemu_strtoull() util/cutils: Clean up variable names around qemu_strtol() util/cutils: Clean up control flow around qemu_strtol() a bit
option: Fix to reject invalid and overflowing numbers
test-cutils: Add missing qemu_strtosz()... endptr checks
test-cutils: Cover qemu_strtosz() invalid input
test-cutils: Cover qemu_strtosz() with trailing crap
test-cutils: Cover qemu_strtosz() around range limits util/cutils: New qemu_strtosz_metric()
util/cutils: Rename qemu_strtosz() to qemu_strtosz_MiB() util/cutils: New qemu_strtosz()
util/cutils: Drop QEMU_STRTOSZ_DEFSUFFIX_* macros
test-cutils: Use qemu_strtosz() more often
test-cutils: Drop suffix from test_qemu_strtosz_simple()
qemu-img: Wrap cvtnum() around qemu_strtosz() util/cutils: Let qemu_strtosz*() optionally reject trailing crap util/cutils: Return qemu_strtosz*() error and value separately util/cutils: Change qemu_strtosz*() from int64_t to uint64_t
option: Fix checking of sizes for overflow and trailing crap
hmp.c | 11 +- hw/misc/ivshmem.c | 9 +- include/qemu/cutils.h | 29 +-- monitor.c | 7 +- qapi/opts-visitor.c | 11 +- qemu-img.c | 62 ++--- qemu-io-cmds.c | 16 +- qobject/qdict.c | 2 +- qtest.c | 34 +-- target/i386/cpu.c | 9 +- tests/test-cutils.c | 642 ++++++++++++++++++++++++++++++++----------------- tests/test-qemu-opts.c | 306 ++++++++++++++++++++++- util/cutils.c | 239 +++++++++--------- util/log.c | 4 +- util/qemu-option.c | 87 +++---- 15 files changed, 976 insertions(+), 492 deletions(-)
Signature · 1 line
2.7.4