qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] bios-tables-test: delete a assert about block n


From: wyang
Subject: Re: [Qemu-devel] [PATCH] bios-tables-test: delete a assert about block name
Date: Tue, 15 Aug 2017 11:53:29 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0


On 2017年08月15日 10:49, Michael S. Tsirkin wrote:
BTW sizeof(BLOCK_NAME_END) is actually 2. I think it works
because there's a space after ,. It is better to replace it with
strlen so it will work without a space too.

MST,

I double check the failure of assert, it has already been fixed by the following commit,

commit a3973f551dbee91f1f6f2c78e9942fb113b5d30b
Author: Marcel Apfelbaum <address@hidden>
Date:   Mon Apr 4 20:00:57 2016 +0300

    tests/bios-tables-test: fix assert

    Newer iasl does not add the aml file name to the Definition Block.
    See acpica tools commit  1ecbb3d5:
"Emit the AMLFilename as a zero-length string. Allows the compiler to create the name later -- making it easier to rename the parent ASL (DSL) file."

    That causes an assert in acpi tests:
tests/bios-tables-test.c:455:normalize_asl: assertion failed: (block_name)

Fix it by striping the start of the definition block line until the first comma.
    The block name is always the first parameter and
    the grammar does not allow comma in between, so it is safe.

    Reported-by: Dr. David Alan Gilbert <address@hidden>
    Signed-off-by: Marcel Apfelbaum <address@hidden>
    Reviewed-by: Michael S. Tsirkin <address@hidden>
    Signed-off-by: Michael S. Tsirkin <address@hidden>


I am sorry for my fault,  my qemu version does not contain the patch.:-(

Seems the only place, which needs to be fixed, is to replace sizeof with strlen. Just like what you said, it is not fault but just refinement.
If you need it, I am glad to send patch to fix it.

Wei

--
Wei Yang(杨伟)
Mobile: +86-13436682065
Email: address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]