From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VwBdl-0001qu-GW for qemu-devel@nongnu.org; Thu, 26 Dec 2013 09:10:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VwBdg-0000PZ-5B for qemu-devel@nongnu.org; Thu, 26 Dec 2013 09:10:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58857) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VwBdf-0000PP-Rp for qemu-devel@nongnu.org; Thu, 26 Dec 2013 09:10:16 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rBQEACQq022573 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 26 Dec 2013 09:10:15 -0500 Message-ID: <1388066998.17391.10.camel@localhost.localdomain> From: Marcel Apfelbaum Date: Thu, 26 Dec 2013 16:09:58 +0200 In-Reply-To: <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> <20131226135325.GA16506@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 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: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org 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 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= the test > > > > will pass. It also validates the modifications. > > > >=20 > > > > The acpi unit test will rebuild the aml tables if TEST_ACPI_REBUI= LD_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. Thanks, Marcel >=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=98writ= e=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=98writ= e=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 >=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-aml.sh > > > >=20 > > > > --=20 > > > > 1.8.3.1 > > >=20 > >=20 > >=20