public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* Problem with conformance test and header files inclusion for ./include/sys/poll.h
@ 2019-10-31 23:08 Lukasz Majewski
  2019-10-31 23:13 ` Joseph Myers
  0 siblings, 1 reply; 5+ messages in thread
From: Lukasz Majewski @ 2019-10-31 23:08 UTC (permalink / raw)
  To: Joseph Myers; +Cc: GNU C Library, libc-help

[-- Attachment #1: Type: text/plain, Size: 2932 bytes --]

Dear All,

I'm trying to convert ppoll to support 64 bit time ABI.

The syscall seems to be converted correctly, however I do encounter the
issues when running:

'glibc-many-build glibcs x86_64-linux-gnu'

FAIL: glibcs-x86_64-linux-gnu check

By inspecting:
logs/glibcs/x86_64-linux-gnu/007-glibcs-x86_64-linux-gnu-check-log.txt
and: XOPEN2K/poll.h/conform.out

I do see following violations for poll.h:

	Namespace violation: "CLOCKS_PER_SEC"
	Namespace violation: "CLOCK_BOOTTIME"

This seems to be caused by adding 

# include <time.h>     (or even #include <include/time.h>)   [*]
# include <signal.h>   (or even #include <include/signal.h>) [*]

needed by following code (definitions of struct __timespec64 and
sigset_t):

# if __TIMESIZE == 64
#  define __ppoll64 __ppoll
# else
extern int __ppoll64 (struct pollfd *fds, nfds_t nfds,
	              const struct __timespec64 *timeout,
		      const sigset_t *sigmask)
libc_hidden_proto (__ppoll64)
# endif

to include/sys/poll.h [**] [***]

Why the above code for e.g. clock_settime put into ./include/time.h
doesn't causes the "conformance" errors?

Please correct me if I'm wrong, but the ./include/ directory seems to
be the "local" one and not being exported to user programs (as e.g.
bits, io content).

Hence, why I do see this error? I've checked and there is no extra code
in installed poll.h headers on target system (with QEMU) -
/usr/include/sys/poll.h,  /usr/include/poll.h



Last but not least -> the list of header symbols (declarations,
members, etc) is generated with ./conform/list-headers-symbols.py,
which in turn uses gcc CFLAGS -aux-info foo.aux
The python script (glibcconform.py) generates on fly the content of
test.c file (with proper #include <header-to-test.h>), compiles it and
examines the *.aux file.
However, I do have an issue with finding (in Makefiles?) what is the
default search path for includes in this test.


Note:

[*] - the "'include/' shall be a clear indication to use "local" glibc's
includes.

[**] - this location (include/sys/poll.h) seems to be better for ppoll
conversion code than e.g. include/time.h

[***] - I'm also a bit puzzled why in the include/sys/poll.h there is an
"incomplete" declaration of __poll:
extern int __poll (struct pollfd *__fds, unsigned long int __nfds,
int __timeout)

The nfds shall be nfds_t not 'unsigned long int' (but this would require
header include, which may trigger the "conformance" test error).

[****] - A bit off topic: What is the purpose of -D_ISOMAC define? It
can be found in glibc's sources in several places (e.g. # ifndef
_ISOMAC). 



Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-01 10:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-31 23:08 Problem with conformance test and header files inclusion for ./include/sys/poll.h Lukasz Majewski
2019-10-31 23:13 ` Joseph Myers
2019-10-31 23:53   ` Lukasz Majewski
2019-11-01  0:18     ` Joseph Myers
2019-11-01 10:12     ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).