Commit Graph

26 Commits

Author SHA1 Message Date
Chetan Mistry
5f869e1c98 Move TEST_SKIPPED_ITSELF to test_status in testHarness (#1089)
TEST_SKIPPED_ITSELF was originally located in
threadTesting.h but this no longer makes sense.
This change moves the definition to the test_status
struct in testHarness so that it can be used in the same
way that test_status' can be used.

Signed-off-by: Chetankumar Mistry <chetan.mistry@arm.com>
2021-01-04 15:20:19 +00:00
ellnor01
5ae5e7a1fa Remove imageSupportRequired parameter to runTestHarness (#1077)
* Tests requiring image support use runTestHarnessWithCheck

Removing special case for images in runTestHarness.

Fixes #710

* Remove imageSupportRequired argument

Tests which require image support now specify this while
calling runTestHarnessWithCheck.

Fixes #710

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
2020-12-09 16:12:40 +00:00
ellnor01
63f01be181 Reimplement buffer tests (#1007)
* Reimplement buffer tests

Reintegrated and fixed test code for buffer tests buffer_read_half and
buffer_write_half tests.

Added mem_alloc_ref_flags test code, as was previously non-existent,
to test CL_MEM_ALLOC_HOST_PTR. This flag was otherwise untested and
as similar tests within the suite are used to test other cl_mem_flags
it has been assumed that this was the purpose of the test.

Fixes #439

Change-Id: I5accf986be7436d09377d0bfd7afd5de2235c329
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>

* move mem_read_write_flags to a common function

Code under mem_*_flags tests have a lot of duplication, this is
the first step of moving test code to a common function.

Contributes #439

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>

* move mem_write_only_flags test code to a common function

Code under mem_*_flags tests have a lot of duplication

Contributes #439

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>

* move mem_read_only_flags test code to a common function

Code under mem_*_flags tests have a lot of duplication

Contributes #439

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>

* move mem_copy_host_flags test code to a common function

Code under mem_*_flags tests have a lot of duplication, moved
mem_copy_host_flags code and rearranged function where appropriate

mem_ref_alloc_flags test also uses common function.

Contributes #439

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>

* Remove unused NOT_IMPLEMENTED_TEST macro

This define is not in use anymore, since tests have been
reimplemented in #439. Tests should be working and implemented
or not registered.

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
2020-11-06 11:33:36 +00:00
Kévin Petit
0e67969989 Fix build warning/error introduced by 8d443029 (#1042)
"control reaches end of non-void function"

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-11-06 10:09:33 +00:00
Stuart Brady
af7d914514 Reformat test harness code (#940)
* Reformat common help text

Signed-off-by: Stuart Brady <stuart.brady@arm.com>

* Reformat test harness code

This goes part of the way to fixing issue #625.

Signed-off-by: Stuart Brady <stuart.brady@arm.com>
2020-10-30 14:13:52 +00:00
Kenneth Benzie
8d44302935 Return a non-zero exit-code when a sub-test fails (#951)
When running sub-tests explicitly on the command line and that sub-test
fails, the test harness returns `0` from `main()`. This is problematic
in automated testing environments as failed tests can be hidden.

This patch iterates over all the test results in the `resultTestList`
after all sub-tests have completed, if any of the tests failed a
non-zero value is returned from `parseAndCallCommandLineTests()` which
is then propagated up the call stack to `main()`.
2020-10-19 23:08:40 -07:00
Kévin Petit
3320035581 Align with updated conformance process (#989)
- Remove the requirement to detail values for device queries and list
  extensions in the submission template. They are printed by computeinfo.
- Require that tests skipped in accordance with the conformance
  process be listed in the submission template.
- Remove support for OPENCL_1_0_DEVICE. This variable doesn't control
  anything anymore and the updated conformance process no longer refers
  to it.
- Require that implementations running via a loader document the loader
  that was used.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-09-29 13:51:49 -07:00
Pierre Moreau
c001dc2d9c Only include sys/sysctl.h on for Apple (#916)
glibc deprecated that header in version 2.30, and removed it in 2.32.
2020-08-27 18:31:51 +01:00
aarongreig
fb55f7e81c Set new minimum version for the spirv_new tests. (#854)
This allows 1.2 implementations with the cl_khr_il_program extension to run them.
2020-07-31 13:13:08 +01:00
Grzegorz Wawiorko
44a240367e Fix code format errors 2020-07-23 17:21:07 +01:00
Grzegorz Wawiorko
9a006ba1a0 Spirv readiness - move to harness
Fixes support  cl_khr_il_program
2020-07-23 17:21:07 +01:00
Grzegorz Wawiorko
adec8f9412 Add support for cl_khr_il_program extension 2020-07-23 17:21:07 +01:00
Grzegorz Wawiorko
3730bce4e8 SPIR-V handling on different OpenCL devices version
Example usage for bruteforce and spirv_new
2020-07-23 17:21:07 +01:00
Grzegorz Wawiorko
d643dc5399 Add API name to version_expected_info function 2020-07-23 17:21:07 +01:00
Kévin Petit
5e2f5b857e Accept OpenCL 3.0 in version parsing code and use where appropriate (#752)
* Accept OpenCL 3.0 in version parsing code and use where appropriate

There were a number of tests against 2.2 that are clearer against 3.0.

Fixes #751

Signed-off-by: Kévin Petit <kpet@free.fr>

* Remove CL_EXPERIMENTAL guards

Signed-off-by: Kévin Petit <kpet@free.fr>

* formatting

* Configure the headers for OpenCL 3.0

* more format fixes
2020-04-30 11:51:06 +01:00
ellnor01
ef3528e78a Ensure is_extension_available is used where possible (#721)
(Patch1)
A number of tests have got their own code for checking the presence of
extensions. This change replaces that code with is_extension_available
function.

Contributes to #627

Change-Id: I8dd2233719aa8c84841ac61776437d7f6e3fafe6
Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
2020-04-02 21:22:02 +01:00
Jeremy Kemp
5e84ad0c19 Generic Address Space: Skip tests utlilising SVM on devices that do n… (#712)
* Harness: Added an option for a test to skip itself.

New condtion in callSingleTestFunction. This allows a test to return TEST_SKIP if the device does not support the requested test.

* Split generic_ptr_to_host_mem into two tests.

The old generic_ptr_to_host_mem test tests two different device capabilities (SVM and not SVM). This is a prerequisite for the following commit.

* Generic Address Space: Skip tests utlilising SVM on devices that do not support SVM.

Where a device does not support SVM, do not run the generic address space test(s) that rely on SVM.
2020-03-27 12:38:30 +00:00
John Kesapides
d128fea964 Global variable gDeviceType correctly set (#611)
Add gDeviceType set on kernel_read_write tests(image_streams)
as the device type affects the way validation is performed in the test.

Signed-off-by: John Kesapides <john.kesapides@arm.com>
2020-03-26 22:14:46 +00:00
Grzegorz Wawiorko
51cd792e9e Fix test skip handling while test initialization - device_timer (#667) 2020-03-10 18:25:49 +00:00
Kévin Petit
b2eba77d42 Get rid of test_finish macro and related ATF cruft (#633)
Closes #431

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-03-02 15:06:44 +00:00
James Price
5f77d763ea Do not include sys/sysctl.h on Android (#635)
Android has linux/sysctl.h, but the functions that need it are not
used when targeting Android at the moment.
2020-02-28 08:38:52 +00:00
Radek Szymanski
80c3a27a6a Remove unused parameter (#630)
The imageSupportRequired param is not needed in runTestHarnessWithCheck,
so just remove it.

Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
2020-02-27 15:36:28 +00:00
Kévin Petit
d5334dc61d Get rid of checkDeviceTypeOverride (#602)
This is now done in the test harness.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-02-24 10:34:04 +00:00
Grzegorz Wawiorko
452adcd7be Fix - Windows build errors - utsname sysctl files (#621) 2020-02-24 10:28:05 +00:00
Bhargav Das
b2cb18073c Improved PrintArch functions (#595) (#601)
Moved all duplicate 'PrintArch' functions to testHarness.c
Replaced sysctl system call used in 'PrintArch' function with uname
system call

Signed-off-by: bhargavdas <bhargav_das@mentor.com>

Update testHarness.c
2020-02-21 16:47:54 +00:00
James Price
bce4e48c89 Rename harness .c sources to .cpp where necessary (#513)
Remove hacks from harness CMakeLists.txt to force language.

Contributes to KhronosGroup/OpenCL-CTS#25
2020-02-20 21:09:36 +00:00