Replace error-prone `create_random_data` with a reliable implementation

Open
#2,182 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
testing-qa

Research direction

Start by locating every call to create_random_data and read the related discussion in #2177, paying attention to the two files identified there. Replace or remove the function's uses across the reported call sites, with completion meaning no remaining use of create_random_data and the OpenCL CTS tests still passing.

Written by the indexing model from the issue text.

Description

create_random_data is an error-prone function that returns a pointer to allocated memory using malloc.

As mentioned in #2177:

we really ought to remove use of the create_random_data function entirely given that it's so error-prone. This shouldn't be too bad, since there are only a dozen or so places where create_random_data is called, and about half of the uses are in these two files.

Dominant language
C++
Stars
234
Forks
240
Avg merge
6d 12h
Merged PRs (30d)
15

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from KhronosGroup/OpenCL-CTS

All issues in KhronosGroup/OpenCL-CTS

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.