[PATCH v3] qobject: json-streamer: Change bracket_count to brace_count

Simran Singhal posted 1 patch 4 years, 1 month ago
Test docker-mingw@fedora failed
Test docker-quick@centos7 failed
Test checkpatch failed
Test FreeBSD failed
Test asan failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200402182848.GA3023@simran-Inspiron-5558
Maintainers: Markus Armbruster <armbru@redhat.com>
qobject/json-streamer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH v3] qobject: json-streamer: Change bracket_count to brace_count
Posted by Simran Singhal 4 years, 1 month ago
Change the "parser->bracket_count >= 0" to "parser->brace_count >= 0"
to fix the typo.

Fixes: 8d3265b3

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Simran Singhal <singhalsimran0@gmail.com>
---
Changes in v3:
	-Add "Fixes: 8d3265b3" in commit message.

Changes in v2:
        -No need to remove the duplicate occurrence of "parser->bracket_count >= 0"
        but actually it is a typo and one occurence should be "parser->brace_count >= 0".

 qobject/json-streamer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qobject/json-streamer.c b/qobject/json-streamer.c
index 47dd7ea576..b93d97b995 100644
--- a/qobject/json-streamer.c
+++ b/qobject/json-streamer.c
@@ -85,7 +85,7 @@ void json_message_process_token(JSONLexer *lexer, GString *input,
     g_queue_push_tail(&parser->tokens, token);
 
     if ((parser->brace_count > 0 || parser->bracket_count > 0)
-        && parser->bracket_count >= 0 && parser->bracket_count >= 0) {
+        && parser->brace_count >= 0 && parser->bracket_count >= 0) {
         return;
     }
 
-- 
2.17.1


Re: [PATCH v3] qobject: json-streamer: Change bracket_count to brace_count
Posted by no-reply@patchew.org 4 years, 1 month ago
Patchew URL: https://patchew.org/QEMU/20200402182848.GA3023@simran-Inspiron-5558/



Hi,

This series failed build test on FreeBSD host. Please find the details below.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
# Testing script will be invoked under the git checkout with
# HEAD pointing to a commit that has the patches applied on top of "base"
# branch
if qemu-system-x86_64 --help >/dev/null 2>&1; then
  QEMU=qemu-system-x86_64
elif /usr/libexec/qemu-kvm --help >/dev/null 2>&1; then
  QEMU=/usr/libexec/qemu-kvm
else
  exit 1
fi
make vm-build-freebsd J=21 QEMU=$QEMU
exit 0
=== TEST SCRIPT END ===




The full log is available at
http://patchew.org/logs/20200402182848.GA3023@simran-Inspiron-5558/testing.FreeBSD/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [PATCH v3] qobject: json-streamer: Change bracket_count to brace_count
Posted by no-reply@patchew.org 4 years, 1 month ago
Patchew URL: https://patchew.org/QEMU/20200402182848.GA3023@simran-Inspiron-5558/



Hi,

This series failed the asan build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1
=== TEST SCRIPT END ===




The full log is available at
http://patchew.org/logs/20200402182848.GA3023@simran-Inspiron-5558/testing.asan/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [PATCH v3] qobject: json-streamer: Change bracket_count to brace_count
Posted by no-reply@patchew.org 4 years, 1 month ago
Patchew URL: https://patchew.org/QEMU/20200402182848.GA3023@simran-Inspiron-5558/



Hi,

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

Subject: [PATCH v3] qobject: json-streamer: Change bracket_count to brace_count
Message-id: 20200402182848.GA3023@simran-Inspiron-5558
Type: series

=== 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
fatal: unable to access 'https://github.com/patchew-project/qemu/': The requested URL returned error: 504
error: Could not fetch 3c8cf5a9c21ff8782164d1def7f44bd888713384
Traceback (most recent call last):
  File "patchew-tester/src/patchew-cli", line 521, in test_one
    git_clone_repo(clone, r["repo"], r["head"], logf, True)
  File "patchew-tester/src/patchew-cli", line 48, in git_clone_repo
    stdout=logf, stderr=logf)
  File "/opt/rh/rh-python36/root/usr/lib64/python3.6/subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['git', 'remote', 'add', '-f', '--mirror=fetch', '3c8cf5a9c21ff8782164d1def7f44bd888713384', 'https://github.com/patchew-project/qemu']' returned non-zero exit status 1.



The full log is available at
http://patchew.org/logs/20200402182848.GA3023@simran-Inspiron-5558/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [PATCH v3] qobject: json-streamer: Change bracket_count to brace_count
Posted by no-reply@patchew.org 4 years, 1 month ago
Patchew URL: https://patchew.org/QEMU/20200402182848.GA3023@simran-Inspiron-5558/



Hi,

This series failed the docker-quick@centos7 build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
make docker-image-centos7 V=1 NETWORK=1
time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1
=== TEST SCRIPT END ===




The full log is available at
http://patchew.org/logs/20200402182848.GA3023@simran-Inspiron-5558/testing.docker-quick@centos7/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [PATCH v3] qobject: json-streamer: Change bracket_count to brace_count
Posted by no-reply@patchew.org 4 years, 1 month ago
Patchew URL: https://patchew.org/QEMU/20200402182848.GA3023@simran-Inspiron-5558/



Hi,

This series failed the docker-mingw@fedora build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#! /bin/bash
export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-mingw@fedora J=14 NETWORK=1
=== TEST SCRIPT END ===




The full log is available at
http://patchew.org/logs/20200402182848.GA3023@simran-Inspiron-5558/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [PATCH v3] qobject: json-streamer: Change bracket_count to brace_count
Posted by Markus Armbruster 4 years, 1 month ago
Simran Singhal <singhalsimran0@gmail.com> writes:

> Change the "parser->bracket_count >= 0" to "parser->brace_count >= 0"
> to fix the typo.
>
> Fixes: 8d3265b3
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
> Signed-off-by: Simran Singhal <singhalsimran0@gmail.com>

First, thank you so much for spotting and fixing my typo!

The commit message neglects to explain what is broken.  I'd like to use
this one:

  json: Fix check for unbalanced right curly brace

  We immediately diagnose unbalanced right curly brace:

      $ qemu-kvm --nodefaults --nographic --qmp stdio
      {"QMP": {"version": {"qemu": {"micro": 91, "minor": 2, "major": 4},
      "package": "v5.0.0-rc1-1-gf6ce4a439a08"}, "capabilities": ["oob"]}}
      }
      {"error": {"class": "GenericError", "desc": "JSON parse error,
      expecting value"}}

  except within square bracket:

      [}

  The check for unbalanced braces has a typo.  Fix it.

  Fixes: 8d3265b3d00db1071d1d3bf8433b4818088fdeb5
  Signed-off-by: Simran Singhal <singhalsimran0@gmail.com>
  Reviewed-by: Eric Blake <eblake@redhat.com>

Objections?

> ---
> Changes in v3:
> 	-Add "Fixes: 8d3265b3" in commit message.
>
> Changes in v2:
>         -No need to remove the duplicate occurrence of "parser->bracket_count >= 0"
>         but actually it is a typo and one occurence should be "parser->brace_count >= 0".
>
>  qobject/json-streamer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/qobject/json-streamer.c b/qobject/json-streamer.c
> index 47dd7ea576..b93d97b995 100644
> --- a/qobject/json-streamer.c
> +++ b/qobject/json-streamer.c
> @@ -85,7 +85,7 @@ void json_message_process_token(JSONLexer *lexer, GString *input,
>      g_queue_push_tail(&parser->tokens, token);
>  
>      if ((parser->brace_count > 0 || parser->bracket_count > 0)
> -        && parser->bracket_count >= 0 && parser->bracket_count >= 0) {
> +        && parser->brace_count >= 0 && parser->bracket_count >= 0) {
>          return;
>      }

With a commit message that spells out what's broken:
Reviewed-by: Markus Armbruster <armbru@redhat.com>


Re: [PATCH v3] qobject: json-streamer: Change bracket_count to brace_count
Posted by Markus Armbruster 4 years ago
Markus Armbruster <armbru@redhat.com> writes:

> Simran Singhal <singhalsimran0@gmail.com> writes:
>
>> Change the "parser->bracket_count >= 0" to "parser->brace_count >= 0"
>> to fix the typo.
>>
>> Fixes: 8d3265b3
>>
>> Reviewed-by: Eric Blake <eblake@redhat.com>
>> Signed-off-by: Simran Singhal <singhalsimran0@gmail.com>
>
> First, thank you so much for spotting and fixing my typo!
>
> The commit message neglects to explain what is broken.  I'd like to use
> this one:
>
>   json: Fix check for unbalanced right curly brace
>
>   We immediately diagnose unbalanced right curly brace:
>
>       $ qemu-kvm --nodefaults --nographic --qmp stdio
>       {"QMP": {"version": {"qemu": {"micro": 91, "minor": 2, "major": 4},
>       "package": "v5.0.0-rc1-1-gf6ce4a439a08"}, "capabilities": ["oob"]}}
>       }
>       {"error": {"class": "GenericError", "desc": "JSON parse error,
>       expecting value"}}
>
>   except within square bracket:
>
>       [}
>
>   The check for unbalanced braces has a typo.  Fix it.
>
>   Fixes: 8d3265b3d00db1071d1d3bf8433b4818088fdeb5
>   Signed-off-by: Simran Singhal <singhalsimran0@gmail.com>
>   Reviewed-by: Eric Blake <eblake@redhat.com>
>
> Objections?

Apparently none.  Queued, thanks!

[...]