In the commonfs test, the test_unary_fn test case returns -1 if the calculated values are not equal to the reference values.
Excerpt from the test_unary_fn test case:
if (verifyFn((T *)&input_ptr.front(), (T *)&output_ptr.front(),
n_elems * (i + 1)))
{
log_error("%s %s%d test failed\n", fnName.c_str(), tname.c_str(),
((g_arrVecSizes[i])));
err = -1;
}
The -1 code corresponds to CL_DEVICE_NOT_FOUND.
Maybe in this case, you need to change the error code to another one? CL_DEVICE_NOT_FOUND may be misleading.