Skip to contentSkip to conversation

test: fix detection of errors from iasl

PATCH In review Daniel P. Berrange 2 participants 2 messages Oct 18, 2017 – Nov 16, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test: fix detection of errors from iasl

The conditional looking for errors while loading asl files would ignore errors from loading the expected data, if the actual data succeeded.

---
 tests/bios-tables-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/bios-tables-test.c +1 -1
index ee441f1e17..be05e8bcc2 100644
@@ -458,7 +458,7 @@ static void test_acpi_asl(test_data *data)
         exp_asl = normalize_asl(exp_sdt->asl);
 
         /* TODO: check for warnings */
-        g_assert(!err || exp_err);
+        g_assert(!err && !exp_err);
 
         if (g_strcmp0(asl->str, exp_asl->str)) {
             if (exp_err) {
Signature · 1 line
2.13.6
#1 lore raw
Quoted 4 lines · Daniel P. Berrange

The conditional looking for errors while loading asl files would ignore errors from loading the expected data, if the actual data succeeded.

Problem is, some systems have a broken iasl. If we can't load expected data, qemu isn't broken, iasl is, so the test should pass.

I applied this in error, I've reverted this patch now.

Quoted 19 lines
---
 tests/bios-tables-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/bios-tables-test.c +1 -1
index ee441f1e17..be05e8bcc2 100644
@@ -458,7 +458,7 @@ static void test_acpi_asl(test_data *data)
         exp_asl = normalize_asl(exp_sdt->asl);
 
         /* TODO: check for warnings */
-        g_assert(!err || exp_err);
+        g_assert(!err && !exp_err);
 
         if (g_strcmp0(asl->str, exp_asl->str)) {
             if (exp_err) {
Signature · 1 line
2.13.6