MIPS queue for February 27th, 2020
From: Aleksandar Markovic <[email protected]>
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
Signature · 1 line
2.7.4
[PULL 1/5] MAINTAINERS: Orphan MIPS KVM CPUs
From: James Hogan <[email protected]>
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.
Message-Id: <[email protected]>
--- MAINTAINERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
MAINTAINERS +1 -2
@@ -365,9 +365,8 @@ S: Maintained F: target/arm/kvm.c MIPS KVM CPUs -M: James Hogan <[email protected]> R: Aleksandar Rikalo <[email protected]> -S: Maintained +S: Orphan F: target/mips/kvm.c PPC KVM CPUs
Signature · 1 line
2.7.4
[PULL 2/5] MAINTAINERS: Reactivate MIPS KVM CPUs
In reply to Aleksandar MarkovicFrom: Aleksandar Markovic <[email protected]>
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.
Message-Id: <[email protected]>
--- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
MAINTAINERS +2 -2
@@ -365,8 +365,8 @@ S: Maintained F: target/arm/kvm.c MIPS KVM CPUs -R: Aleksandar Rikalo <[email protected]> -S: Orphan +M: Aleksandar Markovic <[email protected]> +S: Odd Fixes F: target/mips/kvm.c PPC KVM CPUs
Signature · 1 line
2.7.4
[PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer
In reply to Aleksandar MarkovicFrom: Philippe Mathieu-Daudé <[email protected]>
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 sIf 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
Message-Id: <[email protected]>
--- MAINTAINERS | 1 + tests/acceptance/machine_mips_malta.py | 118 +++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+) create mode 100644 tests/acceptance/machine_mips_malta.py
MAINTAINERS +1 -0
@@ -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 <[email protected]>
tests/acceptance/machine_mips_malta.py new file +118 -0
118 lines not on this page · raw message
Signature · 1 line
2.7.4
Re: [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer
Quoted 9 lines · Aleksandar Markovic
From: Philippe Mathieu-Daudé <[email protected]>
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):
(quoted diff) +0 -0
b/tests/acceptance/machine_mips_malta.py
index 92b4f28a112..98463f77573 100644
tests/acceptance/machine_mips_malta.py +6 -2
@@ -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
Re: [EXTERNAL]Re: [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer
Quoted 11 lines
From: Peter Maydell <[email protected]>
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 framebufferQuoted 3 lines · Aleksandar Markovic
From: Philippe Mathieu-Daudé <[email protected]>
Quoted 9 lines
Quoted 6 lines
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.htmlHi -- 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
Quoted 66 lines
(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):
tests/acceptance/machine_mips_malta.py +6
-2@@ -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:mips64elthanks
-- PMM
Re: [EXTERNAL]Re: [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer
________________________________________
From: Aleksandar Markovic <[email protected]>
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
Quoted 11 lines
From: Peter Maydell <[email protected]>
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 framebufferQuoted 3 lines · Aleksandar Markovic
From: Philippe Mathieu-Daudé <[email protected]>
Quoted 9 lines
Quoted 6 lines
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.htmlHi -- 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
Quoted 66 lines
(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):
tests/acceptance/machine_mips_malta.py +6
-2@@ -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:mips64elthanks
-- PMM
Re: [EXTERNAL]Re: [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer
In reply to Aleksandar MarkovicQuoted 18 lines · Aleksandar Markovic
Quoted 18 lines
From: Peter Maydell <[email protected]>
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 framebufferQuoted 9 lines · Aleksandar Markovic
From: Philippe Mathieu-Daudé <[email protected]>
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
Quoted 8 lines
Quoted 2 lines
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.
Quoted 3 lines
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
Quoted 76 lines
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,
AleksandarQuoted 66 lines
(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):
tests/acceptance/machine_mips_malta.py +6
-2@@ -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:mips64elthanks
-- PMM
Re: [EXTERNAL]Re: [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer
Hi Cleber,
Quoted 24 lines · Philippe Mathieu-Daudé
Quoted 23 lines · Aleksandar Markovic
Quoted 11 lines
From: Peter Maydell <[email protected]>
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 framebufferQuoted 3 lines · Aleksandar Markovic
From: Philippe Mathieu-Daudé <[email protected]>
Quoted 9 lines
Quoted 6 lines
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.htmlHi -- this doesn't seem to work on my system:
Thank you for bringing this to our attention.
Quoted 7 lines
Quoted 3 lines
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)
Quoted 87 lines
I suppose I forgot to test that on Travis-CI and all my systems have opencv2 installed.
Quoted 3 lines
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.htmlQuoted 76 lines
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,
AleksandarQuoted 66 lines
(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):
tests/acceptance/machine_mips_malta.py +6
-2@@ -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:mips64elthanks
-- PMM
Re: [EXTERNAL]Re: [PULL 5/5] tests/acceptance: Count multiple Tux logos displayed on framebuffer
Quoted 2 lines · Philippe Mathieu-Daudé
Hi Cleber,
Hi Phil!
Quoted 30 lines
Quoted 28 lines · Philippe Mathieu-Daudé
Quoted 26 lines · Aleksandar Markovic
Quoted 11 lines
From: Peter Maydell <[email protected]>
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 framebufferQuoted 3 lines · Aleksandar Markovic
From: Philippe Mathieu-Daudé <[email protected]>
Quoted 9 lines
Quoted 6 lines
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.htmlHi -- 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.
Quoted 8 lines
Quoted 3 lines
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
2fe6f4d9bayou moved the @skip decorators to thesetUp()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.
[PULL 3/5] hw/mips/mips_int: Simplify cpu_mips_irq_init_cpu()
In reply to Aleksandar MarkovicFrom: Philippe Mathieu-Daudé <[email protected]>
Since commit d8ed887bdc, the cpu_mips_irq_request handler takes a pointer to MIPSCPU in its opaque argument. Directly pass the cpu pointer.
Message-Id: <[email protected]>
--- hw/mips/mips_int.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/mips/mips_int.c +1 -1
@@ -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]; }
Signature · 1 line
2.7.4
[PULL 4/5] hw/mips: Use memory_region_init_rom() with read-only regions
In reply to Aleksandar MarkovicFrom: Philippe Mathieu-Daudé <[email protected]>
This commit was produced with the Coccinelle script scripts/coccinelle/memory-region-housekeeping.cocci.
Message-Id: <[email protected]>
--- 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(-)
hw/mips/mips_fulong2e.c +1 -2
@@ -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);
hw/mips/mips_jazz.c +2 -4
@@ -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 */
hw/mips/mips_mipssim.c +1 -2
@@ -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);
hw/mips/mips_r4k.c +1 -2
@@ -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 );
Signature · 1 line
2.7.4
Peter Maydell
AppliedQuoted 15 lines · Aleksandar Markovic
From: Aleksandar Markovic <[email protected]>
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)
Quoted 8 lines
----------------------------------------------------------------
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