Skip to contentSkip to conversation

About POSIX "pthread_mutex_xxxxxxxx" testsets build error

LTP Mitani 2 participants 2 messages Dec 13, 2010

lore
Share & tools
lore

Mitani

author
#0 lore raw

Hi,

The Build of POSIX testset "pthread_mutex_getprioceiling/1-1" failed:
------------
conformance/interfaces/pthread_mutex_getprioceiling/1-1 compile FAILED; SKIPPING ../../../conformance/interfaces/pthread_mutex_getprioceiling/1-1.c: In function `main':
../../../conformance/interfaces/pthread_mutex_getprioceiling/1-1.c:46:
warning: implicit declaration of function `pthread_mutexattr_setprotocol' ../../../conformance/interfaces/pthread_mutex_getprioceiling/1-1.c:47:
error: `PTHREAD_PRIO_INHERIT' undeclared (first use in this function) ../../../conformance/interfaces/pthread_mutex_getprioceiling/1-1.c:47:
error: (Each undeclared identifier is reported only once ../../../conformance/interfaces/pthread_mutex_getprioceiling/1-1.c:47:
error: for each function it appears in.) ../../../conformance/interfaces/pthread_mutex_getprioceiling/1-1.c:62:
warning: implicit declaration of function `pthread_mutex_getprioceiling'
------------

Following POSIX testsets build also failed in same reason:
------------
conformance/interfaces/pthread_mutex_getprioceiling/3-2 compile FAILED; SKIPPING conformance/interfaces/pthread_mutex_getprioceiling/3-3 compile FAILED; SKIPPING conformance/interfaces/pthread_mutex_getprioceiling/1-2 compile FAILED; SKIPPING conformance/interfaces/pthread_mutex_getprioceiling/3-1 compile FAILED; SKIPPING conformance/interfaces/pthread_mutex_setprioceiling/1-1 compile FAILED; SKIPPING conformance/interfaces/pthread_mutexattr_getprioceiling/1-1 compile FAILED; SKIPPING conformance/interfaces/pthread_mutexattr_getprioceiling/1-2 compile FAILED; SKIPPING conformance/interfaces/pthread_mutexattr_getprioceiling/3-1 compile FAILED; SKIPPING conformance/interfaces/pthread_mutexattr_getprotocol/1-1 compile FAILED; SKIPPING conformance/interfaces/pthread_mutexattr_getprotocol/1-2 compile FAILED; SKIPPING conformance/interfaces/pthread_mutexattr_setprioceiling/1-1 compile FAILED; SKIPPING conformance/interfaces/pthread_mutexattr_setprioceiling/3-2 compile FAILED; SKIPPING conformance/interfaces/pthread_mutexattr_setprioceiling/3-1 compile FAILED; SKIPPING conformance/interfaces/pthread_mutexattr_setprotocol/1-1 compile FAILED; SKIPPING conformance/interfaces/pthread_mutexattr_setprotocol/3-2 compile FAILED; SKIPPING conformance/interfaces/pthread_mutexattr_setprotocol/3-1 compile FAILED; SKIPPING
------------

The functions which cause to fail are as follows:
------------
pthread_mutex_getprioceiling()
pthread_mutexattr_setprotocol()
pthread_mutexattr_getprotocol()
pthread_mutexattr_setprioceiling()
pthread_mutexattr_getprioceiling()
------------

The failed environment is as follows:
- RHEL4.8 --- (x86, x86_64, ia64)
- kernel --- kernel-2.6.9-89.EL
- glibc --- glibc-2.3.4-2.43

RHEL5.5 environment succeeded.

"man" of posix options says:
------------
DESCRIPTION
The POSIX standard (the information below is from POSIX 1003.1-2001)
describes a set of
behaviours and interfaces for a compliant system. However,
many interfaces are
optional and there are feature test macros to test the
availability of interfaces at
compile time, and functions sysconf(3), fpathconf(3), pathconf(3),
confstr(3) to do
this at run time. From shell scripts one can use getconf(1).
For more detail, see
sysconf(3).

We give the name of the POSIX abbreviation, the option, the name
of the sysconf()
parameter used to inquire about the option, and possibly a very
short description.
Much more precise detail can be found in the POSIX standard itself,
versions of which
can nowadays be accessed freely on the web.

[...]

TPI - _POSIX_THREAD_PRIO_INHERIT - _SC_THREAD_PRIO_INHERIT
Affected functions are
pthread_mutexattr_getprotocol(), pthread_mutexattr_setprotocol().

TPP - _POSIX_THREAD_PRIO_PROTECT - _SC_THREAD_PRIO_PROTECT
Affected functions are
pthread_mutex_getprioceiling(), pthread_mutex_setprioceiling(), pthread_mutexattr_getprioceiling(), pthread_mutexattr_getprotocol(), pthread_mutexattr_setprioceiling(), pthread_mutexattr_setprotocol().
[...]
------------

In failed environment, I confirmed "_POSIX_THREAD_PRIO_INHERIT" and "_POSIX_THREAD_PRIO_PROTECT" by "getconf" command,
and they resulted "undefined":
------------
[root@RHEL48-LTP-EM64T open_posix_testsuite]# getconf _POSIX_THREAD_PRIO_INHERIT
undefined
[root@RHEL48-LTP-EM64T open_posix_testsuite]# getconf _POSIX_THREAD_PRIO_PROTECT
undefined
------------

Incidentally, they are defined in RHEL5.5 systems.
------------
[root@RHEL55-x86 ~]# getconf _POSIX_THREAD_PRIO_INHERIT 200112
[root@RHEL55-x86 ~]# getconf _POSIX_THREAD_PRIO_PROTECT 200112
------------

"_POSIX_THREAD_PRIO_INHERIT" and "_POSIX_THREAD_PRIO_PROTECT" are supported from RHEL5.0:
------------
<RHEL4.7 em64t> glibc-headers-2.3.4-2.41.x86_64\usr\include\bits\posix_opt.h

/* No support for priority inheritance or protection. */
#define _POSIX_THREAD_PRIO_INHERIT -1
#define _POSIX_THREAD_PRIO_PROTECT -1

<RHEL4.8 em64t> glibc-headers-2.3.4-2.43.x86_64\usr\include\bits\posix_opt.h

/* No support for priority inheritance or protection. */
#define _POSIX_THREAD_PRIO_INHERIT -1
#define _POSIX_THREAD_PRIO_PROTECT -1

<RHEL5.0 em64t> glibc-headers-2.5-12.x86_64\usr\include\bits\posix_opt.h

/* We support priority inheritence. */
#define _POSIX_THREAD_PRIO_INHERIT 200112L

/* We support priority protection, though only for non-robust
mutexes. */
#define _POSIX_THREAD_PRIO_PROTECT 200112L
------------

Cannot "build" be left out before RHEL 4?

Regards--

-Tomonori Mitani

------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, new data types, scalar functions, improved concurrency, built-in packages, OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#1 lore raw
Quoted 163 lines · Mitani

Hi,

The Build of POSIX testset "pthread_mutex_getprioceiling/1-1" failed:
------------
conformance/interfaces/pthread_mutex_getprioceiling/1-1 compile FAILED; SKIPPING ../../../conformance/interfaces/pthread_mutex_getprioceiling/1-1.c: In function `main':
../../../conformance/interfaces/pthread_mutex_getprioceiling/1-1.c:46:
warning: implicit declaration of function `pthread_mutexattr_setprotocol' ../../../conformance/interfaces/pthread_mutex_getprioceiling/1-1.c:47:
error: `PTHREAD_PRIO_INHERIT' undeclared (first use in this function) ../../../conformance/interfaces/pthread_mutex_getprioceiling/1-1.c:47:
error: (Each undeclared identifier is reported only once ../../../conformance/interfaces/pthread_mutex_getprioceiling/1-1.c:47:
error: for each function it appears in.) ../../../conformance/interfaces/pthread_mutex_getprioceiling/1-1.c:62:
warning: implicit declaration of function `pthread_mutex_getprioceiling'
------------

Following POSIX testsets build also failed in same reason:
------------
conformance/interfaces/pthread_mutex_getprioceiling/3-2 compile FAILED; SKIPPING conformance/interfaces/pthread_mutex_getprioceiling/3-3 compile FAILED; SKIPPING conformance/interfaces/pthread_mutex_getprioceiling/1-2 compile FAILED; SKIPPING conformance/interfaces/pthread_mutex_getprioceiling/3-1 compile FAILED; SKIPPING conformance/interfaces/pthread_mutex_setprioceiling/1-1 compile FAILED; SKIPPING conformance/interfaces/pthread_mutexattr_getprioceiling/1-1 compile FAILED; SKIPPING conformance/interfaces/pthread_mutexattr_getprioceiling/1-2 compile FAILED; SKIPPING conformance/interfaces/pthread_mutexattr_getprioceiling/3-1 compile FAILED; SKIPPING conformance/interfaces/pthread_mutexattr_getprotocol/1-1 compile FAILED; SKIPPING conformance/interfaces/pthread_mutexattr_getprotocol/1-2 compile FAILED; SKIPPING conformance/interfaces/pthread_mutexattr_setprioceiling/1-1 compile FAILED; SKIPPING conformance/interfaces/pthread_mutexattr_setprioceiling/3-2 compile FAILED; SKIPPING conformance/interfaces/pthread_mutexattr_setprioceiling/3-1 compile FAILED; SKIPPING conformance/interfaces/pthread_mutexattr_setprotocol/1-1 compile FAILED; SKIPPING conformance/interfaces/pthread_mutexattr_setprotocol/3-2 compile FAILED; SKIPPING conformance/interfaces/pthread_mutexattr_setprotocol/3-1 compile FAILED; SKIPPING
------------

The functions which cause to fail are as follows:
------------
pthread_mutex_getprioceiling()
pthread_mutexattr_setprotocol()
pthread_mutexattr_getprotocol()
pthread_mutexattr_setprioceiling()
pthread_mutexattr_getprioceiling()
------------

The failed environment is as follows:
 - RHEL4.8 --- (x86, x86_64, ia64)
 - kernel  --- kernel-2.6.9-89.EL
 - glibc   --- glibc-2.3.4-2.43

RHEL5.5 environment succeeded.

"man" of posix options says:
------------
DESCRIPTION
      The POSIX standard (the information below is from POSIX 1003.1-2001) describes a set of
      behaviours and interfaces  for  a  compliant  system.   However, many  interfaces  are
      optional  and  there  are feature test macros to test the availability of interfaces at
      compile time, and functions sysconf(3), fpathconf(3),  pathconf(3), confstr(3)  to  do
      this  at  run  time.  From  shell scripts one can use getconf(1). For more detail, see
      sysconf(3).

      We give the name of the POSIX abbreviation, the  option,  the  name of  the  sysconf()
      parameter  used  to  inquire  about  the option, and possibly a very short description.
      Much more precise detail can be found in the POSIX standard itself, versions  of  which
      can nowadays be accessed freely on the web.

[...]

  TPI - _POSIX_THREAD_PRIO_INHERIT - _SC_THREAD_PRIO_INHERIT Affected functions are pthread_mutexattr_getprotocol(), pthread_mutexattr_setprotocol().

  TPP - _POSIX_THREAD_PRIO_PROTECT - _SC_THREAD_PRIO_PROTECT Affected functions are pthread_mutex_getprioceiling(), pthread_mutex_setprioceiling(), pthread_mutexattr_getprioceiling(), pthread_mutexattr_getprotocol(), pthread_mutexattr_setprioceiling(), pthread_mutexattr_setprotocol().
[...]
------------

In failed environment, I confirmed "_POSIX_THREAD_PRIO_INHERIT" and "_POSIX_THREAD_PRIO_PROTECT" by "getconf" command,
and they resulted "undefined":
------------
[root@RHEL48-LTP-EM64T open_posix_testsuite]# getconf _POSIX_THREAD_PRIO_INHERIT
undefined
[root@RHEL48-LTP-EM64T open_posix_testsuite]# getconf _POSIX_THREAD_PRIO_PROTECT
undefined
------------

Incidentally, they are defined in RHEL5.5 systems.
------------
[root@RHEL55-x86 ~]# getconf _POSIX_THREAD_PRIO_INHERIT 200112
[root@RHEL55-x86 ~]# getconf _POSIX_THREAD_PRIO_PROTECT 200112
------------

"_POSIX_THREAD_PRIO_INHERIT" and "_POSIX_THREAD_PRIO_PROTECT" are supported from RHEL5.0:
------------
<RHEL4.7 em64t> glibc-headers-2.3.4-2.41.x86_64\usr\include\bits\posix_opt.h

/* No support for priority inheritance or protection.  */ #define _POSIX_THREAD_PRIO_INHERIT      -1 #define _POSIX_THREAD_PRIO_PROTECT      -1

<RHEL4.8 em64t> glibc-headers-2.3.4-2.43.x86_64\usr\include\bits\posix_opt.h

/* No support for priority inheritance or protection.  */ #define _POSIX_THREAD_PRIO_INHERIT      -1 #define _POSIX_THREAD_PRIO_PROTECT      -1

<RHEL5.0 em64t> glibc-headers-2.5-12.x86_64\usr\include\bits\posix_opt.h

/* We support priority inheritence.  */
#define _POSIX_THREAD_PRIO_INHERIT      200112L

Quoted 7 lines

/* We support priority protection, though only for non-robust mutexes.  */
#define _POSIX_THREAD_PRIO_PROTECT      200112L
------------

Cannot "build" be left out before RHEL 4?

No. Anyone who should be building these tests should understand what NPTL provides, what it doesn't provide, and then tailor things locally .

No Linux hacks to build, omit building, etc are going to go into the open_posix_testsuite in LTP. Same thing for FreeBSD, OSX, OpenBSD, Windows, whatever. Period. Hopefully I've made myself clear this time.

Thanks,
-Garrett

------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, new data types, scalar functions, improved concurrency, built-in packages, OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list