acpi unit-test: rebuild aml files functionality
v2 cover acpi unit-test: rebuild aml files functionality
Acpi unit-test will fail every time the acpi tables change.
The series adds a script that rebuilds the expected aml files, so the test will pass. It also validates the modifications.
The acpi unit test will rebuild the aml tables if TEST_ACPI_REBUILD_AML environment variable is set.
v1 -> v2:
Addressed Michael S. Tsirkin's comments:
- added TEST_ prefix to the environment variable
- some rephrases
Marcel Apfelbaum (2):
acpi unit-test: added script to rebuild the expected aml files acpi unit-test: hook to rebuild expected aml files
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
Signature · 1 line
1.8.3.1
PATCH v2 1/2 acpi unit-test: added script to rebuild the expected aml files
Acpi unit-test will fail every time the acpi tables change. This script rebuild the expected aml files, so the test will pass. It also validates the modifications.
---
v1 -> v2:
Addressed Michael S. Tsirkin's comments:
- added TEST_ prefix to the environment variable
- some rephrases
tests/acpi-test-data/rebuild-expected-aml.sh | 36 ++++++++++++++++++++++++++++
1 file changed, 36 insertions(+) create mode 100755 tests/acpi-test-data/rebuild-expected-aml.sh
tests/acpi-test-data/rebuild-expected-aml.sh new file +36 -0
@@ -0,0 +1,36 @@ +#! /bin/bash + +# +# Rebuild expected AML files for acpi unit-test +# +# Copyright (c) 2013 Red Hat Inc. +# +# Authors: +# Marcel Apfelbaum <[email protected]> +# +# This work is licensed under the terms of the GNU GPLv2. +# See the COPYING.LIB file in the top-level directory. + +qemu= + +if [ -e x86_64-softmmu/qemu-system-x86_64 ]; then + qemu="x86_64-softmmu/qemu-system-x86_64" +elif [ -e i386-softmmu/qemu-system-i386 ]; then + qemu="i386-softmmu/qemu-system-i386" +else + echo "Run 'make' to build the qemu exectutable!" + echo "Run this script from the build directory." + exit 1; +fi + +if [ ! -e "tests/acpi-test" ]; then + echo "Test: acpi-test is required! Run make check before this script." + echo "Run this script from the build directory." + exit 1; +fi + +TEST_ACPI_REBUILD_AML=y QTEST_QEMU_BINARY=$qemu tests/acpi-test + +echo "The files were rebuilt and can be added to git." +echo "However, if new files were created, please copy them manually" \ + "to tests/acpi-test-data/pc/ or tests/acpi-test-data/q35/ ."
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH v2 1/2] acpi unit-test: added script to rebuild the expected aml files
Quoted 21 lines · Marcel Apfelbaum
Acpi unit-test will fail every time the acpi tables change. This script rebuild the expected aml files, so the test will pass. It also validates the modifications.
Signed-off-by Marcel Apfelbaum <[email protected]>---
v1 -> v2:
Addressed Michael S. Tsirkin's comments:
- addedTEST_prefix to the environment variable
- some rephrases
tests/acpi-test-data/rebuild-expected-aml.sh| 36 ++++++++++++++++++++++++++++1 file changed, 36 insertions(+) create mode 100755 tests/acpi-test-data/rebuild-expected-aml.shtests/acpi-test-data/rebuild-expected-aml.sh new file +0
-0
tests/acpi-test-data/rebuild-expected-aml.sh line 4
Quoted 4 lines
tests/acpi-test-data/rebuild-expected-aml.sh new file +4
-0@@ -0,0 +1,36 @@ +#! /bin/bash + +# +# Rebuild expected AML files for acpi unit-test
trailing space here
Quoted 34 lines
tests/acpi-test-data/rebuild-expected-aml.sh new file +32
-0+# +# Copyright (c) 2013 Red Hat Inc. +# +# Authors: +# Marcel Apfelbaum <[email protected]> +# +# This work is licensed under the terms of the GNU GPLv2. +# See the COPYING.LIB file in the top-level directory. + +qemu= + +if [ -e x86_64-softmmu/qemu-system-x86_64 ]; then + qemu="x86_64-softmmu/qemu-system-x86_64" +elif [ -e i386-softmmu/qemu-system-i386 ]; then + qemu="i386-softmmu/qemu-system-i386" +else + echo "Run 'make' to build the qemu exectutable!" + echo "Run this script from the build directory." + exit 1; +fi + +if [ ! -e "tests/acpi-test" ]; then + echo "Test: acpi-test is required! Run make check before this script." + echo "Run this script from the build directory." + exit 1; +fi + +TEST_ACPI_REBUILD_AML=y QTEST_QEMU_BINARY=$qemu tests/acpi-test + +echo "The files were rebuilt and can be added to git." +echo "However, if new files were created, please copy them manually" \ + "to tests/acpi-test-data/pc/ or tests/acpi-test-data/q35/ ."Signature · 1 line
1.8.3.1
PATCH v2 2/2 acpi unit-test: hook to rebuild expected aml files
In reply to Marcel ApfelbaumWhen running the test with TEST_ACPI_REBUILD_AML=y environment variable, the test will rebuild and validate the expected aml files.
---
v1 -> v2:
Addressed Michael S. Tsirkin's comments:
- added TEST_ prefix to the environment variable
tests/acpi-test.c | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-)
tests/acpi-test.c +25 -5
@@ -13,6 +13,7 @@#include <string.h> #include <stdio.h> #include <glib.h> +#include <glib/gstdio.h> #include "qemu-common.h" #include "libqtest.h" #include "qemu/compiler.h"
@@ -21,6 +22,8 @@#define MACHINE_PC "pc"#define MACHINE_Q35 "q35" +#define ACPI_REBUILD_EXPECTED_AML "TEST_ACPI_REBUILD_AML" +/* DSDT and SSDTs format */ typedef struct { AcpiTableHeader header;
@@ -363,10 +366,11 @@ static void test_acpi_ssdt_tables(test_data *data) } } -static void dump_aml_files (test_data *data) +static void dump_aml_files (test_data *data,bool rebuild) {AcpiSdtTable *sdt;GError *error =NULL ; +gchar *aml_file =NULL ;gint fd;int i;
@@ -374,12 +378,24 @@ static void dump_aml_files(test_data *data) sdt = &g_array_index (data->ssdt_tables, AcpiSdtTable, i);g_assert (sdt->aml); - fd =g_file_open_tmp ("aml-XXXXXX" , &sdt->aml_file, &error); -g_assert_no_error (error); +if (rebuild) { + aml_file =g_strdup_printf ("%s/%s/%.4s" , data_dir, data->machine, + (gchar *)&sdt->header.signature); + fd =g_open (aml_file,O_WRONLY |O_TRUNC |O_CREAT , +S_IRUSR |S_IWUSR |S_IRGRP |S_IWGRP |S_IROTH ); + }else { + fd =g_file_open_tmp ("aml-XXXXXX" , &sdt->aml_file, &error); +g_assert_no_error (error); + } +g_assert (fd >=0 );write (fd, sdt,sizeof (AcpiTableHeader));write (fd, sdt->aml, sdt->aml_len);close (fd); + +if (aml_file) { +g_free (aml_file); + } } }
@@ -487,7 +503,7 @@ static void test_acpi_asl(test_data *data)memset (&exp_data,0 ,sizeof (exp_data)); exp_data.ssdt_tables =load_expected_aml (data); -dump_aml_files (data); +dump_aml_files (data, false);for (i =0 ; i < data->ssdt_tables->len; ++i) {GString *asl, *exp_asl;
@@ -553,7 +569,11 @@ static void test_acpi_one(const char *params, test_data *data)test_acpi_ssdt_tables (data);if (iasl) { -test_acpi_asl (data); +if (getenv (ACPI_REBUILD_EXPECTED_AML )) { +dump_aml_files (data, true); + }else { +test_acpi_asl (data); + } }qtest_quit (global_qtest);
Signature · 1 line
1.8.3.1
Quoted 7 lines · Marcel Apfelbaum
Acpi unit-test will fail every time the acpi tables change.
The series adds a script that rebuilds the expected aml files, so the test will pass. It also validates the modifications.
The acpi unit test will rebuild the aml tables if
TEST_ACPI_REBUILD_AMLenvironment variable is set.
OK I had to fix some trailing whitespace, otherwise looks good.
I applied it all, pls check the pci branch.
Quoted 16 lines
v1 -> v2:
Addressed Michael S. Tsirkin's comments:
- addedTEST_prefix to the environment variable
- some rephrasesMarcel Apfelbaum (2):
acpi unit-test: added script to rebuild the expected aml files acpi unit-test: hook to rebuild expected aml filestests/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.shSignature · 1 line
1.8.3.1
Quoted 6 lines · Michael S. Tsirkin
Quoted 5 lines · Marcel Apfelbaum
Acpi unit-test will fail every time the acpi tables change.
The series adds a script that rebuilds the expected aml files, so the test will pass. It also validates the modifications.
Quoted 6 lines
Quoted 2 lines
The acpi unit test will rebuild the aml tables if
TEST_ACPI_REBUILD_AMLenvironment variable is set.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. I used git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git,
pci branch.
Thanks,
Marcel
Quoted 17 lines
Quoted 16 lines
v1 -> v2:
Addressed Michael S. Tsirkin's comments:
- addedTEST_prefix to the environment variable
- some rephrasesMarcel Apfelbaum (2):
acpi unit-test: added script to rebuild the expected aml files acpi unit-test: hook to rebuild expected aml filestests/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.shSignature · 1 line
1.8.3.1
Quoted 13 lines · Marcel Apfelbaum
Quoted 6 lines · Michael S. Tsirkin
Quoted 5 lines · Marcel Apfelbaum
Acpi unit-test will fail every time the acpi tables change.
The series adds a script that rebuilds the expected aml files, so the test will pass. It also validates the modifications.
Quoted 6 lines
Quoted 2 lines
The acpi unit test will rebuild the aml tables if
TEST_ACPI_REBUILD_AMLenvironment variable is set.OK I had to fix some trailing whitespace, otherwise looks good.
I applied it all, pls check the pci branch.
Quoted 7 lines
Thanks!
I pulled the pci branch, but I did not see the patches yet. I usedgit://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git,
pci branch.Thanks,
Marcel
Actually had to revert. Build fails with recent gcc:
ests/acpi-test.c: In function ‘dump_aml_files’:tests/acpi-test.c:392:14: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
write(fd, sdt, sizeof(AcpiTableHeader));
^
tests/acpi-test.c:393:14: error: ignoring return value of ‘write’,
declared with attribute warn_unused_result [-Werror=unused-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?
Quoted 19 lines
Quoted 17 lines
Quoted 16 lines
v1 -> v2:
Addressed Michael S. Tsirkin's comments:
- addedTEST_prefix to the environment variable
- some rephrasesMarcel Apfelbaum (2):
acpi unit-test: added script to rebuild the expected aml files acpi unit-test: hook to rebuild expected aml filestests/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.shSignature · 1 line
1.8.3.1
Quoted 19 lines · Michael S. Tsirkin
Quoted 18 lines · Marcel Apfelbaum
Quoted 6 lines · Michael S. Tsirkin
Quoted 5 lines · Marcel Apfelbaum
Acpi unit-test will fail every time the acpi tables change.
The series adds a script that rebuilds the expected aml files, so the test will pass. It also validates the modifications.
Quoted 6 lines
Quoted 2 lines
The acpi unit test will rebuild the aml tables if
TEST_ACPI_REBUILD_AMLenvironment variable is set.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. I usedgit://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git,
pci branch.
Quoted 5 lines
Quoted 2 lines
Thanks,
MarcelActually 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
Quoted 36 lines
ests/acpi-test.c: In function ‘dump_aml_files’:tests/acpi-test.c:392:14: error: ignoring return value of ‘write’, declared with attributewarn_unused_result[-Werror=unused-result]write(fd, sdt, sizeof(AcpiTableHeader)); ^ tests/acpi-test.c:393:14: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result] write(fd, sdt->aml, sdt->aml_len); ^cc1: all warnings being treated as errors
make: *** [tests/acpi-test.o] Error 1and it's true: you need to wrap write in a loop as it can write less than requested number of bytes.
Seeqemu_write_full- can it be used it tests?Quoted 19 lines
Quoted 17 lines
Quoted 16 lines
v1 -> v2:
Addressed Michael S. Tsirkin's comments:
- addedTEST_prefix to the environment variable
- some rephrasesMarcel Apfelbaum (2):
acpi unit-test: added script to rebuild the expected aml files acpi unit-test: hook to rebuild expected aml filestests/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.shSignature · 1 line
1.8.3.1
Quoted 24 lines · Marcel Apfelbaum
Quoted 23 lines · Michael S. Tsirkin
Quoted 20 lines · Marcel Apfelbaum
Quoted 6 lines · Michael S. Tsirkin
Quoted 5 lines · Marcel Apfelbaum
Acpi unit-test will fail every time the acpi tables change.
The series adds a script that rebuilds the expected aml files, so the test will pass. It also validates the modifications.
Quoted 6 lines
Quoted 2 lines
The acpi unit test will rebuild the aml tables if
TEST_ACPI_REBUILD_AMLenvironment variable is set.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. I usedgit://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git,
pci branch.Thanks,
Marcel
Quoted 7 lines
Quoted 1 line
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 useqemu_write_fullas advised and resent.Thanks,
Marcel
OK I applied this for now but I see an issue: iasl crashes below. 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)
*** Error in `/usr/bin/iasl': double free or corruption (!prev): 0x0881bc98 *** ======= Backtrace: =========
/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]
======= Memory map: ========
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 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.so 46348000-46349000 ---p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 46349000-4634b000 r--p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 4634b000-4634c000 rw-p 001ba000 08:06 4643 /usr/lib/libc-2.17.so 4634c000-4634f000 rw-p 00000000 00:00 0 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
b776c000-b776f000 rw-p 00000000 00:00 0
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): 0x09286cd8 *** ======= Backtrace: =========
/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]
======= Memory map: ========
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 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.so 46348000-46349000 ---p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 46349000-4634b000 r--p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 4634b000-4634c000 rw-p 001ba000 08:06 4643 /usr/lib/libc-2.17.so 4634c000-4634f000 rw-p 00000000 00:00 0 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
b7776000-b7779000 rw-p 00000000 00:00 0
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): 0x09587c58 *** ======= Backtrace: =========
/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]
======= Memory map: ========
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 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.so 46348000-46349000 ---p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 46349000-4634b000 r--p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 4634b000-4634c000 rw-p 001ba000 08:06 4643 /usr/lib/libc-2.17.so 4634c000-4634f000 rw-p 00000000 00:00 0 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
b77da000-b77dd000 rw-p 00000000 00:00 0
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): 0x096c7c98 *** ======= Backtrace: =========
/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]
======= Memory map: ========
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 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.so 46348000-46349000 ---p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 46349000-4634b000 r--p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 4634b000-4634c000 rw-p 001ba000 08:06 4643 /usr/lib/libc-2.17.so 4634c000-4634f000 rw-p 00000000 00:00 0 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
b773f000-b7742000 rw-p 00000000 00:00 0
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): 0x09e5c3d0 *** ======= Backtrace: =========
/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]
======= Memory map: ========
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 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.so 46348000-46349000 ---p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 46349000-4634b000 r--p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 4634b000-4634c000 rw-p 001ba000 08:06 4643 /usr/lib/libc-2.17.so 4634c000-4634f000 rw-p 00000000 00:00 0 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
b77a8000-b77ab000 rw-p 00000000 00:00 0
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): 0x0926c410 ***
Quoted 38 lines
Quoted 36 lines
ests/acpi-test.c: In function ‘dump_aml_files’:tests/acpi-test.c:392:14: error: ignoring return value of ‘write’, declared with attributewarn_unused_result[-Werror=unused-result]write(fd, sdt, sizeof(AcpiTableHeader)); ^ tests/acpi-test.c:393:14: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result] write(fd, sdt->aml, sdt->aml_len); ^cc1: all warnings being treated as errors
make: *** [tests/acpi-test.o] Error 1and it's true: you need to wrap write in a loop as it can write less than requested number of bytes.
Seeqemu_write_full- can it be used it tests?Quoted 19 lines
Quoted 17 lines
Quoted 16 lines
v1 -> v2:
Addressed Michael S. Tsirkin's comments:
- addedTEST_prefix to the environment variable
- some rephrasesMarcel Apfelbaum (2):
acpi unit-test: added script to rebuild the expected aml files acpi unit-test: hook to rebuild expected aml filestests/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.shSignature · 1 line
1.8.3.1
Quoted 26 lines · Michael S. Tsirkin
Quoted 25 lines · Marcel Apfelbaum
Quoted 24 lines · Michael S. Tsirkin
Quoted 13 lines · Marcel Apfelbaum
Quoted 6 lines · Michael S. Tsirkin
Quoted 5 lines · Marcel Apfelbaum
Acpi unit-test will fail every time the acpi tables change.
The series adds a script that rebuilds the expected aml files, so the test will pass. It also validates the modifications.
Quoted 6 lines
Quoted 2 lines
The acpi unit test will rebuild the aml tables if
TEST_ACPI_REBUILD_AMLenvironment variable is set.OK I had to fix some trailing whitespace, otherwise looks good.
I applied it all, pls check the pci branch.Quoted 7 lines
Thanks!
I pulled the pci branch, but I did not see the patches yet. I usedgit://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git,
pci branch.Thanks,
MarcelActually had to revert. Build fails with recent gcc:
Quoted 8 lines
Quoted 6 lines
Strange, I update the gcc to the Fedora's latest 4.8.2 and it still doesn't happen.
Anyway, I useqemu_write_fullas advised and resent.Thanks,
MarcelOK 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.
Quoted 5 lines
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)
I cannot reproduce it, I'll try anyway.
By the way, the test checks if iasl exits with error, so it should handle this gracefully. (I hope!)
Regarding the IASL project, I'll see if I can open a bug, (if I can reproduce it, otherwise I risk they'll ask some questions I cannot answer...)
Thanks,
Marcel
Quoted 216 lines
*** Error in `/usr/bin/iasl': double free or corruption (!prev):
0x0881bc98*** ======= Backtrace: =========
/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]
======= Memory map: ========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 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.so 46348000-46349000 ---p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 46349000-4634b000 r--p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 4634b000-4634c000 rw-p 001ba000 08:06 4643 /usr/lib/libc-2.17.so 4634c000-4634f000 rw-p 00000000 00:00 0 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.1b7741000-b7742000 rw-p 00000000 00:00 0
b776c000-b776f000 rw-p 00000000 00:00 0
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):0x09286cd8*** ======= Backtrace: =========
/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]
======= Memory map: ========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 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.so 46348000-46349000 ---p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 46349000-4634b000 r--p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 4634b000-4634c000 rw-p 001ba000 08:06 4643 /usr/lib/libc-2.17.so 4634c000-4634f000 rw-p 00000000 00:00 0 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.1b774b000-b774c000 rw-p 00000000 00:00 0
b7776000-b7779000 rw-p 00000000 00:00 0
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):0x09587c58*** ======= Backtrace: =========
/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]
======= Memory map: ========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 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.so 46348000-46349000 ---p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 46349000-4634b000 r--p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 4634b000-4634c000 rw-p 001ba000 08:06 4643 /usr/lib/libc-2.17.so 4634c000-4634f000 rw-p 00000000 00:00 0 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.1b77af000-b77b0000 rw-p 00000000 00:00 0
b77da000-b77dd000 rw-p 00000000 00:00 0
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):0x096c7c98*** ======= Backtrace: =========
/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]
======= Memory map: ========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 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.so 46348000-46349000 ---p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 46349000-4634b000 r--p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 4634b000-4634c000 rw-p 001ba000 08:06 4643 /usr/lib/libc-2.17.so 4634c000-4634f000 rw-p 00000000 00:00 0 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.1b7714000-b7715000 rw-p 00000000 00:00 0
b773f000-b7742000 rw-p 00000000 00:00 0
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):0x09e5c3d0*** ======= Backtrace: =========
/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]
======= Memory map: ========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 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.so 46348000-46349000 ---p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 46349000-4634b000 r--p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 4634b000-4634c000 rw-p 001ba000 08:06 4643 /usr/lib/libc-2.17.so 4634c000-4634f000 rw-p 00000000 00:00 0 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.1b777d000-b777e000 rw-p 00000000 00:00 0
b77a8000-b77ab000 rw-p 00000000 00:00 0
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):0x0926c410***Quoted 38 lines
Quoted 36 lines
ests/acpi-test.c: In function ‘dump_aml_files’:tests/acpi-test.c:392:14: error: ignoring return value of ‘write’, declared with attributewarn_unused_result[-Werror=unused-result]write(fd, sdt, sizeof(AcpiTableHeader)); ^ tests/acpi-test.c:393:14: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result] write(fd, sdt->aml, sdt->aml_len); ^cc1: all warnings being treated as errors
make: *** [tests/acpi-test.o] Error 1and it's true: you need to wrap write in a loop as it can write less than requested number of bytes.
Seeqemu_write_full- can it be used it tests?Quoted 19 lines
Quoted 17 lines
Quoted 16 lines
v1 -> v2:
Addressed Michael S. Tsirkin's comments:
- addedTEST_prefix to the environment variable
- some rephrasesMarcel Apfelbaum (2):
acpi unit-test: added script to rebuild the expected aml files acpi unit-test: hook to rebuild expected aml filestests/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.shSignature · 1 line
1.8.3.1
Quoted 31 lines · Marcel Apfelbaum
Quoted 30 lines · Michael S. Tsirkin
Quoted 29 lines · Marcel Apfelbaum
Quoted 19 lines · Michael S. Tsirkin
Quoted 18 lines · Marcel Apfelbaum
Quoted 6 lines · Michael S. Tsirkin
Quoted 5 lines · Marcel Apfelbaum
Acpi unit-test will fail every time the acpi tables change.
The series adds a script that rebuilds the expected aml files, so the test will pass. It also validates the modifications.
Quoted 6 lines
Quoted 2 lines
The acpi unit test will rebuild the aml tables if
TEST_ACPI_REBUILD_AMLenvironment variable is set.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. I usedgit://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git,
pci branch.Quoted 5 lines
Quoted 2 lines
Thanks,
MarcelActually 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 useqemu_write_fullas advised and resent.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Thanks,
MarcelOK 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
Quoted 11 lines
Quoted 5 lines
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)I cannot reproduce it, I'll try anyway.
By the way, the test checks if iasl exits with error, so it should handle this gracefully. (I hope!)Regarding the IASL project, I'll see if I can open a bug,
no, just send mail.
Quoted 5 lines
(if I can reproduce it, otherwise I risk they'll ask some questions I cannot answer...)
Thanks,
Marcel
This is on fedora 19, 32 bit.
Quoted 218 lines
Quoted 216 lines
*** Error in `/usr/bin/iasl': double free or corruption (!prev):
0x0881bc98*** ======= Backtrace: =========
/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]
======= Memory map: ========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 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.so 46348000-46349000 ---p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 46349000-4634b000 r--p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 4634b000-4634c000 rw-p 001ba000 08:06 4643 /usr/lib/libc-2.17.so 4634c000-4634f000 rw-p 00000000 00:00 0 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.1b7741000-b7742000 rw-p 00000000 00:00 0
b776c000-b776f000 rw-p 00000000 00:00 0
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):0x09286cd8*** ======= Backtrace: =========
/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]
======= Memory map: ========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 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.so 46348000-46349000 ---p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 46349000-4634b000 r--p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 4634b000-4634c000 rw-p 001ba000 08:06 4643 /usr/lib/libc-2.17.so 4634c000-4634f000 rw-p 00000000 00:00 0 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.1b774b000-b774c000 rw-p 00000000 00:00 0
b7776000-b7779000 rw-p 00000000 00:00 0
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):0x09587c58*** ======= Backtrace: =========
/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]
======= Memory map: ========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 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.so 46348000-46349000 ---p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 46349000-4634b000 r--p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 4634b000-4634c000 rw-p 001ba000 08:06 4643 /usr/lib/libc-2.17.so 4634c000-4634f000 rw-p 00000000 00:00 0 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.1b77af000-b77b0000 rw-p 00000000 00:00 0
b77da000-b77dd000 rw-p 00000000 00:00 0
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):0x096c7c98*** ======= Backtrace: =========
/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]
======= Memory map: ========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 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.so 46348000-46349000 ---p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 46349000-4634b000 r--p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 4634b000-4634c000 rw-p 001ba000 08:06 4643 /usr/lib/libc-2.17.so 4634c000-4634f000 rw-p 00000000 00:00 0 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.1b7714000-b7715000 rw-p 00000000 00:00 0
b773f000-b7742000 rw-p 00000000 00:00 0
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):0x09e5c3d0*** ======= Backtrace: =========
/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]
======= Memory map: ========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 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.so 46348000-46349000 ---p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 46349000-4634b000 r--p 001b8000 08:06 4643 /usr/lib/libc-2.17.so 4634b000-4634c000 rw-p 001ba000 08:06 4643 /usr/lib/libc-2.17.so 4634c000-4634f000 rw-p 00000000 00:00 0 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.1b777d000-b777e000 rw-p 00000000 00:00 0
b77a8000-b77ab000 rw-p 00000000 00:00 0
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):0x0926c410***Quoted 38 lines
Quoted 36 lines
ests/acpi-test.c: In function ‘dump_aml_files’:tests/acpi-test.c:392:14: error: ignoring return value of ‘write’, declared with attributewarn_unused_result[-Werror=unused-result]write(fd, sdt, sizeof(AcpiTableHeader)); ^ tests/acpi-test.c:393:14: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result] write(fd, sdt->aml, sdt->aml_len); ^cc1: all warnings being treated as errors
make: *** [tests/acpi-test.o] Error 1and it's true: you need to wrap write in a loop as it can write less than requested number of bytes.
Seeqemu_write_full- can it be used it tests?Quoted 19 lines
Quoted 17 lines
Quoted 16 lines
v1 -> v2:
Addressed Michael S. Tsirkin's comments:
- addedTEST_prefix to the environment variable
- some rephrasesMarcel Apfelbaum (2):
acpi unit-test: added script to rebuild the expected aml files acpi unit-test: hook to rebuild expected aml filestests/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.shSignature · 1 line
1.8.3.1
Quoted 55 lines · Michael S. Tsirkin
Quoted 31 lines · Marcel Apfelbaum
Quoted 30 lines · Michael S. Tsirkin
Quoted 29 lines · Marcel Apfelbaum
Quoted 19 lines · Michael S. Tsirkin
Quoted 18 lines · Marcel Apfelbaum
Quoted 6 lines · Michael S. Tsirkin
Quoted 5 lines · Marcel Apfelbaum
Acpi unit-test will fail every time the acpi tables change.
The series adds a script that rebuilds the expected aml files, so the test will pass. It also validates the modifications.
Quoted 6 lines
Quoted 2 lines
The acpi unit test will rebuild the aml tables if
TEST_ACPI_REBUILD_AMLenvironment variable is set.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. I usedgit://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git,
pci branch.Quoted 5 lines
Quoted 2 lines
Thanks,
MarcelActually 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 useqemu_write_fullas advised and resent.Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Thanks,
MarcelOK 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
Quoted 11 lines
Quoted 5 lines
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)I cannot reproduce it, I'll try anyway.
By the way, the test checks if iasl exits with error, so it should handle this gracefully. (I hope!)Regarding the IASL project, I'll see if I can open a bug,
no, just send mail.
Quoted 7 lines
Quoted 5 lines
(if I can reproduce it, otherwise I risk they'll ask some questions I cannot answer...)
Thanks,
MarcelThis is on fedora 19, 32 bit.
I see that the issue is with HPET table.
iasl -e DSDT -e SSDT -d HPET
crashes for me
iasl -d HPET
does not crash
I think that only DSDT and SSDT need -e.
Just skip -e for anything that is not an SSDT
and not a DSDT.
Signature · 1 line
MST
Quoted 70 lines · Michael S. Tsirkin
Quoted 55 lines · Michael S. Tsirkin
Quoted 31 lines · Marcel Apfelbaum
Quoted 30 lines · Michael S. Tsirkin
Quoted 29 lines · Marcel Apfelbaum
Quoted 19 lines · Michael S. Tsirkin
Quoted 18 lines · Marcel Apfelbaum
Quoted 6 lines · Michael S. Tsirkin
Quoted 5 lines · Marcel Apfelbaum
Acpi unit-test will fail every time the acpi tables change.
The series adds a script that rebuilds the expected aml files, so the test will pass. It also validates the modifications.
Quoted 6 lines
Quoted 2 lines
The acpi unit test will rebuild the aml tables if
TEST_ACPI_REBUILD_AMLenvironment variable is set.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. I usedgit://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git,
pci branch.Quoted 5 lines
Quoted 2 lines
Thanks,
MarcelActually 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 useqemu_write_fullas advised and resent.Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Thanks,
MarcelOK 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
Quoted 11 lines
Quoted 5 lines
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)I cannot reproduce it, I'll try anyway.
By the way, the test checks if iasl exits with error, so it should handle this gracefully. (I hope!)Regarding the IASL project, I'll see if I can open a bug,
no, just send mail.
Quoted 7 lines
Quoted 5 lines
(if I can reproduce it, otherwise I risk they'll ask some questions I cannot answer...)
Thanks,
MarcelThis is on fedora 19, 32 bit.
I see that the issue is with HPET table.
iasl -e DSDT -e SSDT -d HPET
crashes for me
Quoted 8 lines
iasl -d HPET
does not crash
I think that only DSDT and SSDT need -e.
Just skip -e for anything that is not an SSDT
and not a DSDT.
Thanks for the tip. I'll send a fix soon.
Marcel
Quoted 1 line
Quoted 73 lines · Marcel Apfelbaum
Quoted 72 lines · Michael S. Tsirkin
Quoted 55 lines · Michael S. Tsirkin
Quoted 31 lines · Marcel Apfelbaum
Quoted 30 lines · Michael S. Tsirkin
Quoted 29 lines · Marcel Apfelbaum
Quoted 19 lines · Michael S. Tsirkin
Quoted 18 lines · Marcel Apfelbaum
Quoted 6 lines · Michael S. Tsirkin
Quoted 5 lines · Marcel Apfelbaum
Acpi unit-test will fail every time the acpi tables change.
The series adds a script that rebuilds the expected aml files, so the test will pass. It also validates the modifications.
Quoted 6 lines
Quoted 2 lines
The acpi unit test will rebuild the aml tables if
TEST_ACPI_REBUILD_AMLenvironment variable is set.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. I usedgit://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git,
pci branch.Quoted 5 lines
Quoted 2 lines
Thanks,
MarcelActually 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 useqemu_write_fullas advised and resent.Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Thanks,
MarcelOK 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
Quoted 11 lines
Quoted 5 lines
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)I cannot reproduce it, I'll try anyway.
By the way, the test checks if iasl exits with error, so it should handle this gracefully. (I hope!)Regarding the IASL project, I'll see if I can open a bug,
no, just send mail.
Quoted 7 lines
Quoted 5 lines
(if I can reproduce it, otherwise I risk they'll ask some questions I cannot answer...)
Thanks,
MarcelThis is on fedora 19, 32 bit.
I see that the issue is with HPET table.
iasl -e DSDT -e SSDT -d HPET
crashes for me
iasl -d HPET
Quoted 12 lines
Quoted 6 lines
does not crash
I think that only DSDT and SSDT need -e.
Just skip -e for anything that is not an SSDT
and not a DSDT.Thanks for the tip. I'll send a fix soon.
MarcelQuoted 1 line
also I see you still do
aml_file = g_strdup_printf("%s/%s/%.4s", data_dir,
data->machine,
(gchar *)&sdt->header.signature);this will not work if we have > 1 SSDT.
Quoted 87 lines · Michael S. Tsirkin
Quoted 73 lines · Marcel Apfelbaum
Quoted 72 lines · Michael S. Tsirkin
Quoted 55 lines · Michael S. Tsirkin
Quoted 31 lines · Marcel Apfelbaum
Quoted 30 lines · Michael S. Tsirkin
Quoted 29 lines · Marcel Apfelbaum
Quoted 19 lines · Michael S. Tsirkin
Quoted 18 lines · Marcel Apfelbaum
Quoted 6 lines · Michael S. Tsirkin
Quoted 5 lines · Marcel Apfelbaum
Acpi unit-test will fail every time the acpi tables change.
The series adds a script that rebuilds the expected aml files, so the test will pass. It also validates the modifications.
Quoted 6 lines
Quoted 2 lines
The acpi unit test will rebuild the aml tables if
TEST_ACPI_REBUILD_AMLenvironment variable is set.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. I usedgit://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git,
pci branch.Quoted 5 lines
Quoted 2 lines
Thanks,
MarcelActually 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 useqemu_write_fullas advised and resent.Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Thanks,
MarcelOK 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
Quoted 11 lines
Quoted 5 lines
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)I cannot reproduce it, I'll try anyway.
By the way, the test checks if iasl exits with error, so it should handle this gracefully. (I hope!)Regarding the IASL project, I'll see if I can open a bug,
no, just send mail.
Quoted 7 lines
Quoted 5 lines
(if I can reproduce it, otherwise I risk they'll ask some questions I cannot answer...)
Thanks,
MarcelThis is on fedora 19, 32 bit.
I see that the issue is with HPET table.
iasl -e DSDT -e SSDT -d HPET
crashes for me
iasl -d HPET
Quoted 12 lines
Quoted 6 lines
does not crash
I think that only DSDT and SSDT need -e.
Just skip -e for anything that is not an SSDT
and not a DSDT.Thanks for the tip. I'll send a fix soon.
MarcelQuoted 1 line
Quoted 8 lines
also I see you still do
aml_file = g_strdup_printf("%s/%s/%.4s", data_dir, data->machine, (gchar *)&sdt->header.signature);this will not work if we have > 1 SSDT.
As I stated in a prev thread:
Quoted 1 line
From what I understand there is only one ssdt table named SSDT,
all others are named differently: "APIC" "HPET".
I think multiple SSDTS have different signatures, even in my laptop they are called: SSDT1, SSDT2, SSDT3,...
So, even if the SPEC allows it, for qemu we can use different signatures for ssdt tables (it is allowed). (otherwise it will complicate the code unnecessary)
Thanks,
Marcel
Quoted 1 line
Quoted 95 lines · Marcel Apfelbaum
Quoted 94 lines · Michael S. Tsirkin
Quoted 73 lines · Marcel Apfelbaum
Quoted 72 lines · Michael S. Tsirkin
Quoted 55 lines · Michael S. Tsirkin
Quoted 31 lines · Marcel Apfelbaum
Quoted 30 lines · Michael S. Tsirkin
Quoted 29 lines · Marcel Apfelbaum
Quoted 19 lines · Michael S. Tsirkin
Quoted 18 lines · Marcel Apfelbaum
Quoted 6 lines · Michael S. Tsirkin
Quoted 5 lines · Marcel Apfelbaum
Acpi unit-test will fail every time the acpi tables change.
The series adds a script that rebuilds the expected aml files, so the test will pass. It also validates the modifications.
Quoted 6 lines
Quoted 2 lines
The acpi unit test will rebuild the aml tables if
TEST_ACPI_REBUILD_AMLenvironment variable is set.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. I usedgit://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git,
pci branch.Quoted 5 lines
Quoted 2 lines
Thanks,
MarcelActually 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 useqemu_write_fullas advised and resent.Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Thanks,
MarcelOK 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
Quoted 11 lines
Quoted 5 lines
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)I cannot reproduce it, I'll try anyway.
By the way, the test checks if iasl exits with error, so it should handle this gracefully. (I hope!)Regarding the IASL project, I'll see if I can open a bug,
no, just send mail.
Quoted 7 lines
Quoted 5 lines
(if I can reproduce it, otherwise I risk they'll ask some questions I cannot answer...)
Thanks,
MarcelThis is on fedora 19, 32 bit.
I see that the issue is with HPET table.
iasl -e DSDT -e SSDT -d HPET
crashes for me
iasl -d HPET
Quoted 12 lines
Quoted 6 lines
does not crash
I think that only DSDT and SSDT need -e.
Just skip -e for anything that is not an SSDT
and not a DSDT.Thanks for the tip. I'll send a fix soon.
MarcelQuoted 1 line
also I see you still do
aml_file = g_strdup_printf("%s/%s/%.4s", data_dir, data->machine, (gchar *)&sdt->header.signature);
Quoted 6 lines
Quoted 1 line
this will not work if we have > 1 SSDT.
As I stated in a prev thread:
From what I understand there is only one ssdt table named SSDT, all others are named differently: "APIC" "HPET".
I think multiple SSDTS have different signatures, even in my laptop they are called: SSDT1, SSDT2, SSDT3,...
I disassembled the SSDTx tables in my laptop and I saw that actually they have the same "SSDT" signature.
I still believe what I wrote before:
1. There is only one ssdt table named SSDT in Qemu, all the others are named differently: "APIC" "HPET".
2. Even if the SPEC allows to use the same signature, qemu we can use different signatures for ssdt tables (it is allowed). Otherwise it will complicate the code unnecessary.
Thanks,
Marcel