[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC 09/21] qapi: Don't absolutize include file n
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH RFC 09/21] qapi: Don't absolutize include file name in error messages |
Date: |
Mon, 5 Feb 2018 09:55:54 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
On 02/03/2018 03:08 AM, Markus Armbruster wrote:
> Eric Blake <address@hidden> writes:
>
>> On 02/02/2018 07:03 AM, Markus Armbruster wrote:
>>> Error messages print absolute filenames of included files even gave a
>>
>> s/even gave/even when given/
>
> I meant to write "even if the user gave". Is that okay?
Yes, that works too.
>
>>> relative one on the command line:
>>>
>>> PYTHONPATH=scripts python -B tests/qapi-schema/test-qapi.py
>>> tests/qapi-schema/include-cycle.json
>>> In file included from tests/qapi-schema/include-cycle.json:1:
>>> In file included from
>>> /work/armbru/qemu/tests/qapi-schema/include-cycle-b.json:1:
>>> /work/armbru/qemu/tests/qapi-schema/include-cycle-c.json:1: Inclusion
>>> loop for include-cycle.json
>>>
>>> Improve this to
>>>
>>> In file included from tests/qapi-schema/include-cycle.json:1:
>>> In file included from tests/qapi-schema/include-cycle-b.json:1:
>>> tests/qapi-schema/include-cycle-c.json:1: Inclusion loop for
>>> include-cycle.json
>>
>> Nice, and makes developing new qapi tests a little less painful since
>> it's less modification to qapi-schema/*.err additions.
>
> Probably not, as our make rule strips off $(SRC_PATH):
>
> @perl -p -e 's|\Q$(SRC_PATH)\E/||g' $*.test.err | diff -q
> $(SRC_PATH)/$*.err -
>
> I've kept that, because it might also occur in stack backtraces. I
> think.
I still recall having to hand-edit .err files when doing a naive "run
the test to get the failure, then 'mv' the bad files into the expected
filenames, then rerun the tests"; so I'm not sure if our make rule was
properly munging absolute names out of the file in the first place. I'm
not too fussed about it, though, as adding new tests is less frequent
and it's still fairly easy to learn if you did it right or not by
whether 'make check' succeeds.
>
>>> Signed-off-by: Markus Armbruster <address@hidden>
>>> ---
>>> scripts/qapi/common.py | 12 ++++++------
>>> tests/qapi-schema/include-no-file.err | 2 +-
>>> 2 files changed, 7 insertions(+), 7 deletions(-)
>>>
>>
>> Reviewed-by: Eric Blake <address@hidden>
>
> Thanks!
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH RFC 03/21] qapi: New classes QAPIGenC, QAPIGenH, QAPIGenDoc, (continued)
- [Qemu-devel] [PATCH RFC 03/21] qapi: New classes QAPIGenC, QAPIGenH, QAPIGenDoc, Markus Armbruster, 2018/02/02
- Re: [Qemu-devel] [PATCH RFC 03/21] qapi: New classes QAPIGenC, QAPIGenH, QAPIGenDoc, Eric Blake, 2018/02/02
- Re: [Qemu-devel] [PATCH RFC 03/21] qapi: New classes QAPIGenC, QAPIGenH, QAPIGenDoc, Markus Armbruster, 2018/02/03
- Re: [Qemu-devel] [PATCH RFC 03/21] qapi: New classes QAPIGenC, QAPIGenH, QAPIGenDoc, Eric Blake, 2018/02/05
- Re: [Qemu-devel] [PATCH RFC 03/21] qapi: New classes QAPIGenC, QAPIGenH, QAPIGenDoc, Markus Armbruster, 2018/02/06
- Re: [Qemu-devel] [PATCH RFC 03/21] qapi: New classes QAPIGenC, QAPIGenH, QAPIGenDoc, Marc-Andre Lureau, 2018/02/05
[Qemu-devel] [PATCH RFC 09/21] qapi: Don't absolutize include file name in error messages, Markus Armbruster, 2018/02/02
Re: [Qemu-devel] [PATCH RFC 09/21] qapi: Don't absolutize include file name in error messages, Marc-Andre Lureau, 2018/02/05
[Qemu-devel] [PATCH RFC 15/21] qapi: Record 'include' directives in intermediate representation, Markus Armbruster, 2018/02/02
[Qemu-devel] [PATCH RFC 13/21] qapi: Record 'include' directives in parse tree, Markus Armbruster, 2018/02/02
[Qemu-devel] [PATCH RFC 02/21] qapi: Generate up-to-date copyright notice, Markus Armbruster, 2018/02/02