All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 0/5] MIPS queue for February 27th, 2020
@ 2020-02-27 13:27 Aleksandar Markovic
  2020-02-27 13:27 ` [PULL 1/5] MAINTAINERS: Orphan MIPS KVM CPUs Aleksandar Markovic
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Aleksandar Markovic @ 2020-02-27 13:27 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, amarkovic

From: Aleksandar Markovic <amarkovic@wavecomp.com>

The following changes since commit db736e0437aa6fd7c1b7e4599c17f9619ab6b837:

  Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2020-02-25 13:31:16 +0000)

are available in the git repository at:

  https://github.com/AMarkovic/qemu tags/mips-queue-feb-27-2020

for you to fetch changes up to 0484d9d4fbe9beacd3dd36fdf7fc3e14940bf078:

  tests/acceptance: Count multiple Tux logos displayed on framebuffer (2020-02-27 14:19:07 +0100)

----------------------------------------------------------------

MIPS queue for February 27th, 2020

  - Adjusting maintainership of MIPS KVM CPUs
  - Machine memory and interrupt-related minor improvements
  - Acceptance test for SMP support on Malta with I6400 CPU

----------------------------------------------------------------

Aleksandar Markovic (1):
  MAINTAINERS: Reactivate MIPS KVM CPUs

James Hogan (1):
  MAINTAINERS: Orphan MIPS KVM CPUs

Philippe Mathieu-Daudé (3):
  hw/mips/mips_int: Simplify cpu_mips_irq_init_cpu()
  hw/mips: Use memory_region_init_rom() with read-only regions
  tests/acceptance: Count multiple Tux logos displayed on framebuffer

 hw/mips/mips_fulong2e.c                |   3 +-
 hw/mips/mips_int.c                     |   2 +-
 hw/mips/mips_jazz.c                    |   6 +-
 hw/mips/mips_mipssim.c                 |   3 +-
 hw/mips/mips_r4k.c                     |   3 +-
 MAINTAINERS                            |   6 +-
 tests/acceptance/machine_mips_malta.py | 118 +++++++++++++++++++++++++++++++++
 7 files changed, 127 insertions(+), 14 deletions(-)
 create mode 100644 tests/acceptance/machine_mips_malta.py

-- 
2.7.4



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

* [PULL 1/5] MAINTAINERS: Orphan MIPS KVM CPUs
  2020-02-27 13:27 [PULL 0/5] MIPS queue for February 27th, 2020 Aleksandar Markovic
@ 2020-02-27 13:27 ` Aleksandar Markovic
  2020-02-27 13:27 ` [PULL 2/5] MAINTAINERS: Reactivate " Aleksandar Markovic
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Aleksandar Markovic @ 2020-02-27 13:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Aleksandar Rikalo, Aurelien Jarno, amarkovic, James Hogan

From: James Hogan <jhogan@kernel.org>

I haven't been active for 18 months, and don't have the hardware set up
to test KVM for MIPS, so mark it as orphaned and remove myself as
maintainer. Hopefully somebody from MIPS can pick this up.

Cc: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Signed-off-by: James Hogan <jhogan@kernel.org>
Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Message-Id: <20191221155306.49221-1-jhogan@kernel.org>
---
 MAINTAINERS | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 36d94c1..bf8c074 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -365,9 +365,8 @@ S: Maintained
 F: target/arm/kvm.c
 
 MIPS KVM CPUs
-M: James Hogan <jhogan@kernel.org>
 R: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>
-S: Maintained
+S: Orphan
 F: target/mips/kvm.c
 
 PPC KVM CPUs
-- 
2.7.4



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

* [PULL 2/5] MAINTAINERS: Reactivate MIPS KVM CPUs
  2020-02-27 13:27 [PULL 0/5] MIPS queue for February 27th, 2020 Aleksandar Markovic
  2020-02-27 13:27 ` [PULL 1/5] MAINTAINERS: Orphan MIPS KVM CPUs Aleksandar Markovic
@ 2020-02-27 13:27 ` Aleksandar Markovic
  2020-02-27 13:27 ` [PULL 3/5] hw/mips/mips_int: Simplify cpu_mips_irq_init_cpu() Aleksandar Markovic
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Aleksandar Markovic @ 2020-02-27 13:27 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Aleksandar Markovic, amarkovic, James Hogan

From: Aleksandar Markovic <aleksandar.m.mail@gmail.com>

Reactivate MIPS KVM maintainership with a modest goal of keeping
the support alive, checking common KVM code changes against MIPS
functionality, etc. (hence the status "Odd Fixes"), with hope that
this component will be fully maintained at some further, but not
distant point in future.

Cc: James Hogan <jhogan@kernel.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Message-Id: <1582545058-31609-2-git-send-email-aleksandar.markovic@rt-rk.com>
---
 MAINTAINERS | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index bf8c074..b084201 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -365,8 +365,8 @@ S: Maintained
 F: target/arm/kvm.c
 
 MIPS KVM CPUs
-R: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>
-S: Orphan
+M: Aleksandar Markovic <aleksandar.m.mail@gmail.com>
+S: Odd Fixes
 F: target/mips/kvm.c
 
 PPC KVM CPUs
-- 
2.7.4



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

* [PULL 3/5] hw/mips/mips_int: Simplify cpu_mips_irq_init_cpu()
  2020-02-27 13:27 [PULL 0/5] MIPS queue for February 27th, 2020 Aleksandar Markovic
  2020-02-27 13:27 ` [PULL 1/5] MAINTAINERS: Orphan MIPS KVM CPUs Aleksandar Markovic
  2020-02-27 13:27 ` [PULL 2/5] MAINTAINERS: Reactivate " Aleksandar Markovic
@ 2020-02-27 13:27 ` Aleksandar Markovic
  2020-02-27 13:27 ` [PULL 4/5] hw/mips: Use memory_region_init_rom() with read-only regions Aleksandar Markovic
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Aleksandar Markovic @ 2020-02-27 13:27 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Philippe Mathieu-Daudé, amarkovic

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Since commit d8ed887bdc, the cpu_mips_irq_request handler takes
a pointer to MIPSCPU in its opaque argument.  Directly pass the
cpu pointer.

Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Message-Id: <20200221162011.26383-1-philmd@redhat.com>
---
 hw/mips/mips_int.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/mips/mips_int.c b/hw/mips/mips_int.c
index 863ed45..796730b 100644
--- a/hw/mips/mips_int.c
+++ b/hw/mips/mips_int.c
@@ -77,7 +77,7 @@ void cpu_mips_irq_init_cpu(MIPSCPU *cpu)
     qemu_irq *qi;
     int i;
 
-    qi = qemu_allocate_irqs(cpu_mips_irq_request, env_archcpu(env), 8);
+    qi = qemu_allocate_irqs(cpu_mips_irq_request, cpu, 8);
     for (i = 0; i < 8; i++) {
         env->irq[i] = qi[i];
     }
-- 
2.7.4



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

* [PULL 4/5] hw/mips: Use memory_region_init_rom() with read-only regions
  2020-02-27 13:27 [PULL 0/5] MIPS queue for February 27th, 2020 Aleksandar Markovic
                   ` (2 preceding siblings ...)
  2020-02-27 13:27 ` [PULL 3/5] hw/mips/mips_int: Simplify cpu_mips_irq_init_cpu() Aleksandar Markovic
@ 2020-02-27 13:27 ` Aleksandar Markovic
  2020-02-27 13:27 ` [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer Aleksandar Markovic
  2020-02-28 14:02 ` [PULL 0/5] MIPS queue for February 27th, 2020 Peter Maydell
  5 siblings, 0 replies; 13+ messages in thread
From: Aleksandar Markovic @ 2020-02-27 13:27 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Philippe Mathieu-Daudé, amarkovic

From: Philippe Mathieu-Daudé <philmd@redhat.com>

This commit was produced with the Coccinelle script
scripts/coccinelle/memory-region-housekeeping.cocci.

Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Message-Id: <20200224205533.23798-8-philmd@redhat.com>
---
 hw/mips/mips_fulong2e.c | 3 +--
 hw/mips/mips_jazz.c     | 6 ++----
 hw/mips/mips_mipssim.c  | 3 +--
 hw/mips/mips_r4k.c      | 3 +--
 4 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c
index c373ab0..4727b1d 100644
--- a/hw/mips/mips_fulong2e.c
+++ b/hw/mips/mips_fulong2e.c
@@ -319,9 +319,8 @@ static void mips_fulong2e_init(MachineState *machine)
     }
 
     /* allocate RAM */
-    memory_region_init_ram(bios, NULL, "fulong2e.bios", BIOS_SIZE,
+    memory_region_init_rom(bios, NULL, "fulong2e.bios", BIOS_SIZE,
                            &error_fatal);
-    memory_region_set_readonly(bios, true);
 
     memory_region_add_subregion(address_space_mem, 0, machine->ram);
     memory_region_add_subregion(address_space_mem, 0x1fc00000LL, bios);
diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c
index 32fbd10..afea52b 100644
--- a/hw/mips/mips_jazz.c
+++ b/hw/mips/mips_jazz.c
@@ -197,9 +197,8 @@ static void mips_jazz_init(MachineState *machine,
     /* allocate RAM */
     memory_region_add_subregion(address_space, 0, machine->ram);
 
-    memory_region_init_ram(bios, NULL, "mips_jazz.bios", MAGNUM_BIOS_SIZE,
+    memory_region_init_rom(bios, NULL, "mips_jazz.bios", MAGNUM_BIOS_SIZE,
                            &error_fatal);
-    memory_region_set_readonly(bios, true);
     memory_region_init_alias(bios2, NULL, "mips_jazz.bios", bios,
                              0, MAGNUM_BIOS_SIZE);
     memory_region_add_subregion(address_space, 0x1fc00000LL, bios);
@@ -265,9 +264,8 @@ static void mips_jazz_init(MachineState *machine,
         {
             /* Simple ROM, so user doesn't have to provide one */
             MemoryRegion *rom_mr = g_new(MemoryRegion, 1);
-            memory_region_init_ram(rom_mr, NULL, "g364fb.rom", 0x80000,
+            memory_region_init_rom(rom_mr, NULL, "g364fb.rom", 0x80000,
                                    &error_fatal);
-            memory_region_set_readonly(rom_mr, true);
             uint8_t *rom = memory_region_get_ram_ptr(rom_mr);
             memory_region_add_subregion(address_space, 0x60000000, rom_mr);
             rom[0] = 0x10; /* Mips G364 */
diff --git a/hw/mips/mips_mipssim.c b/hw/mips/mips_mipssim.c
index b2555dd..d220318 100644
--- a/hw/mips/mips_mipssim.c
+++ b/hw/mips/mips_mipssim.c
@@ -165,9 +165,8 @@ mips_mipssim_init(MachineState *machine)
     qemu_register_reset(main_cpu_reset, reset_info);
 
     /* Allocate RAM. */
-    memory_region_init_ram(bios, NULL, "mips_mipssim.bios", BIOS_SIZE,
+    memory_region_init_rom(bios, NULL, "mips_mipssim.bios", BIOS_SIZE,
                            &error_fatal);
-    memory_region_set_readonly(bios, true);
 
     memory_region_add_subregion(address_space_mem, 0, machine->ram);
 
diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c
index 258cd91..ad8b75e 100644
--- a/hw/mips/mips_r4k.c
+++ b/hw/mips/mips_r4k.c
@@ -237,9 +237,8 @@ void mips_r4k_init(MachineState *machine)
     dinfo = drive_get(IF_PFLASH, 0, 0);
     if ((bios_size > 0) && (bios_size <= BIOS_SIZE)) {
         bios = g_new(MemoryRegion, 1);
-        memory_region_init_ram(bios, NULL, "mips_r4k.bios", BIOS_SIZE,
+        memory_region_init_rom(bios, NULL, "mips_r4k.bios", BIOS_SIZE,
                                &error_fatal);
-        memory_region_set_readonly(bios, true);
         memory_region_add_subregion(get_system_memory(), 0x1fc00000, bios);
 
         load_image_targphys(filename, 0x1fc00000, BIOS_SIZE);
-- 
2.7.4



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

* [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer
  2020-02-27 13:27 [PULL 0/5] MIPS queue for February 27th, 2020 Aleksandar Markovic
                   ` (3 preceding siblings ...)
  2020-02-27 13:27 ` [PULL 4/5] hw/mips: Use memory_region_init_rom() with read-only regions Aleksandar Markovic
@ 2020-02-27 13:27 ` Aleksandar Markovic
  2020-03-02 20:26   ` Peter Maydell
  2020-02-28 14:02 ` [PULL 0/5] MIPS queue for February 27th, 2020 Peter Maydell
  5 siblings, 1 reply; 13+ messages in thread
From: Aleksandar Markovic @ 2020-02-27 13:27 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Philippe Mathieu-Daudé, amarkovic

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Add a test that verifies that each core properly displays the Tux
logo on the framebuffer device.

We simply follow the OpenCV "Template Matching with Multiple Objects"
tutorial, replacing Lionel Messi by Tux:
https://docs.opencv.org/4.2.0/d4/dc6/tutorial_py_template_matching.html

When OpenCV and NumPy are installed, this test can be run using:

  $ avocado --show=app,framebuffer \
    run -t cpu:i6400 \
    tests/acceptance/machine_mips_malta.py
  JOB ID     : 54f3d8efd8674f289b8aa01a87f5d70c5814544c
  JOB LOG    : avocado/job-results/job-2020-02-01T20.52-54f3d8e/job.log
   (1/3) tests/acceptance/machine_mips_malta.py:MaltaMachineFramebuffer.test_mips_malta_i6400_framebuffer_logo_1core:
  framebuffer: found Tux at position (x, y) = (0, 0)
  PASS (3.37 s)
   (2/3) tests/acceptance/machine_mips_malta.py:MaltaMachineFramebuffer.test_mips_malta_i6400_framebuffer_logo_7cores:
  framebuffer: found Tux at position (x, y) = (0, 0)
  framebuffer: found Tux at position (x, y) = (88, 0)
  framebuffer: found Tux at position (x, y) = (176, 0)
  framebuffer: found Tux at position (x, y) = (264, 0)
  framebuffer: found Tux at position (x, y) = (352, 0)
  framebuffer: found Tux at position (x, y) = (440, 0)
  framebuffer: found Tux at position (x, y) = (528, 0)
  PASS (5.80 s)
   (3/3) tests/acceptance/machine_mips_malta.py:MaltaMachineFramebuffer.test_mips_malta_i6400_framebuffer_logo_8cores:
  framebuffer: found Tux at position (x, y) = (0, 0)
  framebuffer: found Tux at position (x, y) = (88, 0)
  framebuffer: found Tux at position (x, y) = (176, 0)
  framebuffer: found Tux at position (x, y) = (264, 0)
  framebuffer: found Tux at position (x, y) = (352, 0)
  framebuffer: found Tux at position (x, y) = (440, 0)
  framebuffer: found Tux at position (x, y) = (528, 0)
  framebuffer: found Tux at position (x, y) = (616, 0)
  PASS (6.67 s)
  RESULTS    : PASS 3 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
  JOB TIME   : 16.79 s

If the AVOCADO_CV2_SCREENDUMP_PNG_PATH environment variable is set, the
test will save the screenshot with matched squares to it.

Test inspired by the following post:
https://www.mips.com/blog/how-to-run-smp-linux-in-qemu-on-a-mips64-release-6-cpu/
Kernel built with the following Docker file:
https://github.com/philmd/qemu-testing-blob/blob/malta_i6400/mips/malta/mips64el/Dockerfile

Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200201204751.17810-1-f4bug@amsat.org>
---
 MAINTAINERS                            |   1 +
 tests/acceptance/machine_mips_malta.py | 118 +++++++++++++++++++++++++++++++++
 2 files changed, 119 insertions(+)
 create mode 100644 tests/acceptance/machine_mips_malta.py

diff --git a/MAINTAINERS b/MAINTAINERS
index b084201..880da9c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1005,6 +1005,7 @@ F: hw/mips/mips_malta.c
 F: hw/mips/gt64xxx_pci.c
 F: include/hw/southbridge/piix.h
 F: tests/acceptance/linux_ssh_mips_malta.py
+F: tests/acceptance/machine_mips_malta.py
 
 Mipssim
 M: Aleksandar Markovic <amarkovic@wavecomp.com>
diff --git a/tests/acceptance/machine_mips_malta.py b/tests/acceptance/machine_mips_malta.py
new file mode 100644
index 0000000..92b4f28
--- /dev/null
+++ b/tests/acceptance/machine_mips_malta.py
@@ -0,0 +1,118 @@
+# Functional tests for the MIPS Malta board
+#
+# Copyright (c) Philippe Mathieu-Daudé <f4bug@amsat.org>
+#
+# This work is licensed under the terms of the GNU GPL, version 2 or later.
+# See the COPYING file in the top-level directory.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+import os
+import gzip
+import logging
+
+from avocado import skipUnless
+from avocado_qemu import Test
+from avocado_qemu import wait_for_console_pattern
+from avocado.utils import archive
+
+
+NUMPY_AVAILABLE = True
+try:
+    import numpy as np
+except ImportError:
+    NUMPY_AVAILABLE = False
+
+CV2_AVAILABLE = True
+try:
+    import cv2
+except ImportError:
+    CV2_AVAILABLE = False
+
+
+@skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
+@skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
+class MaltaMachineFramebuffer(Test):
+
+    timeout = 30
+
+    KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 '
+
+    def do_test_i6400_framebuffer_logo(self, cpu_cores_count):
+        """
+        Boot Linux kernel and check Tux logo is displayed on the framebuffer.
+        """
+        screendump_path = os.path.join(self.workdir, 'screendump.pbm')
+
+        kernel_url = ('https://github.com/philmd/qemu-testing-blob/raw/'
+                      'a5966ca4b5/mips/malta/mips64el/'
+                      'vmlinux-4.7.0-rc1.I6400.gz')
+        kernel_hash = '096f50c377ec5072e6a366943324622c312045f6'
+        kernel_path_gz = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
+        kernel_path = self.workdir + "vmlinux"
+        archive.gzip_uncompress(kernel_path_gz, kernel_path)
+
+        tuxlogo_url = ('https://github.com/torvalds/linux/raw/v2.6.12/'
+                       'drivers/video/logo/logo_linux_vga16.ppm')
+        tuxlogo_hash = '3991c2ddbd1ddaecda7601f8aafbcf5b02dc86af'
+        tuxlogo_path = self.fetch_asset(tuxlogo_url, asset_hash=tuxlogo_hash)
+
+        self.vm.set_console()
+        kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
+                               'clocksource=GIC console=tty0 console=ttyS0')
+        self.vm.add_args('-kernel', kernel_path,
+                         '-cpu', 'I6400',
+                         '-smp', '%u' % cpu_cores_count,
+                         '-vga', 'std',
+                         '-append', kernel_command_line)
+        self.vm.launch()
+        framebuffer_ready = 'Console: switching to colour frame buffer device'
+        wait_for_console_pattern(self, framebuffer_ready,
+                                 failure_message='Kernel panic - not syncing')
+        self.vm.command('human-monitor-command', command_line='stop')
+        self.vm.command('human-monitor-command',
+                        command_line='screendump %s' % screendump_path)
+        logger = logging.getLogger('framebuffer')
+
+        match_threshold = 0.95
+        screendump_bgr = cv2.imread(screendump_path, cv2.IMREAD_COLOR)
+        tuxlogo_bgr = cv2.imread(tuxlogo_path, cv2.IMREAD_COLOR)
+        result = cv2.matchTemplate(screendump_bgr, tuxlogo_bgr,
+                                   cv2.TM_CCOEFF_NORMED)
+        loc = np.where(result >= match_threshold)
+        tuxlogo_count = 0
+        h, w = tuxlogo_bgr.shape[:2]
+        debug_png = os.getenv('AVOCADO_CV2_SCREENDUMP_PNG_PATH')
+        for tuxlogo_count, pt in enumerate(zip(*loc[::-1]), start=1):
+            logger.debug('found Tux at position (x, y) = %s', pt)
+            cv2.rectangle(screendump_bgr, pt,
+                          (pt[0] + w, pt[1] + h), (0, 0, 255), 2)
+        if debug_png:
+            cv2.imwrite(debug_png, screendump_bgr)
+        self.assertGreaterEqual(tuxlogo_count, cpu_cores_count)
+
+    def test_mips_malta_i6400_framebuffer_logo_1core(self):
+        """
+        :avocado: tags=arch:mips64el
+        :avocado: tags=machine:malta
+        :avocado: tags=cpu:i6400
+        """
+        self.do_test_i6400_framebuffer_logo(1)
+
+    def test_mips_malta_i6400_framebuffer_logo_7cores(self):
+        """
+        :avocado: tags=arch:mips64el
+        :avocado: tags=machine:malta
+        :avocado: tags=cpu:i6400
+        :avocado: tags=mips:smp
+        """
+        self.do_test_i6400_framebuffer_logo(7)
+
+    def test_mips_malta_i6400_framebuffer_logo_8cores(self):
+        """
+        :avocado: tags=arch:mips64el
+        :avocado: tags=machine:malta
+        :avocado: tags=cpu:i6400
+        :avocado: tags=mips:smp
+        """
+        self.do_test_i6400_framebuffer_logo(8)
-- 
2.7.4



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

* Re: [PULL 0/5] MIPS queue for February 27th, 2020
  2020-02-27 13:27 [PULL 0/5] MIPS queue for February 27th, 2020 Aleksandar Markovic
                   ` (4 preceding siblings ...)
  2020-02-27 13:27 ` [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer Aleksandar Markovic
@ 2020-02-28 14:02 ` Peter Maydell
  5 siblings, 0 replies; 13+ messages in thread
From: Peter Maydell @ 2020-02-28 14:02 UTC (permalink / raw)
  To: Aleksandar Markovic; +Cc: QEMU Developers, Aleksandar Markovic

On Thu, 27 Feb 2020 at 13:27, Aleksandar Markovic
<aleksandar.markovic@rt-rk.com> wrote:
>
> From: Aleksandar Markovic <amarkovic@wavecomp.com>
>
> The following changes since commit db736e0437aa6fd7c1b7e4599c17f9619ab6b837:
>
>   Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2020-02-25 13:31:16 +0000)
>
> are available in the git repository at:
>
>   https://github.com/AMarkovic/qemu tags/mips-queue-feb-27-2020
>
> for you to fetch changes up to 0484d9d4fbe9beacd3dd36fdf7fc3e14940bf078:
>
>   tests/acceptance: Count multiple Tux logos displayed on framebuffer (2020-02-27 14:19:07 +0100)
>
> ----------------------------------------------------------------
>
> MIPS queue for February 27th, 2020
>
>   - Adjusting maintainership of MIPS KVM CPUs
>   - Machine memory and interrupt-related minor improvements
>   - Acceptance test for SMP support on Malta with I6400 CPU
>


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.0
for any user-visible changes.

-- PMM


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

* Re: [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer
  2020-02-27 13:27 ` [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer Aleksandar Markovic
@ 2020-03-02 20:26   ` Peter Maydell
  2020-03-02 20:58     ` [EXTERNAL]Re: " Aleksandar Markovic
  0 siblings, 1 reply; 13+ messages in thread
From: Peter Maydell @ 2020-03-02 20:26 UTC (permalink / raw)
  To: Aleksandar Markovic
  Cc: QEMU Developers, Aleksandar Markovic, Philippe Mathieu-Daudé

On Thu, 27 Feb 2020 at 13:28, Aleksandar Markovic
<aleksandar.markovic@rt-rk.com> wrote:
>
> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
> Add a test that verifies that each core properly displays the Tux
> logo on the framebuffer device.
>
> We simply follow the OpenCV "Template Matching with Multiple Objects"
> tutorial, replacing Lionel Messi by Tux:
> https://docs.opencv.org/4.2.0/d4/dc6/tutorial_py_template_matching.html

Hi -- this doesn't seem to work on my system:

 (38/74) tests/acceptance/machine_arm_integratorcp.py:IntegratorMachine.test_integratorcp_console:
SKIP: untrusted code
 (39/74) tests/acceptance/machine_arm_integratorcp.py:IntegratorMachine.test_framebuffer_tux_logo:
SKIP: Python NumPy not installed
 (40/74) tests/acceptance/machine_arm_n8x0.py:N8x0Machine.test_n800:
SKIP: untrusted code
 (41/74) tests/acceptance/machine_arm_n8x0.py:N8x0Machine.test_n810:
SKIP: untrusted code
 (42/74) tests/acceptance/machine_m68k_nextcube.py:NextCubeMachine.test_bootrom_framebuffer_size:
PASS (3.47 s)
 (43/74) tests/acceptance/machine_m68k_nextcube.py:NextCubeMachine.test_bootrom_framebuffer_ocr_with_tesseract_v3:
SKIP: tesseract v3 OCR tool not available
 (44/74) tests/acceptance/machine_m68k_nextcube.py:NextCubeMachine.test_bootrom_framebuffer_ocr_with_tesseract_v4:
SKIP: tesseract v4 OCR tool not available
 (45/74) tests/acceptance/machine_mips_malta.py:MaltaMachineFramebuffer.test_mips_malta_i6400_framebuffer_logo_1core:
ERROR: name 'cv2' is not defined (5.43 s)

It looks like the @skipUnless directive on the class didn't
have any effect. Moving it to the individual test functions seems
to cause them to be skipped as intended (as the integratorcp
framebuffer test is):

diff --git a/tests/acceptance/machine_mips_malta.py
b/tests/acceptance/machine_mips_malta.py
index 92b4f28a112..98463f77573 100644
--- a/tests/acceptance/machine_mips_malta.py
+++ b/tests/acceptance/machine_mips_malta.py
@@ -30,8 +30,6 @@ except ImportError:
     CV2_AVAILABLE = False


-@skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
-@skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
 class MaltaMachineFramebuffer(Test):

     timeout = 30
@@ -91,6 +89,8 @@ class MaltaMachineFramebuffer(Test):
             cv2.imwrite(debug_png, screendump_bgr)
         self.assertGreaterEqual(tuxlogo_count, cpu_cores_count)

+    @skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
+    @skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
     def test_mips_malta_i6400_framebuffer_logo_1core(self):
         """
         :avocado: tags=arch:mips64el
@@ -99,6 +99,8 @@ class MaltaMachineFramebuffer(Test):
         """
         self.do_test_i6400_framebuffer_logo(1)

+    @skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
+    @skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
     def test_mips_malta_i6400_framebuffer_logo_7cores(self):
         """
         :avocado: tags=arch:mips64el
@@ -108,6 +110,8 @@ class MaltaMachineFramebuffer(Test):
         """
         self.do_test_i6400_framebuffer_logo(7)

+    @skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
+    @skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
     def test_mips_malta_i6400_framebuffer_logo_8cores(self):
         """
         :avocado: tags=arch:mips64el

thanks
-- PMM


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

* Re: [EXTERNAL]Re: [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer
  2020-03-02 20:26   ` Peter Maydell
@ 2020-03-02 20:58     ` Aleksandar Markovic
  2020-03-02 21:20       ` Aleksandar Markovic
  2020-03-02 23:40       ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 13+ messages in thread
From: Aleksandar Markovic @ 2020-03-02 20:58 UTC (permalink / raw)
  To: Peter Maydell, Aleksandar Markovic
  Cc: QEMU Developers, Philippe Mathieu-Daudé

> From: Peter Maydell <peter.maydell@linaro.org>
> Sent: Monday, March 2, 2020 9:26 PM
> To: Aleksandar Markovic
> Cc: QEMU Developers; Aleksandar Markovic; Philippe Mathieu-Daudé
> Subject: [EXTERNAL]Re: [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer
> 
> On Thu, 27 Feb 2020 at 13:28, Aleksandar Markovic
> <aleksandar.markovic@rt-rk.com> wrote:
> >
> > From: Philippe Mathieu-Daudé <f4bug@amsat.org>
> >
> > Add a test that verifies that each core properly displays the Tux
> > logo on the framebuffer device.
> >
> > We simply follow the OpenCV "Template Matching with Multiple Objects"
> > tutorial, replacing Lionel Messi by Tux:
> > https://docs.opencv.org/4.2.0/d4/dc6/tutorial_py_template_matching.html
> 
> Hi -- this doesn't seem to work on my system:
> 

Thank you for bringing this to our attention.

It looks like an honest mistake to me. Too bad
none of us tested the case of environment like
yours, even though it looked reasonable to test it.

Philippe, Peter's solution looks good to me. What
do you think?

Peter, would you like me to submit a patch with your
proposal, authored by you, and than soon send it as
a part of a small pull request?

Thanks again,
Aleksandar

>  (38/74) tests/acceptance/machine_arm_integratorcp.py:IntegratorMachine.test_integratorcp_console:
> SKIP: untrusted code
>  (39/74) tests/acceptance/machine_arm_integratorcp.py:IntegratorMachine.test_framebuffer_tux_logo:
> SKIP: Python NumPy not installed
>  (40/74) tests/acceptance/machine_arm_n8x0.py:N8x0Machine.test_n800:
> SKIP: untrusted code
>  (41/74) tests/acceptance/machine_arm_n8x0.py:N8x0Machine.test_n810:
> SKIP: untrusted code
>  (42/74) tests/acceptance/machine_m68k_nextcube.py:NextCubeMachine.test_bootrom_framebuffer_size:
> PASS (3.47 s)
>  (43/74) tests/acceptance/machine_m68k_nextcube.py:NextCubeMachine.test_bootrom_framebuffer_ocr_with_tesseract_v3:
> SKIP: tesseract v3 OCR tool not available
>  (44/74) tests/acceptance/machine_m68k_nextcube.py:NextCubeMachine.test_bootrom_framebuffer_ocr_with_tesseract_v4:
> SKIP: tesseract v4 OCR tool not available
>  (45/74) tests/acceptance/machine_mips_malta.py:MaltaMachineFramebuffer.test_mips_malta_i6400_framebuffer_logo_1core:
> ERROR: name 'cv2' is not defined (5.43 s)
> 
> It looks like the @skipUnless directive on the class didn't
> have any effect. Moving it to the individual test functions seems
> to cause them to be skipped as intended (as the integratorcp
> framebuffer test is):
> 
> diff --git a/tests/acceptance/machine_mips_malta.py
> b/tests/acceptance/machine_mips_malta.py
> index 92b4f28a112..98463f77573 100644
> --- a/tests/acceptance/machine_mips_malta.py
> +++ b/tests/acceptance/machine_mips_malta.py
> @@ -30,8 +30,6 @@ except ImportError:
>      CV2_AVAILABLE = False
> 
> 
> -@skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
> -@skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
>  class MaltaMachineFramebuffer(Test):
> 
>      timeout = 30
> @@ -91,6 +89,8 @@ class MaltaMachineFramebuffer(Test):
>              cv2.imwrite(debug_png, screendump_bgr)
>          self.assertGreaterEqual(tuxlogo_count, cpu_cores_count)
> 
> +    @skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
> +    @skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
>      def test_mips_malta_i6400_framebuffer_logo_1core(self):
>          """
>          :avocado: tags=arch:mips64el
> @@ -99,6 +99,8 @@ class MaltaMachineFramebuffer(Test):
>          """
>          self.do_test_i6400_framebuffer_logo(1)
> 
> +    @skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
> +    @skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
>      def test_mips_malta_i6400_framebuffer_logo_7cores(self):
>          """
>          :avocado: tags=arch:mips64el
> @@ -108,6 +110,8 @@ class MaltaMachineFramebuffer(Test):
>          """
>          self.do_test_i6400_framebuffer_logo(7)
> 
> +    @skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
> +    @skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
>      def test_mips_malta_i6400_framebuffer_logo_8cores(self):
>          """
>          :avocado: tags=arch:mips64el
> 
> thanks
> -- PMM


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

* Re: [EXTERNAL]Re: [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer
  2020-03-02 20:58     ` [EXTERNAL]Re: " Aleksandar Markovic
@ 2020-03-02 21:20       ` Aleksandar Markovic
  2020-03-02 23:40       ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 13+ messages in thread
From: Aleksandar Markovic @ 2020-03-02 21:20 UTC (permalink / raw)
  To: Peter Maydell, Aleksandar Markovic, Alex Bennée
  Cc: QEMU Developers, Philippe Mathieu-Daudé



________________________________________
From: Aleksandar Markovic <amarkovic@wavecomp.com>
Sent: Monday, March 2, 2020 9:58 PM
To: Peter Maydell; Aleksandar Markovic
Cc: QEMU Developers; Philippe Mathieu-Daudé
Subject: Re: [EXTERNAL]Re: [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer

> From: Peter Maydell <peter.maydell@linaro.org>
> Sent: Monday, March 2, 2020 9:26 PM
> To: Aleksandar Markovic
> Cc: QEMU Developers; Aleksandar Markovic; Philippe Mathieu-Daudé
> Subject: [EXTERNAL]Re: [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer
>
> On Thu, 27 Feb 2020 at 13:28, Aleksandar Markovic
> <aleksandar.markovic@rt-rk.com> wrote:
> >
> > From: Philippe Mathieu-Daudé <f4bug@amsat.org>
> >
> > Add a test that verifies that each core properly displays the Tux
> > logo on the framebuffer device.
> >
> > We simply follow the OpenCV "Template Matching with Multiple Objects"
> > tutorial, replacing Lionel Messi by Tux:
> > https://docs.opencv.org/4.2.0/d4/dc6/tutorial_py_template_matching.html
>
> Hi -- this doesn't seem to work on my system:
>

It appears Alex send a similar, but different patch already:

https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg00324.html

What do we do, Alex?

Thanks again,
Aleksandar

>  (38/74) tests/acceptance/machine_arm_integratorcp.py:IntegratorMachine.test_integratorcp_console:
> SKIP: untrusted code
>  (39/74) tests/acceptance/machine_arm_integratorcp.py:IntegratorMachine.test_framebuffer_tux_logo:
> SKIP: Python NumPy not installed
>  (40/74) tests/acceptance/machine_arm_n8x0.py:N8x0Machine.test_n800:
> SKIP: untrusted code
>  (41/74) tests/acceptance/machine_arm_n8x0.py:N8x0Machine.test_n810:
> SKIP: untrusted code
>  (42/74) tests/acceptance/machine_m68k_nextcube.py:NextCubeMachine.test_bootrom_framebuffer_size:
> PASS (3.47 s)
>  (43/74) tests/acceptance/machine_m68k_nextcube.py:NextCubeMachine.test_bootrom_framebuffer_ocr_with_tesseract_v3:
> SKIP: tesseract v3 OCR tool not available
>  (44/74) tests/acceptance/machine_m68k_nextcube.py:NextCubeMachine.test_bootrom_framebuffer_ocr_with_tesseract_v4:
> SKIP: tesseract v4 OCR tool not available
>  (45/74) tests/acceptance/machine_mips_malta.py:MaltaMachineFramebuffer.test_mips_malta_i6400_framebuffer_logo_1core:
> ERROR: name 'cv2' is not defined (5.43 s)
>
> It looks like the @skipUnless directive on the class didn't
> have any effect. Moving it to the individual test functions seems
> to cause them to be skipped as intended (as the integratorcp
> framebuffer test is):
>
> diff --git a/tests/acceptance/machine_mips_malta.py
> b/tests/acceptance/machine_mips_malta.py
> index 92b4f28a112..98463f77573 100644
> --- a/tests/acceptance/machine_mips_malta.py
> +++ b/tests/acceptance/machine_mips_malta.py
> @@ -30,8 +30,6 @@ except ImportError:
>      CV2_AVAILABLE = False
>
>
> -@skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
> -@skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
>  class MaltaMachineFramebuffer(Test):
>
>      timeout = 30
> @@ -91,6 +89,8 @@ class MaltaMachineFramebuffer(Test):
>              cv2.imwrite(debug_png, screendump_bgr)
>          self.assertGreaterEqual(tuxlogo_count, cpu_cores_count)
>
> +    @skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
> +    @skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
>      def test_mips_malta_i6400_framebuffer_logo_1core(self):
>          """
>          :avocado: tags=arch:mips64el
> @@ -99,6 +99,8 @@ class MaltaMachineFramebuffer(Test):
>          """
>          self.do_test_i6400_framebuffer_logo(1)
>
> +    @skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
> +    @skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
>      def test_mips_malta_i6400_framebuffer_logo_7cores(self):
>          """
>          :avocado: tags=arch:mips64el
> @@ -108,6 +110,8 @@ class MaltaMachineFramebuffer(Test):
>          """
>          self.do_test_i6400_framebuffer_logo(7)
>
> +    @skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
> +    @skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
>      def test_mips_malta_i6400_framebuffer_logo_8cores(self):
>          """
>          :avocado: tags=arch:mips64el
>
> thanks
> -- PMM


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

* Re: [EXTERNAL]Re: [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer
  2020-03-02 20:58     ` [EXTERNAL]Re: " Aleksandar Markovic
  2020-03-02 21:20       ` Aleksandar Markovic
@ 2020-03-02 23:40       ` Philippe Mathieu-Daudé
  2020-03-03 12:55         ` Philippe Mathieu-Daudé
  1 sibling, 1 reply; 13+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-03-02 23:40 UTC (permalink / raw)
  To: Aleksandar Markovic, Peter Maydell, Aleksandar Markovic
  Cc: QEMU Developers, Philippe Mathieu-Daudé

On 3/2/20 9:58 PM, Aleksandar Markovic wrote:
>> From: Peter Maydell <peter.maydell@linaro.org>
>> Sent: Monday, March 2, 2020 9:26 PM
>> To: Aleksandar Markovic
>> Cc: QEMU Developers; Aleksandar Markovic; Philippe Mathieu-Daudé
>> Subject: [EXTERNAL]Re: [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer
>>
>> On Thu, 27 Feb 2020 at 13:28, Aleksandar Markovic
>> <aleksandar.markovic@rt-rk.com> wrote:
>>>
>>> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>>
>>> Add a test that verifies that each core properly displays the Tux
>>> logo on the framebuffer device.
>>>
>>> We simply follow the OpenCV "Template Matching with Multiple Objects"
>>> tutorial, replacing Lionel Messi by Tux:
>>> https://docs.opencv.org/4.2.0/d4/dc6/tutorial_py_template_matching.html
>>
>> Hi -- this doesn't seem to work on my system:
>>
> 
> Thank you for bringing this to our attention.
> 
> It looks like an honest mistake to me. Too bad
> none of us tested the case of environment like
> yours, even though it looked reasonable to test it.

I'm sorry I missed that, I'm pretty sure I tested it as we noticed this 
"bug" in Avocado more than 1 year ago already (bug = class decorator not 
working). I suppose I forgot to test that on Travis-CI and all my 
systems have opencv2 installed.

> 
> Philippe, Peter's solution looks good to me. What
> do you think?

Yes this is correct. Alex suggested it earlier and I resend his patch 
fixed which is exactly the diff Peter pasted (I am just noticing it now):
https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg00389.html

> 
> Peter, would you like me to submit a patch with your
> proposal, authored by you, and than soon send it as
> a part of a small pull request?
> 
> Thanks again,
> Aleksandar
> 
>>   (38/74) tests/acceptance/machine_arm_integratorcp.py:IntegratorMachine.test_integratorcp_console:
>> SKIP: untrusted code
>>   (39/74) tests/acceptance/machine_arm_integratorcp.py:IntegratorMachine.test_framebuffer_tux_logo:
>> SKIP: Python NumPy not installed
>>   (40/74) tests/acceptance/machine_arm_n8x0.py:N8x0Machine.test_n800:
>> SKIP: untrusted code
>>   (41/74) tests/acceptance/machine_arm_n8x0.py:N8x0Machine.test_n810:
>> SKIP: untrusted code
>>   (42/74) tests/acceptance/machine_m68k_nextcube.py:NextCubeMachine.test_bootrom_framebuffer_size:
>> PASS (3.47 s)
>>   (43/74) tests/acceptance/machine_m68k_nextcube.py:NextCubeMachine.test_bootrom_framebuffer_ocr_with_tesseract_v3:
>> SKIP: tesseract v3 OCR tool not available
>>   (44/74) tests/acceptance/machine_m68k_nextcube.py:NextCubeMachine.test_bootrom_framebuffer_ocr_with_tesseract_v4:
>> SKIP: tesseract v4 OCR tool not available
>>   (45/74) tests/acceptance/machine_mips_malta.py:MaltaMachineFramebuffer.test_mips_malta_i6400_framebuffer_logo_1core:
>> ERROR: name 'cv2' is not defined (5.43 s)
>>
>> It looks like the @skipUnless directive on the class didn't
>> have any effect. Moving it to the individual test functions seems
>> to cause them to be skipped as intended (as the integratorcp
>> framebuffer test is):
>>
>> diff --git a/tests/acceptance/machine_mips_malta.py
>> b/tests/acceptance/machine_mips_malta.py
>> index 92b4f28a112..98463f77573 100644
>> --- a/tests/acceptance/machine_mips_malta.py
>> +++ b/tests/acceptance/machine_mips_malta.py
>> @@ -30,8 +30,6 @@ except ImportError:
>>       CV2_AVAILABLE = False
>>
>>
>> -@skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
>> -@skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
>>   class MaltaMachineFramebuffer(Test):
>>
>>       timeout = 30
>> @@ -91,6 +89,8 @@ class MaltaMachineFramebuffer(Test):
>>               cv2.imwrite(debug_png, screendump_bgr)
>>           self.assertGreaterEqual(tuxlogo_count, cpu_cores_count)
>>
>> +    @skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
>> +    @skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
>>       def test_mips_malta_i6400_framebuffer_logo_1core(self):
>>           """
>>           :avocado: tags=arch:mips64el
>> @@ -99,6 +99,8 @@ class MaltaMachineFramebuffer(Test):
>>           """
>>           self.do_test_i6400_framebuffer_logo(1)
>>
>> +    @skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
>> +    @skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
>>       def test_mips_malta_i6400_framebuffer_logo_7cores(self):
>>           """
>>           :avocado: tags=arch:mips64el
>> @@ -108,6 +110,8 @@ class MaltaMachineFramebuffer(Test):
>>           """
>>           self.do_test_i6400_framebuffer_logo(7)
>>
>> +    @skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
>> +    @skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
>>       def test_mips_malta_i6400_framebuffer_logo_8cores(self):
>>           """
>>           :avocado: tags=arch:mips64el
>>
>> thanks
>> -- PMM
> 
> 



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

* Re: [EXTERNAL]Re: [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer
  2020-03-02 23:40       ` Philippe Mathieu-Daudé
@ 2020-03-03 12:55         ` Philippe Mathieu-Daudé
  2020-03-03 14:29           ` Cleber Rosa
  0 siblings, 1 reply; 13+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-03-03 12:55 UTC (permalink / raw)
  To: Peter Maydell, Aleksandar Markovic, Cleber Rosa
  Cc: Alex Bennée, QEMU Developers, Aleksandar Markovic,
	Philippe Mathieu-Daudé

Hi Cleber,

 On Tue, Mar 3, 2020 at 12:40 AM Philippe Mathieu-Daudé
<philmd@redhat.com> wrote:
> On 3/2/20 9:58 PM, Aleksandar Markovic wrote:
> >> From: Peter Maydell <peter.maydell@linaro.org>
> >> Sent: Monday, March 2, 2020 9:26 PM
> >> To: Aleksandar Markovic
> >> Cc: QEMU Developers; Aleksandar Markovic; Philippe Mathieu-Daudé
> >> Subject: [EXTERNAL]Re: [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer
> >>
> >> On Thu, 27 Feb 2020 at 13:28, Aleksandar Markovic
> >> <aleksandar.markovic@rt-rk.com> wrote:
> >>>
> >>> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
> >>>
> >>> Add a test that verifies that each core properly displays the Tux
> >>> logo on the framebuffer device.
> >>>
> >>> We simply follow the OpenCV "Template Matching with Multiple Objects"
> >>> tutorial, replacing Lionel Messi by Tux:
> >>> https://docs.opencv.org/4.2.0/d4/dc6/tutorial_py_template_matching.html
> >>
> >> Hi -- this doesn't seem to work on my system:
> >>
> >
> > Thank you for bringing this to our attention.
> >
> > It looks like an honest mistake to me. Too bad
> > none of us tested the case of environment like
> > yours, even though it looked reasonable to test it.
>
> I'm sorry I missed that, I'm pretty sure I tested it as we noticed this
> "bug" in Avocado more than 1 year ago already (bug = class decorator not
> working).

I see in commit 2fe6f4d9ba you moved the @skip decorators to the setUp() method.
Is this a kind of kludge to not use it on all the test_*() methods?
(since we can not use it on an AvocadoTest class)

> I suppose I forgot to test that on Travis-CI and all my
> systems have opencv2 installed.
>
> >
> > Philippe, Peter's solution looks good to me. What
> > do you think?
>
> Yes this is correct. Alex suggested it earlier and I resend his patch
> fixed which is exactly the diff Peter pasted (I am just noticing it now):
> https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg00389.html
>
> >
> > Peter, would you like me to submit a patch with your
> > proposal, authored by you, and than soon send it as
> > a part of a small pull request?
> >
> > Thanks again,
> > Aleksandar
> >
> >>   (38/74) tests/acceptance/machine_arm_integratorcp.py:IntegratorMachine.test_integratorcp_console:
> >> SKIP: untrusted code
> >>   (39/74) tests/acceptance/machine_arm_integratorcp.py:IntegratorMachine.test_framebuffer_tux_logo:
> >> SKIP: Python NumPy not installed
> >>   (40/74) tests/acceptance/machine_arm_n8x0.py:N8x0Machine.test_n800:
> >> SKIP: untrusted code
> >>   (41/74) tests/acceptance/machine_arm_n8x0.py:N8x0Machine.test_n810:
> >> SKIP: untrusted code
> >>   (42/74) tests/acceptance/machine_m68k_nextcube.py:NextCubeMachine.test_bootrom_framebuffer_size:
> >> PASS (3.47 s)
> >>   (43/74) tests/acceptance/machine_m68k_nextcube.py:NextCubeMachine.test_bootrom_framebuffer_ocr_with_tesseract_v3:
> >> SKIP: tesseract v3 OCR tool not available
> >>   (44/74) tests/acceptance/machine_m68k_nextcube.py:NextCubeMachine.test_bootrom_framebuffer_ocr_with_tesseract_v4:
> >> SKIP: tesseract v4 OCR tool not available
> >>   (45/74) tests/acceptance/machine_mips_malta.py:MaltaMachineFramebuffer.test_mips_malta_i6400_framebuffer_logo_1core:
> >> ERROR: name 'cv2' is not defined (5.43 s)
> >>
> >> It looks like the @skipUnless directive on the class didn't
> >> have any effect. Moving it to the individual test functions seems
> >> to cause them to be skipped as intended (as the integratorcp
> >> framebuffer test is):
> >>
> >> diff --git a/tests/acceptance/machine_mips_malta.py
> >> b/tests/acceptance/machine_mips_malta.py
> >> index 92b4f28a112..98463f77573 100644
> >> --- a/tests/acceptance/machine_mips_malta.py
> >> +++ b/tests/acceptance/machine_mips_malta.py
> >> @@ -30,8 +30,6 @@ except ImportError:
> >>       CV2_AVAILABLE = False
> >>
> >>
> >> -@skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
> >> -@skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
> >>   class MaltaMachineFramebuffer(Test):
> >>
> >>       timeout = 30
> >> @@ -91,6 +89,8 @@ class MaltaMachineFramebuffer(Test):
> >>               cv2.imwrite(debug_png, screendump_bgr)
> >>           self.assertGreaterEqual(tuxlogo_count, cpu_cores_count)
> >>
> >> +    @skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
> >> +    @skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
> >>       def test_mips_malta_i6400_framebuffer_logo_1core(self):
> >>           """
> >>           :avocado: tags=arch:mips64el
> >> @@ -99,6 +99,8 @@ class MaltaMachineFramebuffer(Test):
> >>           """
> >>           self.do_test_i6400_framebuffer_logo(1)
> >>
> >> +    @skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
> >> +    @skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
> >>       def test_mips_malta_i6400_framebuffer_logo_7cores(self):
> >>           """
> >>           :avocado: tags=arch:mips64el
> >> @@ -108,6 +110,8 @@ class MaltaMachineFramebuffer(Test):
> >>           """
> >>           self.do_test_i6400_framebuffer_logo(7)
> >>
> >> +    @skipUnless(NUMPY_AVAILABLE, 'Python NumPy not installed')
> >> +    @skipUnless(CV2_AVAILABLE, 'Python OpenCV not installed')
> >>       def test_mips_malta_i6400_framebuffer_logo_8cores(self):
> >>           """
> >>           :avocado: tags=arch:mips64el
> >>
> >> thanks
> >> -- PMM
> >
> >



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

* Re: [EXTERNAL]Re: [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer
  2020-03-03 12:55         ` Philippe Mathieu-Daudé
@ 2020-03-03 14:29           ` Cleber Rosa
  0 siblings, 0 replies; 13+ messages in thread
From: Cleber Rosa @ 2020-03-03 14:29 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, QEMU Developers, Philippe Mathieu-Daudé,
	Aleksandar Markovic, Aleksandar Markovic, Alex Bennée

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

On Tue, Mar 03, 2020 at 01:55:35PM +0100, Philippe Mathieu-Daudé wrote:
> Hi Cleber,
>

Hi Phil!

>  On Tue, Mar 3, 2020 at 12:40 AM Philippe Mathieu-Daudé
> <philmd@redhat.com> wrote:
> > On 3/2/20 9:58 PM, Aleksandar Markovic wrote:
> > >> From: Peter Maydell <peter.maydell@linaro.org>
> > >> Sent: Monday, March 2, 2020 9:26 PM
> > >> To: Aleksandar Markovic
> > >> Cc: QEMU Developers; Aleksandar Markovic; Philippe Mathieu-Daudé
> > >> Subject: [EXTERNAL]Re: [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer
> > >>
> > >> On Thu, 27 Feb 2020 at 13:28, Aleksandar Markovic
> > >> <aleksandar.markovic@rt-rk.com> wrote:
> > >>>
> > >>> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
> > >>>
> > >>> Add a test that verifies that each core properly displays the Tux
> > >>> logo on the framebuffer device.
> > >>>
> > >>> We simply follow the OpenCV "Template Matching with Multiple Objects"
> > >>> tutorial, replacing Lionel Messi by Tux:
> > >>> https://docs.opencv.org/4.2.0/d4/dc6/tutorial_py_template_matching.html
> > >>
> > >> Hi -- this doesn't seem to work on my system:
> > >>
> > >
> > > Thank you for bringing this to our attention.
> > >
> > > It looks like an honest mistake to me. Too bad
> > > none of us tested the case of environment like
> > > yours, even though it looked reasonable to test it.
> >
> > I'm sorry I missed that, I'm pretty sure I tested it as we noticed this
> > "bug" in Avocado more than 1 year ago already (bug = class decorator not
> > working).
> 
> I see in commit 2fe6f4d9ba you moved the @skip decorators to the setUp() method.
> Is this a kind of kludge to not use it on all the test_*() methods?
> (since we can not use it on an AvocadoTest class)
>

Yes, that was a workaround for a previous Avocado limitation.  As I said
on another thread, on Avocado >= 76.0 it's possible to just decorate the
entire class.

- Cleber.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2020-03-03 14:30 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-27 13:27 [PULL 0/5] MIPS queue for February 27th, 2020 Aleksandar Markovic
2020-02-27 13:27 ` [PULL 1/5] MAINTAINERS: Orphan MIPS KVM CPUs Aleksandar Markovic
2020-02-27 13:27 ` [PULL 2/5] MAINTAINERS: Reactivate " Aleksandar Markovic
2020-02-27 13:27 ` [PULL 3/5] hw/mips/mips_int: Simplify cpu_mips_irq_init_cpu() Aleksandar Markovic
2020-02-27 13:27 ` [PULL 4/5] hw/mips: Use memory_region_init_rom() with read-only regions Aleksandar Markovic
2020-02-27 13:27 ` [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer Aleksandar Markovic
2020-03-02 20:26   ` Peter Maydell
2020-03-02 20:58     ` [EXTERNAL]Re: " Aleksandar Markovic
2020-03-02 21:20       ` Aleksandar Markovic
2020-03-02 23:40       ` Philippe Mathieu-Daudé
2020-03-03 12:55         ` Philippe Mathieu-Daudé
2020-03-03 14:29           ` Cleber Rosa
2020-02-28 14:02 ` [PULL 0/5] MIPS queue for February 27th, 2020 Peter Maydell

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.