From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VwBJf-0002s2-P4 for qemu-devel@nongnu.org; Thu, 26 Dec 2013 08:49:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VwBJa-0002nr-Di for qemu-devel@nongnu.org; Thu, 26 Dec 2013 08:49:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45573) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VwBJa-0002nn-5J for qemu-devel@nongnu.org; Thu, 26 Dec 2013 08:49:30 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rBQDnTIu015695 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 26 Dec 2013 08:49:29 -0500 Date: Thu, 26 Dec 2013 15:53:25 +0200 From: "Michael S. Tsirkin" Message-ID: <20131226135325.GA16506@redhat.com> References: <1388060390-16447-1-git-send-email-marcel.a@redhat.com> <20131226124643.GA26225@redhat.com> <1388064268.17391.3.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1388064268.17391.3.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 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 wrote: > > > Acpi unit-test will fail every time the acpi tables change. > > >=20 > > > The series adds a script that rebuilds the expected aml files, so t= he 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 Actually had to revert. Build fails with recent gcc: 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=98write=E2= =80=99, declared with attribute warn_unused_result [-Werror=3Dunused-result] write(fd, sdt, sizeof(AcpiTableHeader)); ^ tests/acpi-test.c:393:14: error: ignoring return value of =E2=80=98write=E2= =80=99, declared with attribute warn_unused_result [-Werror=3Dunused-result] write(fd, sdt->aml, sdt->aml_len); ^ cc1: all warnings being treated as errors make: *** [tests/acpi-test.o] Error 1 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? > > > 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-aml.sh > > >=20 > > > --=20 > > > 1.8.3.1 > >=20 >=20 >=20