[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 15/15] tests: acpi: print error unable to dump AC
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH v4 15/15] tests: acpi: print error unable to dump ACPI table during rebuild |
Date: |
Thu, 2 May 2019 16:52:03 +0200 |
Instead of just asserting print the error that lead to assert first.
While at it move assert into rebuild branch, which removes redundant
check done in case of !rebuild branch is taken (the later is taken
care of by g_assert_no_error).
Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Wei Yang <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
---
v4:
* fix typo in commit message (Reviewed-by: Philippe Mathieu-Daudé
<address@hidden>)
---
tests/bios-tables-test.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
index eaa1b0c..6cb8b16 100644
--- a/tests/bios-tables-test.c
+++ b/tests/bios-tables-test.c
@@ -195,11 +195,14 @@ static void dump_aml_files(test_data *data, bool rebuild)
sdt->aml, ext);
fd = g_open(aml_file, O_WRONLY|O_TRUNC|O_CREAT,
S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH);
+ if (fd < 0) {
+ perror(aml_file);
+ }
+ g_assert(fd >= 0);
} else {
fd = g_file_open_tmp("aml-XXXXXX", &sdt->aml_file, &error);
g_assert_no_error(error);
}
- g_assert(fd >= 0);
ret = qemu_write_full(fd, sdt->aml, sdt->aml_len);
g_assert(ret == sdt->aml_len);
--
2.7.4
- [Qemu-devel] [PATCH v4 10/15] tests: acpi: ignore SMBIOS tests when UEFI firmware is used, (continued)
- [Qemu-devel] [PATCH v4 10/15] tests: acpi: ignore SMBIOS tests when UEFI firmware is used, Igor Mammedov, 2019/05/02
- [Qemu-devel] [PATCH v4 09/15] tests: acpi: add a way to start tests with UEFI firmware, Igor Mammedov, 2019/05/02
- [Qemu-devel] [PATCH v4 11/15] tests: acpi: allow to override default accelerator, Igor Mammedov, 2019/05/02
- [Qemu-devel] [PATCH v4 12/15] tests: add expected ACPI tables for arm/virt board, Igor Mammedov, 2019/05/02
- [Qemu-devel] [PATCH v4 13/15] tests: acpi: add simple arm/virt testcase, Igor Mammedov, 2019/05/02
- [Qemu-devel] [PATCH v4 14/15] tests: acpi: refactor rebuild-expected-aml.sh to dump ACPI tables for a specified list of targets, Igor Mammedov, 2019/05/02
- [Qemu-devel] [PATCH v4 15/15] tests: acpi: print error unable to dump ACPI table during rebuild,
Igor Mammedov <=
- Re: [Qemu-devel] [PATCH v4 00/15] tests: acpi: add UEFI (ARM) testing support, Wei Xu, 2019/05/02