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 <mar...@redhat.com>
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 <dgilb...@redhat.com>
    Signed-off-by: Marcel Apfelbaum <mar...@redhat.com>
    Reviewed-by: Michael S. Tsirkin <m...@redhat.com>
    Signed-off-by: Michael S. Tsirkin <m...@redhat.com>


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: wei.y...@ucloud.cn



Reply via email to