All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bios-tables-test: do not ignore allowed diff list
@ 2022-10-27 15:11 Michael S. Tsirkin
  2022-10-27 15:31 ` Ani Sinha
  2022-10-31 10:49 ` Igor Mammedov
  0 siblings, 2 replies; 7+ messages in thread
From: Michael S. Tsirkin @ 2022-10-27 15:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: Igor Mammedov, Ani Sinha

we had such a beautiful structure for updating
expected files, designed to keep bisect working.
It turns out that we ignored the result of
the allow list checks unless all tables matched
anyway.

Sigh.

Let's at least make it work going forward.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 tests/qtest/bios-tables-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
index e6096e7f73..a72f6ca326 100644
--- a/tests/qtest/bios-tables-test.c
+++ b/tests/qtest/bios-tables-test.c
@@ -458,7 +458,7 @@ static void test_acpi_asl(test_data *data)
                 "for instructions on how to update expected files.\n",
                 exp_sdt->aml, sdt->aml_file, exp_sdt->aml_file);
 
-        all_tables_match = all_tables_match &&
+        all_tables_match = all_tables_match ||
             test_acpi_find_diff_allowed(exp_sdt);
 
         /*
-- 
MST



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

* Re: [PATCH] bios-tables-test: do not ignore allowed diff list
  2022-10-27 15:11 [PATCH] bios-tables-test: do not ignore allowed diff list Michael S. Tsirkin
@ 2022-10-27 15:31 ` Ani Sinha
  2022-10-31 10:49 ` Igor Mammedov
  1 sibling, 0 replies; 7+ messages in thread
From: Ani Sinha @ 2022-10-27 15:31 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: qemu-devel, Igor Mammedov

On Thu, Oct 27, 2022 at 8:41 PM Michael S. Tsirkin <mst@redhat.com> wrote:
>
> we had such a beautiful structure for updating
> expected files, designed to keep bisect working.
> It turns out that we ignored the result of
> the allow list checks unless all tables matched
> anyway.


Doh! Seems the bug is present from the beginning?

>
> Sigh.
>
> Let's at least make it work going forward.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Fixes: df7cafdeb68b6572fa81 ("bios-tables-test: list all tables that differ")

other than that,
Reviewed-by: Ani Sinha <ani@anisinha.ca>




> ---
>  tests/qtest/bios-tables-test.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
> index e6096e7f73..a72f6ca326 100644
> --- a/tests/qtest/bios-tables-test.c
> +++ b/tests/qtest/bios-tables-test.c
> @@ -458,7 +458,7 @@ static void test_acpi_asl(test_data *data)
>                  "for instructions on how to update expected files.\n",
>                  exp_sdt->aml, sdt->aml_file, exp_sdt->aml_file);
>
> -        all_tables_match = all_tables_match &&
> +        all_tables_match = all_tables_match ||
>              test_acpi_find_diff_allowed(exp_sdt);
>
>          /*
> --
> MST
>


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

* Re: [PATCH] bios-tables-test: do not ignore allowed diff list
  2022-10-27 15:11 [PATCH] bios-tables-test: do not ignore allowed diff list Michael S. Tsirkin
  2022-10-27 15:31 ` Ani Sinha
@ 2022-10-31 10:49 ` Igor Mammedov
  2022-10-31 10:52   ` Michael S. Tsirkin
  1 sibling, 1 reply; 7+ messages in thread
From: Igor Mammedov @ 2022-10-31 10:49 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: qemu-devel, Ani Sinha

On Thu, 27 Oct 2022 11:11:48 -0400
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> we had such a beautiful structure for updating
> expected files, designed to keep bisect working.
> It turns out that we ignored the result of
> the allow list checks unless all tables matched
> anyway.
> 
> Sigh.

strange,
it seems to be working fine (I mean white-listing) here

> 
> Let's at least make it work going forward.
> 
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>  tests/qtest/bios-tables-test.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
> index e6096e7f73..a72f6ca326 100644
> --- a/tests/qtest/bios-tables-test.c
> +++ b/tests/qtest/bios-tables-test.c
> @@ -458,7 +458,7 @@ static void test_acpi_asl(test_data *data)
>                  "for instructions on how to update expected files.\n",
>                  exp_sdt->aml, sdt->aml_file, exp_sdt->aml_file);
>  
> -        all_tables_match = all_tables_match &&
> +        all_tables_match = all_tables_match ||
>              test_acpi_find_diff_allowed(exp_sdt);
>  
>          /*



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

* Re: [PATCH] bios-tables-test: do not ignore allowed diff list
  2022-10-31 10:49 ` Igor Mammedov
@ 2022-10-31 10:52   ` Michael S. Tsirkin
  2022-10-31 12:31     ` Igor Mammedov
  0 siblings, 1 reply; 7+ messages in thread
From: Michael S. Tsirkin @ 2022-10-31 10:52 UTC (permalink / raw)
  To: Igor Mammedov; +Cc: qemu-devel, Ani Sinha

On Mon, Oct 31, 2022 at 11:49:42AM +0100, Igor Mammedov wrote:
> On Thu, 27 Oct 2022 11:11:48 -0400
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
> 
> > we had such a beautiful structure for updating
> > expected files, designed to keep bisect working.
> > It turns out that we ignored the result of
> > the allow list checks unless all tables matched
> > anyway.
> > 
> > Sigh.
> 
> strange,
> it seems to be working fine (I mean white-listing) here

it's pretty clear no? if we only check test_acpi_find_diff_allowed
when all tables match anyway, it won't help test pass.

> > 
> > Let's at least make it work going forward.
> > 
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > ---
> >  tests/qtest/bios-tables-test.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
> > index e6096e7f73..a72f6ca326 100644
> > --- a/tests/qtest/bios-tables-test.c
> > +++ b/tests/qtest/bios-tables-test.c
> > @@ -458,7 +458,7 @@ static void test_acpi_asl(test_data *data)
> >                  "for instructions on how to update expected files.\n",
> >                  exp_sdt->aml, sdt->aml_file, exp_sdt->aml_file);
> >  
> > -        all_tables_match = all_tables_match &&
> > +        all_tables_match = all_tables_match ||
> >              test_acpi_find_diff_allowed(exp_sdt);
> >  
> >          /*



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

* Re: [PATCH] bios-tables-test: do not ignore allowed diff list
  2022-10-31 10:52   ` Michael S. Tsirkin
@ 2022-10-31 12:31     ` Igor Mammedov
  2022-10-31 12:44       ` Michael S. Tsirkin
  2022-10-31 12:50       ` Ani Sinha
  0 siblings, 2 replies; 7+ messages in thread
From: Igor Mammedov @ 2022-10-31 12:31 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: qemu-devel, Ani Sinha

On Mon, 31 Oct 2022 06:52:11 -0400
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> On Mon, Oct 31, 2022 at 11:49:42AM +0100, Igor Mammedov wrote:
> > On Thu, 27 Oct 2022 11:11:48 -0400
> > "Michael S. Tsirkin" <mst@redhat.com> wrote:
> >   
> > > we had such a beautiful structure for updating
> > > expected files, designed to keep bisect working.
> > > It turns out that we ignored the result of
> > > the allow list checks unless all tables matched
> > > anyway.
> > > 
> > > Sigh.  
> > 
> > strange,
> > it seems to be working fine (I mean white-listing) here  
> 
> it's pretty clear no? if we only check test_acpi_find_diff_allowed
> when all tables match anyway, it won't help test pass.

currently all_tables_match is accumulated value that starts with 'true'
and with the meaning 'do not explode unless at least a table was not
explicitly whitelisted'
[...]
> > >  
> > > -        all_tables_match = all_tables_match &&
  '&&' here serves as a trigger that lets flip always initial 'all_tables_match = true'

> > > +        all_tables_match = all_tables_match ||
  once it changes to '||' the all_tables_match will never flip to false
and trigger
  g_assert(all_tables_match);
at the end, when there is unexpected (non-whitelisted) table mismatch.

Am I missing something?

> > >              test_acpi_find_diff_allowed(exp_sdt);
> > >  
> > >          /*  
> 



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

* Re: [PATCH] bios-tables-test: do not ignore allowed diff list
  2022-10-31 12:31     ` Igor Mammedov
@ 2022-10-31 12:44       ` Michael S. Tsirkin
  2022-10-31 12:50       ` Ani Sinha
  1 sibling, 0 replies; 7+ messages in thread
From: Michael S. Tsirkin @ 2022-10-31 12:44 UTC (permalink / raw)
  To: Igor Mammedov; +Cc: qemu-devel, Ani Sinha

On Mon, Oct 31, 2022 at 01:31:04PM +0100, Igor Mammedov wrote:
> On Mon, 31 Oct 2022 06:52:11 -0400
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
> 
> > On Mon, Oct 31, 2022 at 11:49:42AM +0100, Igor Mammedov wrote:
> > > On Thu, 27 Oct 2022 11:11:48 -0400
> > > "Michael S. Tsirkin" <mst@redhat.com> wrote:
> > >   
> > > > we had such a beautiful structure for updating
> > > > expected files, designed to keep bisect working.
> > > > It turns out that we ignored the result of
> > > > the allow list checks unless all tables matched
> > > > anyway.
> > > > 
> > > > Sigh.  
> > > 
> > > strange,
> > > it seems to be working fine (I mean white-listing) here  
> > 
> > it's pretty clear no? if we only check test_acpi_find_diff_allowed
> > when all tables match anyway, it won't help test pass.
> 
> currently all_tables_match is accumulated value that starts with 'true'

Problem is, it can be false because of another unrelated table.







> and with the meaning 'do not explode unless at least a table was not
> explicitly whitelisted'



> [...]
> > > >  
> > > > -        all_tables_match = all_tables_match &&
>   '&&' here serves as a trigger that lets flip always initial 'all_tables_match = true'
> 
> > > > +        all_tables_match = all_tables_match ||
>   once it changes to '||' the all_tables_match will never flip to false
> and trigger
>   g_assert(all_tables_match);
> at the end, when there is unexpected (non-whitelisted) table mismatch.
> 
> Am I missing something?


I agree this patch is bad.

I did not record the issue I saw and don't really want to go
debugging. Will drop for now.

> > > >              test_acpi_find_diff_allowed(exp_sdt);
> > > >  
> > > >          /*  
> > 



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

* Re: [PATCH] bios-tables-test: do not ignore allowed diff list
  2022-10-31 12:31     ` Igor Mammedov
  2022-10-31 12:44       ` Michael S. Tsirkin
@ 2022-10-31 12:50       ` Ani Sinha
  1 sibling, 0 replies; 7+ messages in thread
From: Ani Sinha @ 2022-10-31 12:50 UTC (permalink / raw)
  To: Igor Mammedov; +Cc: Michael S. Tsirkin, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1620 bytes --]

On Mon, Oct 31, 2022 at 18:01 Igor Mammedov <imammedo@redhat.com> wrote:

> On Mon, 31 Oct 2022 06:52:11 -0400
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
>
> > On Mon, Oct 31, 2022 at 11:49:42AM +0100, Igor Mammedov wrote:
> > > On Thu, 27 Oct 2022 11:11:48 -0400
> > > "Michael S. Tsirkin" <mst@redhat.com> wrote:
> > >
> > > > we had such a beautiful structure for updating
> > > > expected files, designed to keep bisect working.
> > > > It turns out that we ignored the result of
> > > > the allow list checks unless all tables matched
> > > > anyway.
> > > >
> > > > Sigh.
> > >
> > > strange,
> > > it seems to be working fine (I mean white-listing) here
> >
> > it's pretty clear no? if we only check test_acpi_find_diff_allowed
> > when all tables match anyway, it won't help test pass.
>
> currently all_tables_match is accumulated value that starts with 'true'
> and with the meaning 'do not explode unless at least a table was not
> explicitly whitelisted'
> [...]
> > > >
> > > > -        all_tables_match = all_tables_match &&
>   '&&' here serves as a trigger that lets flip always initial
> 'all_tables_match = true'
>
> > > > +        all_tables_match = all_tables_match ||
>   once it changes to '||' the all_tables_match will never flip to false
> and trigger
>   g_assert(all_tables_match);
> at the end, when there is unexpected (non-whitelisted) table mismatch.
>
> Am I missing something?


Ah you are right. My bad I didn’t see this either.


>
> > > >              test_acpi_find_diff_allowed(exp_sdt);
> > > >
> > > >          /*
> >
>
>

[-- Attachment #2: Type: text/html, Size: 2696 bytes --]

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

end of thread, other threads:[~2022-10-31 12:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-27 15:11 [PATCH] bios-tables-test: do not ignore allowed diff list Michael S. Tsirkin
2022-10-27 15:31 ` Ani Sinha
2022-10-31 10:49 ` Igor Mammedov
2022-10-31 10:52   ` Michael S. Tsirkin
2022-10-31 12:31     ` Igor Mammedov
2022-10-31 12:44       ` Michael S. Tsirkin
2022-10-31 12:50       ` Ani Sinha

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.