[PATCH 00/10] Fix floating-point -> text conversion precision

Markus Armbruster posted 10 patches 3 years, 4 months ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20201210161452.2813491-1-armbru@redhat.com
Maintainers: Markus Armbruster <armbru@redhat.com>, Michael Roth <mdroth@linux.vnet.ibm.com>
qapi/string-output-visitor.c       |   2 +-
qobject/qnum.c                     |  24 +----
tests/check-qjson.c                | 146 +++++++++++++++--------------
tests/check-qnum.c                 |   8 +-
tests/test-string-output-visitor.c |   4 +-
tests/test-visitor-serialization.c |  62 +++++++-----
6 files changed, 127 insertions(+), 119 deletions(-)
[PATCH 00/10] Fix floating-point -> text conversion precision
Posted by Markus Armbruster 3 years, 4 months ago
This takes care of ancient FIXMEs, mostly because a future series will
rework the code, and I can't bring myself tiptoeing around these bugs.

Markus Armbruster (10):
  tests/check-qjson: Don't skip funny QNumber to JSON conversions
  tests/check-qjson: Examine QNum more thoroughly
  tests/check-qjson: Cover number 2^63
  tests/check-qjson: Replace redundant large_number()
  tests/check-qnum: Cover qnum_to_string() for "unround" argument
  qobject: Fix qnum_to_string() to use sufficient precision
  test-string-output-visitor: Cover "unround" number
  string-output-visitor: Fix to use sufficient precision
  test-visitor-serialization: Drop insufficient precision workaround
  test-visitor-serialization: Clean up test_primitives()

 qapi/string-output-visitor.c       |   2 +-
 qobject/qnum.c                     |  24 +----
 tests/check-qjson.c                | 146 +++++++++++++++--------------
 tests/check-qnum.c                 |   8 +-
 tests/test-string-output-visitor.c |   4 +-
 tests/test-visitor-serialization.c |  62 +++++++-----
 6 files changed, 127 insertions(+), 119 deletions(-)

-- 
2.26.2


Re: [PATCH 00/10] Fix floating-point -> text conversion precision
Posted by no-reply@patchew.org 3 years, 4 months ago
Patchew URL: https://patchew.org/QEMU/20201210161452.2813491-1-armbru@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20201210161452.2813491-1-armbru@redhat.com
Subject: [PATCH 00/10] Fix floating-point -> text conversion precision

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 - [tag update]      patchew/20200916095150.755714-1-stefanha@redhat.com -> patchew/20200916095150.755714-1-stefanha@redhat.com
 * [new tag]         patchew/20201210161452.2813491-1-armbru@redhat.com -> patchew/20201210161452.2813491-1-armbru@redhat.com
Switched to a new branch 'test'
b484d41 test-visitor-serialization: Clean up test_primitives()
2284fd5 test-visitor-serialization: Drop insufficient precision workaround
be2e608 string-output-visitor: Fix to use sufficient precision
efd2a57 test-string-output-visitor: Cover "unround" number
9ed1edd qobject: Fix qnum_to_string() to use sufficient precision
0cdcb97 tests/check-qnum: Cover qnum_to_string() for "unround" argument
a349bc3 tests/check-qjson: Replace redundant large_number()
00db712 tests/check-qjson: Cover number 2^63
487c226 tests/check-qjson: Examine QNum more thoroughly
b783de6 tests/check-qjson: Don't skip funny QNumber to JSON conversions

=== OUTPUT BEGIN ===
1/10 Checking commit b783de656e9b (tests/check-qjson: Don't skip funny QNumber to JSON conversions)
WARNING: Block comments use a leading /* on a separate line
#94: FILE: tests/check-qjson.c:883:
+        { "-32.20e-10", -32.20e-10, "-0" /* BUG */ },

ERROR: spaces required around that '-' (ctx:VxV)
#94: FILE: tests/check-qjson.c:883:
+        { "-32.20e-10", -32.20e-10, "-0" /* BUG */ },
                                ^

total: 1 errors, 1 warnings, 97 lines checked

Patch 1/10 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

2/10 Checking commit 487c226c8132 (tests/check-qjson: Examine QNum more thoroughly)
3/10 Checking commit 00db712e3d42 (tests/check-qjson: Cover number 2^63)
4/10 Checking commit a349bc3f2fb5 (tests/check-qjson: Replace redundant large_number())
5/10 Checking commit 0cdcb9730d90 (tests/check-qnum: Cover qnum_to_string() for "unround" argument)
6/10 Checking commit 9ed1edd2eb94 (qobject: Fix qnum_to_string() to use sufficient precision)
WARNING: Block comments use a leading /* on a separate line
#104: FILE: qobject/qnum.c:170:
+        /* FIXME: g_strdup_printf() is locale dependent; but JSON requires

ERROR: spaces required around that '-' (ctx:VxV)
#144: FILE: tests/check-qjson.c:886:
+        { "-32.20e-10", -32.20e-10, "-3.22e-09" },
                                ^

total: 1 errors, 1 warnings, 69 lines checked

Patch 6/10 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

7/10 Checking commit efd2a57e5d20 (test-string-output-visitor: Cover "unround" number)
8/10 Checking commit be2e6080e5de (string-output-visitor: Fix to use sufficient precision)
9/10 Checking commit 2284fd528b2c (test-visitor-serialization: Drop insufficient precision workaround)
10/10 Checking commit b484d4126865 (test-visitor-serialization: Clean up test_primitives())
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20201210161452.2813491-1-armbru@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com