Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print list of failed tests at the end of the tornado-tests script #573

Merged
merged 7 commits into from
Oct 9, 2024

Conversation

mairooni
Copy link
Collaborator

@mairooni mairooni commented Oct 1, 2024

Description

This PR extends the tornado-tests script to print a summary of the tests that fail along with information about whether they are whilelisted or not. This way it's easy to track the failing tests without having to go through all the output of the tornado-tests script.
Below is the output of the test script with the proposed extension:

==================================================
              Unit tests report 
==================================================

{'[PASS]': 666, '[FAILED]': 5, '[UNSUPPORTED]': 46}
Coverage [PASS/(PASS+FAIL)]: 99.25%
Coverage [PASS/(PASS+FAIL+UNSUPPORTED)]: 92.89%

==================================================
FAILED TESTS
==================================================
uk.ac.manchester.tornado.unittests.foundation.TestIf#test06 - [WHITELISTED]: YES
uk.ac.manchester.tornado.unittests.kernelcontext.matrices.TestMatrixMultiplicationKernelContext#mxm2DKernelContext01 - [WHITELISTED]: YES
uk.ac.manchester.tornado.unittests.kernelcontext.matrices.TestMatrixMultiplicationKernelContext#mxm2DKernelContext02 - [WHITELISTED]: YES
uk.ac.manchester.tornado.unittests.compute.ComputeTests#testMandelbrot - [WHITELISTED]: YES
uk.ac.manchester.tornado.unittests.compute.ComputeTests#testJuliaSets - [WHITELISTED]: YES
==================================================
Total Time(s): 400.74899530410767

Backend/s tested

Mark the backends affected by this PR.

  • OpenCL
  • PTX
  • SPIRV

OS tested

Mark the OS where this PR is tested.

  • Linux
  • OSx
  • Windows

Did you check on FPGAs?

If it is applicable, check your changes on FPGAs.

  • Yes
  • No

How to test the new patch?

Run make tests


@mairooni mairooni added tests feature New feature proposal labels Oct 1, 2024
@mairooni mairooni requested review from jjfumero and stratika October 1, 2024 13:54
@mairooni mairooni self-assigned this Oct 1, 2024
@stratika
Copy link
Collaborator

stratika commented Oct 1, 2024

I have an idea. I would like your opinion. Can we add one more line that lists the total number of tests, and any deviations from the current run?
The current run should be the summary of the PASS, FAILED, UNSUPPORTED in order to indicate in one line, whether we had some tests that did not run due to SEGFAULT.

I suggest that because currently the SEGFAULT tests are not counted as FAILED. Any ideas/comments @jjfumero @mairooni ?

@jjfumero
Copy link
Member

jjfumero commented Oct 2, 2024

Yes, we need to add if any test/s had SEGFAULT and report it.

@mairooni
Copy link
Collaborator Author

mairooni commented Oct 8, 2024

I extended the test script to also report the unit tests that triggered a segfault. Please have another look.

@@ -506,21 +509,25 @@ def processStats(out, stats):
name = name[:-16]

if (className + "#" + name in __TORNADO_TESTS_WHITE_LIST__):
failedTests[className + "#" + name] = "YES"
print(Colors.RED + "Test: " + className + "#" + name + " in whiteList." + Colors.RESET)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we report the white-listed failed test as orange? in order to make it easy to distinguish, if a non-whitelisted test has failed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 Good idea.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, can we also print the list of non-whitelisted tests that failed? And this could be displaying in RED.

I see that if we have white-listed and non-whitelisted tests, we print them all as RED. For example:
Screenshot from 2024-10-08 13-32-17

In this case, I deliberately made some tests to fail.

@stratika
Copy link
Collaborator

stratika commented Oct 8, 2024

Here is also the output of spirv-levelzero with SEGFAULTS, looks good to me.
Screenshot from 2024-10-08 13-42-31

@mairooni
Copy link
Collaborator Author

mairooni commented Oct 8, 2024

The whitelisted tests are now printed in orange

Copy link
Collaborator

@stratika stratika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @mairooni

@jjfumero
Copy link
Member

jjfumero commented Oct 9, 2024

Is this ready to merge?

@stratika
Copy link
Collaborator

stratika commented Oct 9, 2024

Is this ready to merge?

yes

@jjfumero jjfumero merged commit b231ee2 into beehive-lab:develop Oct 9, 2024
2 checks passed
@mairooni mairooni deleted the feat/print_failed_tests branch October 9, 2024 09:03
jjfumero added a commit to jjfumero/TornadoVM that referenced this pull request Dec 20, 2024
Improvements
=============

- beehive-lab#573: Enhanced output of unit-tests with a summary  of pass-rates and fail-rates.
- beehive-lab#576: Extended support for 3D matrices.
- beehive-lab#580: Extended debug information for execution plans.
- beehive-lab#584: Added helper menu for the ``tornado`` launcher script when no arguments are passed.
- beehive-lab#589: Enable partial loop unrolling for all backends.
- beehive-lab#594: Added RISC-V 64 CPU port support to run OpenCL with vector instructions RVV 1.0 (using the Codeplay OCK Toolkit).
- beehive-lab#598: OpenCL low-level buffers tagged as read, write and read/write based on the data dependency analysis.
- beehive-lab#601: Feature to select an immutable task graph to execute from a multi-task graph execution plan.

Compatibility
=============

- beehive-lab#570:  Extended timeout for all suite of unit-tests.
- beehive-lab#579: Removed legacy JDK 8 and JDK11 build options from the TornadoVM installer.
- beehive-lab#582: Restored tornado runner scripts for IntellIJ.
- beehive-lab#583: Automatic generation of IDE IntelliJ configuration runner files from the TornadoVM command.
- beehive-lab#597: Updated white-list of unit-test and checkstyle improved.

Bug Fixes
=============

- beehive-lab#571: Fix issues with bracket closing for if/loops conditions.
- beehive-lab#572: Fix for printing default execution plans (execution plans with default parameters).
- beehive-lab#575: Fix the Level Zero version used for building the SPIR-V backend.
- beehive-lab#577: Fix checkstyle.
- beehive-lab#587: Fix thread scheduler for new NVIDIA Drivers.
- beehive-lab#592: Fix ``Float.POSITIVE_INFINITY`` and ``Float.NEGATIVE_INFINITIVE`` constants for the OpenCL, CUDA and SPIR-V backends.
- beehive-lab#596: Fix extra closing bracket during the code-generation for the FPGAs.
- Remove the intermediate CUDA pinned memory regions in the JNI code: [link](beehive-lab@9c3f8ce)
- Fix bitwise negation operations for the PTX backend:  [link](beehive-lab@0db1cd3)
- `GetBackendImpl::getAllDevices` thread-safe: [link](beehive-lab@0d44252)
- Check size elements for memory segments: [link](beehive-lab@4360385)
@jjfumero jjfumero mentioned this pull request Dec 20, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature proposal tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants