Sorry for a delay in response. No it is not any reason to add testing specifically for half. We can also do the same tests for other data types. Here we just check that it is no any qualifiers in metadata.
Btw, if I read the spec then it feels like we should put the qualifiers of the pointee type instead:
CL_KERNEL_ARG_TYPE_VOLATILE is returned if the argument is a pointer and the referenced type is declared with the volatile qualifier. For example, a kernel argument declared as global int volatile *x returns CL_KERNEL_ARG_TYPE_VOLATILE but a kernel argument declared as global int *volatile x does not. Similarly, CL_KERNEL_ARG_TYPE_RESTRICT or CL_KERNEL_ARG_TYPE_CONST is returned if the argument is a pointer and the referenced type is declared with the restrict or const qualifier. For example, a kernel argument declared as global int const *x returns CL_KERNEL_ARG_TYPE_CONST but a kernel argument declared as global int *const x does not.
It seems that the function foo is attempting to test that too. Perhaps we could unify the testing and create all combinations of pointer and non pointer types which would have qualifier and not.
I don't feel that we should test all possible types though...