mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-24 15:59:03 +00:00
This patch ensures runTestHarness returns either EXIT_FAILURE or EXIT_SUCCESS to avoid undefined behaviour.
This commit is contained in:
committed by
Kévin Petit
parent
03813a9674
commit
d99f96fe18
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// Copyright (c) 2017 The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 The Khronos Group Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@@ -72,6 +72,8 @@ extern cl_uint gRandomSeed;
|
||||
|
||||
// Supply a list of functions to test here. This will allocate a CL device, create a context, all that
|
||||
// setup work, and then call each function in turn as dictatated by the passed arguments.
|
||||
// Returns EXIT_SUCCESS iff all tests succeeded or the tests were listed,
|
||||
// otherwise return EXIT_FAILURE.
|
||||
extern int runTestHarness( int argc, const char *argv[], int testNum, test_definition testList[],
|
||||
int imageSupportRequired, int forceNoContextCreation, cl_command_queue_properties queueProps );
|
||||
|
||||
@@ -79,6 +81,8 @@ extern int runTestHarness( int argc, const char *argv[], int testNum, test_defin
|
||||
typedef test_status (*DeviceCheckFn)( cl_device_id device );
|
||||
|
||||
// Same as runTestHarness, but also supplies a function that checks the created device for required functionality.
|
||||
// Returns EXIT_SUCCESS iff all tests succeeded or the tests were listed,
|
||||
// otherwise return EXIT_FAILURE.
|
||||
extern int runTestHarnessWithCheck( int argc, const char *argv[], int testNum, test_definition testList[],
|
||||
int imageSupportRequired, int forceNoContextCreation,
|
||||
cl_command_queue_properties queueProps, DeviceCheckFn deviceCheckFn );
|
||||
|
||||
Reference in New Issue
Block a user