From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyril Hrubis Date: Wed, 21 Aug 2019 10:36:50 +0200 Subject: [LTP] [PATCH] tst_res: Print errno number in addition to error name In-Reply-To: <87y2znuf0a.fsf@rpws.prws.suse.cz> References: <20190819133618.7538-1-rpalethorpe@suse.com> <20190820095521.GA22253@rei.lan> <20190820102711.GA22483@rei.lan> <87y2znuf0a.fsf@rpws.prws.suse.cz> Message-ID: <20190821083650.GA26334@rei.lan> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it Hi! > >> > > It appears we are atleast missing ENOTSUPP (524) which is probably returned by > >> > > create_timer for some alarm clocks on none x86 arches. This isn't entirely > >> > > clear, but what is clear is that it would help to know what the error number > >> > > is without using strace. > >> > > >> > Can we please also patch the lib/errnos.h so that the ENOTSUPP is > >> > included there as well? > >> > >> Not sure if we should do that since it(from google) says ENOTSUPP is > >> not intended to used in userland. > > I suppose we could print a warning/fail if any error value over 512 > (ERESTARTSYS) is seen by tst_res(). We can define these error numbers in > user land for debugging purposes. Sounds good to me, I wouldn't do it a fail, even simple TINFO message that would say that we got unexpected errno. And we should btw do that for the tst_strerrno() as well. > > Looks like there are two of these ENOTSUP and ENOTSUPP so the syscall > > returning ENOTSUPP is a bug itself since it should return ENOTSUP. Also > > btw ENOTSUP == EOPNOTSUPP and we do have EOPNOTSUPP in errnos.h. > > I think there is quite a lot of stuff missing. Maybe it is time to > create a script for generating this list? We can but I would just commit the resulting header to LTP since the list will not change frequently or at all. -- Cyril Hrubis chrubis@suse.cz