[LTP] [PATCH] timer_create01: accept kernel ENOTSUPP

Cyril Hrubis chrubis@suse.cz
Wed Oct 23 16:35:11 CEST 2019


Hi!
> > You are right. We want this to succeed with EOPNOTSUPP, as it's a valid error
> > from kernel space.
> 
> Actually, man says that EOPNOTSUPP is only valid for socket operations.
> So no, we should not go out of our way to explicitly check timer errors
> against EOPNOTSUPP either. (It's also a waste of time because on Linux,
> ENOTSUP == EOPNOTSUPP).

Beware that kernel defines ENOTSUP that is not equal to EOPNOTSUPP and
in this case this value leaked to userspace leading to invalid userspace
errno value.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list