qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: Peter Maydell <peter.maydell@linaro.org>,
	Stefan Hajnoczi <stefanha@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <fam@euphon.net>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Qemu-block <qemu-block@nongnu.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Max Reitz <mreitz@redhat.com>, Cleber Rosa <crosa@redhat.com>
Subject: Re: [PULL 00/17] Block patches
Date: Thu, 1 Oct 2020 16:56:01 +0300	[thread overview]
Message-ID: <137a2b00-88df-a3ab-dd2b-b053a94ee85f@virtuozzo.com> (raw)
In-Reply-To: <CAFEAcA87+50vkXLkLwVtrtNn4No4Fvsjd+LDEEu2cmhJcQdZ=A@mail.gmail.com>

01.10.2020 14:23, Peter Maydell wrote:
> On Wed, 30 Sep 2020 at 11:13, Stefan Hajnoczi <stefanha@redhat.com> wrote:
>>
>> The following changes since commit b150cb8f67bf491a49a1cb1c7da151eeacbdbcc9:
>>
>>    Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2020-09-29 13:18:54 +0100)
>>
>> are available in the Git repository at:
>>
>>    https://gitlab.com/stefanha/qemu.git tags/block-pull-request
>>
>> for you to fetch changes up to bc47831ff28d6f5830c9c8d74220131dc54c5253:
>>
>>    util/vfio-helpers: Rework the IOVA allocator to avoid IOVA reserved regions (2020-09-30 10:23:05 +0100)
>>
>> ----------------------------------------------------------------
>> Pull request
>>
>> Note I have switched from GitHub to GitLab.
>>
>> ----------------------------------------------------------------
> 
> This produces this error message on ppc64be Linux:
> 
> make: Entering directory `/home/pm215/qemu/build/all'
> make[1]: Entering directory `/home/pm215/qemu/slirp'
> make[1]: Nothing to be done for `all'.
> make[1]: Leaving directory `/home/pm215/qemu/slirp'
> Generating qemu-version.h with a meson_exe.py custom command
> Generating qemu-options.def with a meson_exe.py custom command
> Generating block-gen.c with a custom command
> YAML:1:83: error: unknown enumerated scalar
> {"IndentWidth": 4, "BraceWrapping": {"AfterFunction": true},
> "BreakBeforeBraces": "Custom", "SortIncludes": false,
> "MaxEmptyLinesToKeep": 2}
> 
>             ^~~~~~~~
> Error parsing -style: Invalid argument, using LLVM style
> YAML:1:83: error: unknown enumerated scalar
> {"IndentWidth": 4, "BraceWrapping": {"AfterFunction": true},
> "BreakBeforeBraces": "Custom", "SortIncludes": false,
> "MaxEmptyLinesToKeep": 2}
> 
>             ^~~~~~~~
> Error parsing -style: Invalid argument, using LLVM style
> Compiling C object libqemuutil.a.p/util_qemu-error.c.o
> Compiling C object libqemuutil.a.p/util_qemu-sockets.c.o
> Compiling C object libqemuutil.a.p/util_aio-posix.c.o
> Compiling C object libqemuutil.a.p/util_osdep.c.o
> 
> The error does not cause the build to fail, which seems
> like it's also a bug...

YAML:1:83 is most probably "Custom" value for "BeakBeforeBraces" key,
which is needed to enable custom brace wrapping, set with separate
BraceWrapping key.

Not simple to find the version of clang which is first to support "Custom'
here, but at least clang 3.6.1 doesn't support it.

Hm, I can "reproduce" like this:

[root@kvm work]# clang-format -style='{"BreakBeforeBraces": "Mega"}'
int c() {}
YAML:1:23: error: unknown enumerated scalar
{"BreakBeforeBraces": "Mega"}
                       ^~~~~~
Error parsing -style: Invalid argument
[root@kvm work]# echo $?
1

.

Build doesn't fail because clang-formatting of generated code is optional,
and error is ignored. But stderr output of clang-format is still printed
and this is wrong.

To fix we need:

diff --git a/scripts/block-coroutine-wrapper.py b/scripts/block-coroutine-wrapper.py
index 505e070660..1f66eb903b 100644
--- a/scripts/block-coroutine-wrapper.py
+++ b/scripts/block-coroutine-wrapper.py
@@ -43,7 +43,7 @@ def prettify(code: str) -> str:
          })
          p = subprocess.run(['clang-format', f'-style={style}'], check=True,
                             encoding='utf-8', input=code,
-                           stdout=subprocess.PIPE)
+                           stdout=subprocess.PIPE, stderr=subprocess.PIPE)
          return p.stdout
      except FileNotFoundError:
          return code



I can send a separate patch if it is convenient.


> 
> (My guess is this is due to some script implicitly wanting
> a newer version of something or other than the PPC box
> happens to have installed, rather than being an endianness
> issue.)
> 
> thanks
> -- PMM
> 


-- 
Best regards,
Vladimir


  reply	other threads:[~2020-10-01 13:56 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-30 10:12 [PULL 00/17] Block patches Stefan Hajnoczi
2020-09-30 10:12 ` [PULL 01/17] util/vfio-helpers: Pass page protections to qemu_vfio_pci_map_bar() Stefan Hajnoczi
2020-09-30 10:12 ` [PULL 02/17] block/nvme: Map doorbells pages write-only Stefan Hajnoczi
2020-09-30 10:12 ` [PULL 03/17] block/nvme: Reduce I/O registers scope Stefan Hajnoczi
2020-09-30 10:12 ` [PULL 04/17] block/nvme: Drop NVMeRegs structure, directly use NvmeBar Stefan Hajnoczi
2020-09-30 10:12 ` [PULL 05/17] block/nvme: Use register definitions from 'block/nvme.h' Stefan Hajnoczi
2020-09-30 10:12 ` [PULL 06/17] block/nvme: Replace magic value by SCALE_MS definition Stefan Hajnoczi
2020-09-30 10:12 ` [PULL 07/17] block: return error-code from bdrv_invalidate_cache Stefan Hajnoczi
2020-09-30 10:12 ` [PULL 08/17] block/io: refactor coroutine wrappers Stefan Hajnoczi
2020-09-30 10:12 ` [PULL 09/17] block: declare some coroutine functions in block/coroutines.h Stefan Hajnoczi
2020-09-30 10:12 ` [PULL 10/17] scripts: add block-coroutine-wrapper.py Stefan Hajnoczi
2020-09-30 10:12 ` [PULL 11/17] block: generate coroutine-wrapper code Stefan Hajnoczi
2020-09-30 10:13 ` [PULL 12/17] block: drop bdrv_prwv Stefan Hajnoczi
2020-09-30 10:13 ` [PULL 13/17] block/io: refactor save/load vmstate Stefan Hajnoczi
2020-09-30 10:13 ` [PULL 14/17] include/block/block.h: drop non-ascii quotation mark Stefan Hajnoczi
2020-09-30 10:13 ` [PULL 15/17] docs: add 'io_uring' option to 'aio' param in qemu-options.hx Stefan Hajnoczi
2020-09-30 10:13 ` [PULL 16/17] util/vfio-helpers: Collect IOVA reserved regions Stefan Hajnoczi
2020-09-30 10:13 ` [PULL 17/17] util/vfio-helpers: Rework the IOVA allocator to avoid " Stefan Hajnoczi
2020-10-01 11:23 ` [PULL 00/17] Block patches Peter Maydell
2020-10-01 13:56   ` Vladimir Sementsov-Ogievskiy [this message]
2020-10-01 15:02   ` Stefan Hajnoczi
2020-10-01 15:12     ` Peter Maydell
2020-10-05 13:26       ` Stefan Hajnoczi
2020-10-01 15:29     ` Vladimir Sementsov-Ogievskiy
2020-10-02 10:36     ` Peter Maydell
  -- strict thread matches above, loose matches on Subject: below --
2023-06-05 15:45 Hanna Czenczek
2023-06-05 19:03 ` Richard Henderson
2023-04-28 12:39 Stefan Hajnoczi
2023-04-29 22:05 ` Richard Henderson
2023-05-01 11:56   ` Stefan Hajnoczi
2020-02-06 12:51 Max Reitz
2020-02-06 18:58 ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=137a2b00-88df-a3ab-dd2b-b053a94ee85f@virtuozzo.com \
    --to=vsementsov@virtuozzo.com \
    --cc=crosa@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=fam@euphon.net \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).