I think using the uname thing to check if we can run the unit test or not is ok, but as you noted we should not use it in the other code and so just depend on the syscall that will fail if the feature is not implemented.