This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

conformtest: Fix miscellaneous UNIX98 expectations


This patch fixes miscellaneous errors in the conformtest expectations
that show up as spurious test failures for UNIX98 (and generally for
XPG3 and XPG4 as well); these are cases where the headers are correct
and the conformtest expectations wrong:

* semaphore.h does not exist in XPG3 / XPG4, and UNIX98 does not have
  sem_timedwait.

* sys/socket.h does not exist in XPG3 (it's in a separate volume of
  XPG4 rather than the main one, and UX-shared in its entirety there)
  and XPG4 and UNIX98 do not have the sockatmark function there.

* The clock_getcpuclockid and clock_nanosleep functions of time.h do
  not exist in XPG3 / XPG4 / UNIX98.

* setegid and seteuid are new in the 2001 edition of POSIX, not in
  XPG3 / XPG4 / UNIX98.

* UNIX98 has a version of wchar.h based on ISO C90 Amendment 1 (which
  isn't yet itself directly tested by conformtest), missing the
  v*scanf functions from C99.

(Note: ISO, ISO99 and ISO11 are the only conformtest standards for
which I've so far done a full comparison of expectations with the
relevant standard.  These fixes come from an examination of the test
results for UNIX98 for cases where the expectations are wrong, but
there may well be cases for this and other standards where both the
expectations and headers are wrong or incomplete in the same way.)

Tested x86_64.  This removes 9 failures for XPG3, 6 for XPG4, 9 for
UNIX98.

2012-11-10  Joseph Myers  <joseph@codesourcery.com>

	* conform/data/semaphore.h-data [XPG3 || XPG4]: Disable whole
	file.
	[UNIX98] (sem_timedwait): Do not expect.
	* conform/data/sys/socket.h-data [XPG3]: Disable whole file.
	[XPG4 || UNIX98] (sockatmark): Do not expect.
	* conform/data/time.h-data [XPG3 || XPG4 || UNIX98]
	(clock_getcpuclockid): Do not expect.
	[XPG3 || XPG4 || UNIX98] (clock_nanosleep): Do not expect.
	* conform/data/unistd.h-data [XPG3 || XPG4 || UNIX98] (setegid):
	Do not expect.
	[XPG3 || XPG4 || UNIX98] (seteuid): Likewise.
	* conform/data/wchar.h-data [UNIX98] (vfwscanf): Do not expect.
	[UNIX98] (vwscanf): Likewise.
	[UNIX98] (vswscanf): Likewise.

diff --git a/conform/data/semaphore.h-data b/conform/data/semaphore.h-data
index 9bb3d44..4159513 100644
--- a/conform/data/semaphore.h-data
+++ b/conform/data/semaphore.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG3 && !defined XPG4
 type sem_t
 
 constant SEM_FAILED
@@ -9,7 +9,7 @@ function int sem_getvalue (sem_t*, int*)
 function int sem_init (sem_t*, int, unsigned int)
 function {sem_t*} sem_open (const char*, int, ...)
 function int sem_post (sem_t*)
-# if !defined POSIX
+# if !defined POSIX && !defined UNIX98
 function int sem_timedwait (sem_t*, const struct timespec*)
 # endif
 function int sem_trywait (sem_t*)
diff --git a/conform/data/sys/socket.h-data b/conform/data/sys/socket.h-data
index 60d8b00..3a6cf7c 100644
--- a/conform/data/sys/socket.h-data
+++ b/conform/data/sys/socket.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3
 type socklen_t
 
 type sa_family_t
@@ -111,7 +111,9 @@ function int setsockopt (int, int, int, const void*, socklen_t)
 function int shutdown (int, int)
 function int socket (int, int, int)
 function int socketpair (int, int, int, int[2])
+#if !defined XPG4 && !defined UNIX98
 function int sockatmark (int)
+#endif
 
 allow-header sys/uio.h
 
diff --git a/conform/data/time.h-data b/conform/data/time.h-data
index 31d5e7d..9b346c3 100644
--- a/conform/data/time.h-data
+++ b/conform/data/time.h-data
@@ -71,12 +71,12 @@ variable int getdate_err
 # endif
 
 function {char*} asctime_r (const struct tm*, char*)
-#if !defined POSIX
+#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
 function int clock_getcpuclockid (pid_t, clockid_t*)
 #endif
 function int clock_getres (clockid_t, struct timespec*)
 function int clock_gettime (clockid_t, struct timespec*)
-#if !defined POSIX
+#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
 function int clock_nanosleep (clockid_t, int, const struct timespec*, struct timespec*)
 #endif
 function int clock_settime (clockid_t, const struct timespec*)
diff --git a/conform/data/unistd.h-data b/conform/data/unistd.h-data
index d23a68f..18bea5e 100644
--- a/conform/data/unistd.h-data
+++ b/conform/data/unistd.h-data
@@ -472,7 +472,7 @@ function int rmdir (const char*)
 #if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008
 function {void*} sbrk (intptr_t)
 #endif
-#ifndef POSIX
+#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
 function int setegid (gid_t)
 function int seteuid (uid_t)
 #endif
diff --git a/conform/data/wchar.h-data b/conform/data/wchar.h-data
index 805cbe6..c65ec40 100644
--- a/conform/data/wchar.h-data
+++ b/conform/data/wchar.h-data
@@ -60,11 +60,17 @@ function wint_t towupper (wint_t)
 # endif
 function wint_t ungetwc (wint_t, FILE*)
 function int vfwprintf (FILE*, const wchar_t*, __gnuc_va_list)
+# ifndef UNIX98
 function int vfwscanf (FILE*, const wchar_t*, __gnuc_va_list)
+# endif
 function int vwprintf (const wchar_t*, __gnuc_va_list)
+# ifndef UNIX98
 function int vwscanf (const wchar_t*, __gnuc_va_list)
+# endif
 function int vswprintf (wchar_t*, size_t, const wchar_t*, __gnuc_va_list)
+# ifndef UNIX98
 function int vswscanf (const wchar_t*, const wchar_t*, __gnuc_va_list)
+# endif
 # if defined XOPEN2K8 || defined POSIX2008
 function {wchar_t*} wcpcpy (wchar_t*, const wchar_t*)
 function {wchar_t*} wcpncpy (wchar_t*, const wchar_t*, size_t)

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]