From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VwDTy-0000fM-4D for qemu-devel@nongnu.org; Thu, 26 Dec 2013 11:08:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VwDTv-0002hs-Ur for qemu-devel@nongnu.org; Thu, 26 Dec 2013 11:08:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:7709) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VwDTv-0002hg-KU for qemu-devel@nongnu.org; Thu, 26 Dec 2013 11:08:19 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rBQG8IYk030630 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 26 Dec 2013 11:08:19 -0500 Date: Thu, 26 Dec 2013 18:12:25 +0200 From: "Michael S. Tsirkin" Message-ID: <20131226161225.GA9003@redhat.com> References: <1388060390-16447-1-git-send-email-marcel.a@redhat.com> <20131226124643.GA26225@redhat.com> <1388064268.17391.3.camel@localhost.localdomain> <20131226135325.GA16506@redhat.com> <1388066998.17391.10.camel@localhost.localdomain> <20131226154103.GA8701@redhat.com> <1388073489.17391.20.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1388073489.17391.20.camel@localhost.localdomain> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 0/2] acpi unit-test: rebuild aml files functionality List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcel Apfelbaum Cc: qemu-devel@nongnu.org On Thu, Dec 26, 2013 at 05:58:09PM +0200, Marcel Apfelbaum wrote: > On Thu, 2013-12-26 at 17:41 +0200, Michael S. Tsirkin wrote: > > On Thu, Dec 26, 2013 at 04:09:58PM +0200, Marcel Apfelbaum wrote: > > > On Thu, 2013-12-26 at 15:53 +0200, Michael S. Tsirkin wrote: > > > > On Thu, Dec 26, 2013 at 03:24:28PM +0200, Marcel Apfelbaum wrote: > > > > > On Thu, 2013-12-26 at 14:46 +0200, Michael S. Tsirkin wrote: > > > > > > On Thu, Dec 26, 2013 at 02:19:48PM +0200, Marcel Apfelbaum wr= ote: > > > > > > > Acpi unit-test will fail every time the acpi tables change. > > > > > > >=20 > > > > > > > The series adds a script that rebuilds the expected aml fil= es, so the test > > > > > > > will pass. It also validates the modifications. > > > > > > >=20 > > > > > > > The acpi unit test will rebuild the aml tables if TEST_ACPI= _REBUILD_AML > > > > > > > environment variable is set. > > > > > >=20 > > > > > > OK I had to fix some trailing whitespace, otherwise > > > > > > looks good. > > > > > > I applied it all, pls check the pci branch. > > > > > Thanks! > > > > > I pulled the pci branch, but I did not see the patches yet.=20 > > > > > I used git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git, > > > > > pci branch. > > > > >=20 > > > > > Thanks, > > > > > Marcel > > > >=20 > > > >=20 > > > > Actually had to revert. Build fails with recent gcc: > > > Strange, I update the gcc to the Fedora's latest 4.8.2 and > > > it still doesn't happen. > > > Anyway, I use qemu_write_full as advised and resent. > > >=20 > > > Thanks, > > > Marcel > >=20 > > OK I applied this for now but I see an issue: iasl crashes below. > Thanks! > By the way, I resend the whole series, I hope you used it. yes pushed, take a look > > I think this happens when we run it on a file > > it does not understand. > > It's an iasl bug but would be nice to work around > > it in some way (and it would be nice to report to > > robert moore) >=20 > I cannot reproduce it, I'll try anyway.=20 > By the way, the test checks if iasl exits with error, > so it should handle this gracefully. (I hope!) >=20 > Regarding the IASL project, I'll see if I can open a bug, no, just send mail. > (if I can reproduce it, otherwise I risk they'll ask some > questions I cannot answer...) >=20 > Thanks, > Marcel This is on fedora 19, 32 bit. > >=20 > >=20 > > *** Error in `/usr/bin/iasl': double free or corruption (!prev): 0x08= 81bc98 *** > > =3D=3D=3D=3D=3D=3D=3D Backtrace: =3D=3D=3D=3D=3D=3D=3D=3D=3D > > /lib/libc.so.6[0x46205d12] > > /usr/bin/iasl[0x80a5a66] > > /usr/bin/iasl[0x80a2717] > > /usr/bin/iasl[0x80a284b] > > /usr/bin/iasl[0x805bf32] > > /usr/bin/iasl[0x8072352] > > /usr/bin/iasl[0x80726c1] > > /usr/bin/iasl[0x80725f5] > > /usr/bin/iasl[0x80491a9] > > /lib/libc.so.6(__libc_start_main+0xf3)[0x461a9963] > > /usr/bin/iasl[0x80491fd] > > =3D=3D=3D=3D=3D=3D=3D Memory map: =3D=3D=3D=3D=3D=3D=3D=3D > > 08047000-0810d000 r-xp 00000000 08:06 48242 /usr/bin/iasl > > 0810d000-0810e000 r--p 000c5000 08:06 48242 /usr/bin/iasl > > 0810e000-0810f000 rw-p 000c6000 08:06 48242 /usr/bin/iasl > > 0810f000-08113000 rw-p 00000000 00:00 0=20 > > 087f7000-08839000 rw-p 00000000 00:00 0 [heap] > > 4616d000-4618c000 r-xp 00000000 08:06 4415 /usr/lib/ld-2.17.so > > 4618c000-4618d000 r--p 0001e000 08:06 4415 /usr/lib/ld-2.17.so > > 4618d000-4618e000 rw-p 0001f000 08:06 4415 /usr/lib/ld-2.17.so > > 46190000-46348000 r-xp 00000000 08:06 4643 /usr/lib/libc-2.17.s= o > > 46348000-46349000 ---p 001b8000 08:06 4643 /usr/lib/libc-2.17.s= o > > 46349000-4634b000 r--p 001b8000 08:06 4643 /usr/lib/libc-2.17.s= o > > 4634b000-4634c000 rw-p 001ba000 08:06 4643 /usr/lib/libc-2.17.s= o > > 4634c000-4634f000 rw-p 00000000 00:00 0=20 > > 463d2000-463ed000 r-xp 00000000 08:06 51367 /usr/lib/libgcc_s-4.= 8.2-20131212.so.1 > > 463ed000-463ee000 r--p 0001a000 08:06 51367 /usr/lib/libgcc_s-4.= 8.2-20131212.so.1 > > 463ee000-463ef000 rw-p 0001b000 08:06 51367 /usr/lib/libgcc_s-4.= 8.2-20131212.so.1 > > b7741000-b7742000 rw-p 00000000 00:00 0=20 > > b776c000-b776f000 rw-p 00000000 00:00 0=20 > > b776f000-b7770000 r-xp 00000000 00:00 0 [vdso] > > bfc6f000-bfc91000 rw-p 00000000 00:00 0 [stack] > > *** Error in `/usr/bin/iasl': double free or corruption (!prev): 0x09= 286cd8 *** > > =3D=3D=3D=3D=3D=3D=3D Backtrace: =3D=3D=3D=3D=3D=3D=3D=3D=3D > > /lib/libc.so.6[0x46205d12] > > /usr/bin/iasl[0x80a5a66] > > /usr/bin/iasl[0x80a2717] > > /usr/bin/iasl[0x80a284b] > > /usr/bin/iasl[0x805bf32] > > /usr/bin/iasl[0x8072352] > > /usr/bin/iasl[0x80726c1] > > /usr/bin/iasl[0x80725f5] > > /usr/bin/iasl[0x80491a9] > > /lib/libc.so.6(__libc_start_main+0xf3)[0x461a9963] > > /usr/bin/iasl[0x80491fd] > > =3D=3D=3D=3D=3D=3D=3D Memory map: =3D=3D=3D=3D=3D=3D=3D=3D > > 08047000-0810d000 r-xp 00000000 08:06 48242 /usr/bin/iasl > > 0810d000-0810e000 r--p 000c5000 08:06 48242 /usr/bin/iasl > > 0810e000-0810f000 rw-p 000c6000 08:06 48242 /usr/bin/iasl > > 0810f000-08113000 rw-p 00000000 00:00 0=20 > > 09262000-092a4000 rw-p 00000000 00:00 0 [heap] > > 4616d000-4618c000 r-xp 00000000 08:06 4415 /usr/lib/ld-2.17.so > > 4618c000-4618d000 r--p 0001e000 08:06 4415 /usr/lib/ld-2.17.so > > 4618d000-4618e000 rw-p 0001f000 08:06 4415 /usr/lib/ld-2.17.so > > 46190000-46348000 r-xp 00000000 08:06 4643 /usr/lib/libc-2.17.s= o > > 46348000-46349000 ---p 001b8000 08:06 4643 /usr/lib/libc-2.17.s= o > > 46349000-4634b000 r--p 001b8000 08:06 4643 /usr/lib/libc-2.17.s= o > > 4634b000-4634c000 rw-p 001ba000 08:06 4643 /usr/lib/libc-2.17.s= o > > 4634c000-4634f000 rw-p 00000000 00:00 0=20 > > 463d2000-463ed000 r-xp 00000000 08:06 51367 /usr/lib/libgcc_s-4.= 8.2-20131212.so.1 > > 463ed000-463ee000 r--p 0001a000 08:06 51367 /usr/lib/libgcc_s-4.= 8.2-20131212.so.1 > > 463ee000-463ef000 rw-p 0001b000 08:06 51367 /usr/lib/libgcc_s-4.= 8.2-20131212.so.1 > > b774b000-b774c000 rw-p 00000000 00:00 0=20 > > b7776000-b7779000 rw-p 00000000 00:00 0=20 > > b7779000-b777a000 r-xp 00000000 00:00 0 [vdso] > > bfd37000-bfd59000 rw-p 00000000 00:00 0 [stack] > > *** Error in `/usr/bin/iasl': double free or corruption (!prev): 0x09= 587c58 *** > > =3D=3D=3D=3D=3D=3D=3D Backtrace: =3D=3D=3D=3D=3D=3D=3D=3D=3D > > /lib/libc.so.6[0x46205d12] > > /usr/bin/iasl[0x80a5a66] > > /usr/bin/iasl[0x80a2717] > > /usr/bin/iasl[0x80a284b] > > /usr/bin/iasl[0x805bf32] > > /usr/bin/iasl[0x8072352] > > /usr/bin/iasl[0x80726c1] > > /usr/bin/iasl[0x80725f5] > > /usr/bin/iasl[0x80491a9] > > /lib/libc.so.6(__libc_start_main+0xf3)[0x461a9963] > > /usr/bin/iasl[0x80491fd] > > =3D=3D=3D=3D=3D=3D=3D Memory map: =3D=3D=3D=3D=3D=3D=3D=3D > > 08047000-0810d000 r-xp 00000000 08:06 48242 /usr/bin/iasl > > 0810d000-0810e000 r--p 000c5000 08:06 48242 /usr/bin/iasl > > 0810e000-0810f000 rw-p 000c6000 08:06 48242 /usr/bin/iasl > > 0810f000-08113000 rw-p 00000000 00:00 0=20 > > 09563000-095a5000 rw-p 00000000 00:00 0 [heap] > > 4616d000-4618c000 r-xp 00000000 08:06 4415 /usr/lib/ld-2.17.so > > 4618c000-4618d000 r--p 0001e000 08:06 4415 /usr/lib/ld-2.17.so > > 4618d000-4618e000 rw-p 0001f000 08:06 4415 /usr/lib/ld-2.17.so > > 46190000-46348000 r-xp 00000000 08:06 4643 /usr/lib/libc-2.17.s= o > > 46348000-46349000 ---p 001b8000 08:06 4643 /usr/lib/libc-2.17.s= o > > 46349000-4634b000 r--p 001b8000 08:06 4643 /usr/lib/libc-2.17.s= o > > 4634b000-4634c000 rw-p 001ba000 08:06 4643 /usr/lib/libc-2.17.s= o > > 4634c000-4634f000 rw-p 00000000 00:00 0=20 > > 463d2000-463ed000 r-xp 00000000 08:06 51367 /usr/lib/libgcc_s-4.= 8.2-20131212.so.1 > > 463ed000-463ee000 r--p 0001a000 08:06 51367 /usr/lib/libgcc_s-4.= 8.2-20131212.so.1 > > 463ee000-463ef000 rw-p 0001b000 08:06 51367 /usr/lib/libgcc_s-4.= 8.2-20131212.so.1 > > b77af000-b77b0000 rw-p 00000000 00:00 0=20 > > b77da000-b77dd000 rw-p 00000000 00:00 0=20 > > b77dd000-b77de000 r-xp 00000000 00:00 0 [vdso] > > bfe96000-bfeb8000 rw-p 00000000 00:00 0 [stack] > > *** Error in `/usr/bin/iasl': double free or corruption (!prev): 0x09= 6c7c98 *** > > =3D=3D=3D=3D=3D=3D=3D Backtrace: =3D=3D=3D=3D=3D=3D=3D=3D=3D > > /lib/libc.so.6[0x46205d12] > > /usr/bin/iasl[0x80a5a66] > > /usr/bin/iasl[0x80a2717] > > /usr/bin/iasl[0x80a284b] > > /usr/bin/iasl[0x805bf32] > > /usr/bin/iasl[0x8072352] > > /usr/bin/iasl[0x80726c1] > > /usr/bin/iasl[0x80725f5] > > /usr/bin/iasl[0x80491a9] > > /lib/libc.so.6(__libc_start_main+0xf3)[0x461a9963] > > /usr/bin/iasl[0x80491fd] > > =3D=3D=3D=3D=3D=3D=3D Memory map: =3D=3D=3D=3D=3D=3D=3D=3D > > 08047000-0810d000 r-xp 00000000 08:06 48242 /usr/bin/iasl > > 0810d000-0810e000 r--p 000c5000 08:06 48242 /usr/bin/iasl > > 0810e000-0810f000 rw-p 000c6000 08:06 48242 /usr/bin/iasl > > 0810f000-08113000 rw-p 00000000 00:00 0=20 > > 096a3000-096e5000 rw-p 00000000 00:00 0 [heap] > > 4616d000-4618c000 r-xp 00000000 08:06 4415 /usr/lib/ld-2.17.so > > 4618c000-4618d000 r--p 0001e000 08:06 4415 /usr/lib/ld-2.17.so > > 4618d000-4618e000 rw-p 0001f000 08:06 4415 /usr/lib/ld-2.17.so > > 46190000-46348000 r-xp 00000000 08:06 4643 /usr/lib/libc-2.17.s= o > > 46348000-46349000 ---p 001b8000 08:06 4643 /usr/lib/libc-2.17.s= o > > 46349000-4634b000 r--p 001b8000 08:06 4643 /usr/lib/libc-2.17.s= o > > 4634b000-4634c000 rw-p 001ba000 08:06 4643 /usr/lib/libc-2.17.s= o > > 4634c000-4634f000 rw-p 00000000 00:00 0=20 > > 463d2000-463ed000 r-xp 00000000 08:06 51367 /usr/lib/libgcc_s-4.= 8.2-20131212.so.1 > > 463ed000-463ee000 r--p 0001a000 08:06 51367 /usr/lib/libgcc_s-4.= 8.2-20131212.so.1 > > 463ee000-463ef000 rw-p 0001b000 08:06 51367 /usr/lib/libgcc_s-4.= 8.2-20131212.so.1 > > b7714000-b7715000 rw-p 00000000 00:00 0=20 > > b773f000-b7742000 rw-p 00000000 00:00 0=20 > > b7742000-b7743000 r-xp 00000000 00:00 0 [vdso] > > bfc43000-bfc65000 rw-p 00000000 00:00 0 [stack] > > qemu: terminating on signal 15 from pid 8740 > > main-loop: WARNING: I/O thread spun for 1000 iterations > > *** Error in `/usr/bin/iasl': double free or corruption (!prev): 0x09= e5c3d0 *** > > =3D=3D=3D=3D=3D=3D=3D Backtrace: =3D=3D=3D=3D=3D=3D=3D=3D=3D > > /lib/libc.so.6[0x46205d12] > > /usr/bin/iasl[0x80a5a66] > > /usr/bin/iasl[0x80a2717] > > /usr/bin/iasl[0x80a284b] > > /usr/bin/iasl[0x805bf32] > > /usr/bin/iasl[0x8072352] > > /usr/bin/iasl[0x80726c1] > > /usr/bin/iasl[0x80725f5] > > /usr/bin/iasl[0x80491a9] > > /lib/libc.so.6(__libc_start_main+0xf3)[0x461a9963] > > /usr/bin/iasl[0x80491fd] > > =3D=3D=3D=3D=3D=3D=3D Memory map: =3D=3D=3D=3D=3D=3D=3D=3D > > 08047000-0810d000 r-xp 00000000 08:06 48242 /usr/bin/iasl > > 0810d000-0810e000 r--p 000c5000 08:06 48242 /usr/bin/iasl > > 0810e000-0810f000 rw-p 000c6000 08:06 48242 /usr/bin/iasl > > 0810f000-08113000 rw-p 00000000 00:00 0=20 > > 09e3c000-09e7e000 rw-p 00000000 00:00 0 [heap] > > 4616d000-4618c000 r-xp 00000000 08:06 4415 /usr/lib/ld-2.17.so > > 4618c000-4618d000 r--p 0001e000 08:06 4415 /usr/lib/ld-2.17.so > > 4618d000-4618e000 rw-p 0001f000 08:06 4415 /usr/lib/ld-2.17.so > > 46190000-46348000 r-xp 00000000 08:06 4643 /usr/lib/libc-2.17.s= o > > 46348000-46349000 ---p 001b8000 08:06 4643 /usr/lib/libc-2.17.s= o > > 46349000-4634b000 r--p 001b8000 08:06 4643 /usr/lib/libc-2.17.s= o > > 4634b000-4634c000 rw-p 001ba000 08:06 4643 /usr/lib/libc-2.17.s= o > > 4634c000-4634f000 rw-p 00000000 00:00 0=20 > > 463d2000-463ed000 r-xp 00000000 08:06 51367 /usr/lib/libgcc_s-4.= 8.2-20131212.so.1 > > 463ed000-463ee000 r--p 0001a000 08:06 51367 /usr/lib/libgcc_s-4.= 8.2-20131212.so.1 > > 463ee000-463ef000 rw-p 0001b000 08:06 51367 /usr/lib/libgcc_s-4.= 8.2-20131212.so.1 > > b777d000-b777e000 rw-p 00000000 00:00 0=20 > > b77a8000-b77ab000 rw-p 00000000 00:00 0=20 > > b77ab000-b77ac000 r-xp 00000000 00:00 0 [vdso] > > bfbb1000-bfbd3000 rw-p 00000000 00:00 0 [stack] > > *** Error in `/usr/bin/iasl': double free or corruption (!prev): 0x09= 26c410 *** > >=20 > >=20 > >=20 > > > >=20 > > > > ests/acpi-test.c: In function =E2=80=98dump_aml_files=E2=80=99: > > > > tests/acpi-test.c:392:14: error: ignoring return value of =E2=80=98= write=E2=80=99, > > > > declared with attribute warn_unused_result [-Werror=3Dunused-resu= lt] > > > > write(fd, sdt, sizeof(AcpiTableHeader)); > > > > ^ > > > > tests/acpi-test.c:393:14: error: ignoring return value of =E2=80=98= write=E2=80=99, > > > > declared with attribute warn_unused_result [-Werror=3Dunused-resu= lt] > > > > write(fd, sdt->aml, sdt->aml_len); > > > > ^ > > > > cc1: all warnings being treated as errors > > > > make: *** [tests/acpi-test.o] Error 1 > > > >=20 > > > > and it's true: you need to wrap write in a loop as it can > > > > write less than requested number of bytes. > > > > See qemu_write_full - can it be used it tests? > > > >=20 > > > > > > > v1 -> v2: > > > > > > > Addressed Michael S. Tsirkin's comments: > > > > > > > - added TEST_ prefix to the environment variable > > > > > > > - some rephrases > > > > > > >=20 > > > > > > > Marcel Apfelbaum (2): > > > > > > > acpi unit-test: added script to rebuild the expected aml = files > > > > > > > acpi unit-test: hook to rebuild expected aml files > > > > > > >=20 > > > > > > > tests/acpi-test-data/rebuild-expected-aml.sh | 36 ++++++++= ++++++++++++++++++++ > > > > > > > tests/acpi-test.c | 30 ++++++++= +++++++++++---- > > > > > > > 2 files changed, 61 insertions(+), 5 deletions(-) > > > > > > > create mode 100755 tests/acpi-test-data/rebuild-expected-a= ml.sh > > > > > > >=20 > > > > > > > --=20 > > > > > > > 1.8.3.1 > > > > > >=20 > > > > >=20 > > > > >=20 > > >=20 > > >=20 >=20 >=20