qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] test: fix detection of errors from iasl
@ 2017-10-18 13:14 Daniel P. Berrange
  2017-11-16 15:51 ` Michael S. Tsirkin
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel P. Berrange @ 2017-10-18 13:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: Michael S. Tsirkin, 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.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 tests/bios-tables-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
index ee441f1e17..be05e8bcc2 100644
--- a/tests/bios-tables-test.c
+++ b/tests/bios-tables-test.c
@@ -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) {
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] test: fix detection of errors from iasl
  2017-10-18 13:14 [Qemu-devel] [PATCH] test: fix detection of errors from iasl Daniel P. Berrange
@ 2017-11-16 15:51 ` Michael S. Tsirkin
  0 siblings, 0 replies; 2+ messages in thread
From: Michael S. Tsirkin @ 2017-11-16 15:51 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: qemu-devel

On Wed, Oct 18, 2017 at 02:14:56PM +0100, Daniel P. Berrange wrote:
> The conditional looking for errors while loading asl files would ignore
> errors from loading the expected data, if the actual data succeeded.
> 
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>

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.

> ---
>  tests/bios-tables-test.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
> index ee441f1e17..be05e8bcc2 100644
> --- a/tests/bios-tables-test.c
> +++ b/tests/bios-tables-test.c
> @@ -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) {
> -- 
> 2.13.6

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-16 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-18 13:14 [Qemu-devel] [PATCH] test: fix detection of errors from iasl Daniel P. Berrange
2017-11-16 15:51 ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).