qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tests/qtest/q35-test: Remove the obsolete test_without_smram_base test
@ 2025-05-08  9:51 Thomas Huth
  2025-05-08  9:57 ` Daniel P. Berrangé
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Thomas Huth @ 2025-05-08  9:51 UTC (permalink / raw)
  To: Fabiano Rosas, qemu-devel, Daniel P . Berrangé
  Cc: Laurent Vivier, Paolo Bonzini, Philippe Mathieu-Daudé

From: Thomas Huth <thuth@redhat.com>

With the release of QEMU 10.1, the pc-q35-4.1 machine will be older
than 6 years and thus will get disabled automatically by the
MACHINE_VER_DELETION() macro. Remove the related test to avoid
that the q35-test is failing when the machine is not available anymore.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/qtest/q35-test.c | 37 +------------------------------------
 1 file changed, 1 insertion(+), 36 deletions(-)

diff --git a/tests/qtest/q35-test.c b/tests/qtest/q35-test.c
index 75d4078b790..62fff49fc89 100644
--- a/tests/qtest/q35-test.c
+++ b/tests/qtest/q35-test.c
@@ -246,41 +246,6 @@ static void test_smram_smbase_lock(void)
     qtest_quit(qts);
 }
 
-static void test_without_smram_base(void)
-{
-    QPCIBus *pcibus;
-    QPCIDevice *pcidev;
-    QTestState *qts;
-    int i;
-
-    qts = qtest_init("-M pc-q35-4.1");
-
-    pcibus = qpci_new_pc(qts, NULL);
-    g_assert(pcibus != NULL);
-
-    pcidev = qpci_device_find(pcibus, 0);
-    g_assert(pcidev != NULL);
-
-    /* check that RAM is accessible */
-    qtest_writeb(qts, SMBASE, SMRAM_TEST_PATTERN);
-    g_assert_cmpint(qtest_readb(qts, SMBASE), ==, SMRAM_TEST_PATTERN);
-
-    /* check that writing to 0x9c succeeds */
-    for (i = 0; i <= 0xff; i++) {
-        qpci_config_writeb(pcidev, MCH_HOST_BRIDGE_F_SMBASE, i);
-        g_assert(qpci_config_readb(pcidev, MCH_HOST_BRIDGE_F_SMBASE) == i);
-    }
-
-    /* check that RAM is still accessible */
-    qtest_writeb(qts, SMBASE, SMRAM_TEST_PATTERN + 1);
-    g_assert_cmpint(qtest_readb(qts, SMBASE), ==, (SMRAM_TEST_PATTERN + 1));
-
-    g_free(pcidev);
-    qpci_free_pc(pcibus);
-
-    qtest_quit(qts);
-}
-
 int main(int argc, char **argv)
 {
     g_test_init(&argc, &argv, NULL);
@@ -293,6 +258,6 @@ int main(int argc, char **argv)
     qtest_add_data_func("/q35/tseg-size/ext/16mb", &tseg_ext_16mb,
                         test_tseg_size);
     qtest_add_func("/q35/smram/smbase_lock", test_smram_smbase_lock);
-    qtest_add_func("/q35/smram/legacy_smbase", test_without_smram_base);
+
     return g_test_run();
 }
-- 
2.49.0



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

* Re: [PATCH] tests/qtest/q35-test: Remove the obsolete test_without_smram_base test
  2025-05-08  9:51 [PATCH] tests/qtest/q35-test: Remove the obsolete test_without_smram_base test Thomas Huth
@ 2025-05-08  9:57 ` Daniel P. Berrangé
  2025-05-08 11:17 ` Philippe Mathieu-Daudé
  2025-05-08 13:41 ` Fabiano Rosas
  2 siblings, 0 replies; 5+ messages in thread
From: Daniel P. Berrangé @ 2025-05-08  9:57 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Fabiano Rosas, qemu-devel, Laurent Vivier, Paolo Bonzini,
	Philippe Mathieu-Daudé

On Thu, May 08, 2025 at 11:51:22AM +0200, Thomas Huth wrote:
> From: Thomas Huth <thuth@redhat.com>
> 
> With the release of QEMU 10.1, the pc-q35-4.1 machine will be older
> than 6 years and thus will get disabled automatically by the
> MACHINE_VER_DELETION() macro. Remove the related test to avoid
> that the q35-test is failing when the machine is not available anymore.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  tests/qtest/q35-test.c | 37 +------------------------------------
>  1 file changed, 1 insertion(+), 36 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



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

* Re: [PATCH] tests/qtest/q35-test: Remove the obsolete test_without_smram_base test
  2025-05-08  9:51 [PATCH] tests/qtest/q35-test: Remove the obsolete test_without_smram_base test Thomas Huth
  2025-05-08  9:57 ` Daniel P. Berrangé
@ 2025-05-08 11:17 ` Philippe Mathieu-Daudé
  2025-05-08 13:41 ` Fabiano Rosas
  2 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-08 11:17 UTC (permalink / raw)
  To: Thomas Huth, Fabiano Rosas, qemu-devel, Daniel P . Berrangé
  Cc: Laurent Vivier, Paolo Bonzini

On 8/5/25 11:51, Thomas Huth wrote:
> From: Thomas Huth <thuth@redhat.com>
> 
> With the release of QEMU 10.1, the pc-q35-4.1 machine will be older
> than 6 years and thus will get disabled automatically by the
> MACHINE_VER_DELETION() macro. Remove the related test to avoid
> that the q35-test is failing when the machine is not available anymore.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>   tests/qtest/q35-test.c | 37 +------------------------------------
>   1 file changed, 1 insertion(+), 36 deletions(-)

Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>



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

* Re: [PATCH] tests/qtest/q35-test: Remove the obsolete test_without_smram_base test
  2025-05-08  9:51 [PATCH] tests/qtest/q35-test: Remove the obsolete test_without_smram_base test Thomas Huth
  2025-05-08  9:57 ` Daniel P. Berrangé
  2025-05-08 11:17 ` Philippe Mathieu-Daudé
@ 2025-05-08 13:41 ` Fabiano Rosas
  2025-05-08 16:17   ` Daniel P. Berrangé
  2 siblings, 1 reply; 5+ messages in thread
From: Fabiano Rosas @ 2025-05-08 13:41 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel, Daniel P . Berrangé
  Cc: Laurent Vivier, Paolo Bonzini, Philippe Mathieu-Daudé

Thomas Huth <thuth@redhat.com> writes:

> From: Thomas Huth <thuth@redhat.com>
>
> With the release of QEMU 10.1, the pc-q35-4.1 machine will be older
> than 6 years and thus will get disabled automatically by the
> MACHINE_VER_DELETION() macro. Remove the related test to avoid
> that the q35-test is failing when the machine is not available anymore.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  tests/qtest/q35-test.c | 37 +------------------------------------
>  1 file changed, 1 insertion(+), 36 deletions(-)
>
> diff --git a/tests/qtest/q35-test.c b/tests/qtest/q35-test.c
> index 75d4078b790..62fff49fc89 100644
> --- a/tests/qtest/q35-test.c
> +++ b/tests/qtest/q35-test.c
> @@ -246,41 +246,6 @@ static void test_smram_smbase_lock(void)
>      qtest_quit(qts);
>  }
>  
> -static void test_without_smram_base(void)
> -{
> -    QPCIBus *pcibus;
> -    QPCIDevice *pcidev;
> -    QTestState *qts;
> -    int i;
> -
> -    qts = qtest_init("-M pc-q35-4.1");
> -
> -    pcibus = qpci_new_pc(qts, NULL);
> -    g_assert(pcibus != NULL);
> -
> -    pcidev = qpci_device_find(pcibus, 0);
> -    g_assert(pcidev != NULL);
> -
> -    /* check that RAM is accessible */
> -    qtest_writeb(qts, SMBASE, SMRAM_TEST_PATTERN);
> -    g_assert_cmpint(qtest_readb(qts, SMBASE), ==, SMRAM_TEST_PATTERN);
> -
> -    /* check that writing to 0x9c succeeds */
> -    for (i = 0; i <= 0xff; i++) {
> -        qpci_config_writeb(pcidev, MCH_HOST_BRIDGE_F_SMBASE, i);
> -        g_assert(qpci_config_readb(pcidev, MCH_HOST_BRIDGE_F_SMBASE) == i);
> -    }
> -
> -    /* check that RAM is still accessible */
> -    qtest_writeb(qts, SMBASE, SMRAM_TEST_PATTERN + 1);
> -    g_assert_cmpint(qtest_readb(qts, SMBASE), ==, (SMRAM_TEST_PATTERN + 1));
> -
> -    g_free(pcidev);
> -    qpci_free_pc(pcibus);
> -
> -    qtest_quit(qts);
> -}
> -
>  int main(int argc, char **argv)
>  {
>      g_test_init(&argc, &argv, NULL);
> @@ -293,6 +258,6 @@ int main(int argc, char **argv)
>      qtest_add_data_func("/q35/tseg-size/ext/16mb", &tseg_ext_16mb,
>                          test_tseg_size);
>      qtest_add_func("/q35/smram/smbase_lock", test_smram_smbase_lock);
> -    qtest_add_func("/q35/smram/legacy_smbase", test_without_smram_base);
> +
>      return g_test_run();
>  }

Queued, thanks!


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

* Re: [PATCH] tests/qtest/q35-test: Remove the obsolete test_without_smram_base test
  2025-05-08 13:41 ` Fabiano Rosas
@ 2025-05-08 16:17   ` Daniel P. Berrangé
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel P. Berrangé @ 2025-05-08 16:17 UTC (permalink / raw)
  To: Fabiano Rosas
  Cc: Thomas Huth, qemu-devel, Laurent Vivier, Paolo Bonzini,
	Philippe Mathieu-Daudé

On Thu, May 08, 2025 at 10:41:43AM -0300, Fabiano Rosas wrote:
> Thomas Huth <thuth@redhat.com> writes:
> 
> > From: Thomas Huth <thuth@redhat.com>
> >
> > With the release of QEMU 10.1, the pc-q35-4.1 machine will be older
> > than 6 years and thus will get disabled automatically by the
> > MACHINE_VER_DELETION() macro. Remove the related test to avoid
> > that the q35-test is failing when the machine is not available anymore.
> >
> > Signed-off-by: Thomas Huth <thuth@redhat.com>
> > ---
> >  tests/qtest/q35-test.c | 37 +------------------------------------
> >  1 file changed, 1 insertion(+), 36 deletions(-)

snip

> Queued, thanks!

FYI, I included this in the pull request I just sent, as it is a required
bugfix for enabling automatic skipping of machine type registration.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



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

end of thread, other threads:[~2025-05-08 16:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-08  9:51 [PATCH] tests/qtest/q35-test: Remove the obsolete test_without_smram_base test Thomas Huth
2025-05-08  9:57 ` Daniel P. Berrangé
2025-05-08 11:17 ` Philippe Mathieu-Daudé
2025-05-08 13:41 ` Fabiano Rosas
2025-05-08 16:17   ` Daniel P. Berrangé

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).