public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [RFC][POSIX][PATCH]Get rid of the test of pthread_mutex_getprioceiling
@ 2010-11-25  8:47 Bian Naimeng
  2010-11-25 20:31 ` Garrett Cooper
  0 siblings, 1 reply; 3+ messages in thread
From: Bian Naimeng @ 2010-11-25  8:47 UTC (permalink / raw)
  To: Garrett Cooper; +Cc: ltp-list

Hi,

  The 1-1 and 3-3 do the same test, but they expect different result.
I do not know why?

However, i think we should get rid of 3-3. Because it looks like not a POSIX
compliant case.

---------------------------------------------------------------

Get rid of the test pthread_mutex_getprioceiling 3-3.

Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>

---
 .../interfaces/pthread_mutex_getprioceiling/3-3.c  |   88 --------------------
 1 files changed, 0 insertions(+), 88 deletions(-)
 delete mode 100644 testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-3.c

diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-3.c
deleted file mode 100644
index 4aa6b1c..0000000
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_getprioceiling/3-3.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/*   
- * Copyright (c) 2010, Garrett Cooper.
- *
- * Test that pthread_mutex_getprioceiling() fails because:
- *
- * [EINVAL]
- *     The protocol attribute of mutex is PTHREAD_PRIO_NONE.
- *
- * by explicitly specifying the protocol as PTHREAD_PRIO_NONE.
- *
- * Steps:
- * 1.  Initialize a pthread_mutexattr_t object with pthread_mutexattr_init()
- * 2.  Explicitly set the protocol using PTHREAD_PRIO_NONE.
- * 3.  Call pthread_mutex_getprioceiling() to obtain the prioceiling.
- * 
- */
-
-#include <pthread.h>
-#include <errno.h>
-#include <pwd.h>
-#include <sched.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include "posixtest.h"
-
-int
-main(void)
-{
-#if defined(_SC_PRIORITY_SCHEDULING)
-
-	if (sysconf(_SC_PRIORITY_SCHEDULING) == -1) {
-		printf("PRIORITY_SCHEDULING not supported\n");
-		return PTS_UNSUPPORTED;
-	}
-
-	pthread_mutexattr_t mutex_attr;
-	pthread_mutex_t mutex;
-	int error, prioceiling;
-
-	error = pthread_mutexattr_init(&mutex_attr);
-	if (error) {
-		printf("pthread_mutexattr_init failed: %s\n", strerror(error));
-		return PTS_UNRESOLVED;
-	}
-
-	/* 
-	 * The default protocol is PTHREAD_PRIO_NONE according to
-	 * pthread_mutexattr_getprotocol.
-	 */
-	error = pthread_mutexattr_setprotocol(&mutex_attr,
-		PTHREAD_PRIO_INHERIT);
-	if (error) {
-		printf("pthread_mutexattr_setprotocol failed: %s\n",
-			strerror(error));
-		return PTS_UNRESOLVED;
-	}
-
-	/* Initialize a mutex object */
-	error = pthread_mutex_init(&mutex, &mutex_attr);
-	if (error) {
-		printf("pthread_mutex_init failed: %s\n", strerror(error));
-		return PTS_UNRESOLVED;
-	}
-
-	/* Get the prioceiling of the mutex. */
-	error = pthread_mutex_getprioceiling(&mutex, &prioceiling);
-	if (error) {
-		if (error == EINVAL) {
-			printf("pthread_mutex_getprioceiling failed as "
-				"expected\n");
-		} else {
-			printf("pthread_mutex_getprioceiling did not fail as "
-				"expected: %s\n", strerror(error));
-		}
-	} else
-		printf("pthread_mutex_getprioceiling passed unexpectedly\n");
-
-	(void) pthread_mutexattr_destroy(&mutex_attr);
-	(void) pthread_mutex_destroy(&mutex);
-
-	return (error == EINVAL ? PTS_PASS : PTS_UNRESOLVED);
-#else
-	printf("pthread_mutex_getprioceiling not supported");
-	return PTS_UNSUPPORTED;
-#endif
-
-}
-- 
1.7.0.4




-- 
Regards
Bian Naimeng


------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [RFC][POSIX][PATCH]Get rid of the test of pthread_mutex_getprioceiling
  2010-11-25  8:47 [LTP] [RFC][POSIX][PATCH]Get rid of the test of pthread_mutex_getprioceiling Bian Naimeng
@ 2010-11-25 20:31 ` Garrett Cooper
  2011-01-24  9:40   ` Bian Naimeng
  0 siblings, 1 reply; 3+ messages in thread
From: Garrett Cooper @ 2010-11-25 20:31 UTC (permalink / raw)
  To: Bian Naimeng; +Cc: ltp-list

On Thu, Nov 25, 2010 at 12:47 AM, Bian Naimeng <biannm@cn.fujitsu.com> wrote:
> Hi,
>
>  The 1-1 and 3-3 do the same test, but they expect different result.
> I do not know why?
>
> However, i think we should get rid of 3-3. Because it looks like not a POSIX
> compliant case.

I'll look at cleaning this up. I didn't clean everything up yet in
that area as I was going through and adding testcases for missing
POSIX assertions.
Thanks,
-Garrett

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [RFC][POSIX][PATCH]Get rid of the test of pthread_mutex_getprioceiling
  2010-11-25 20:31 ` Garrett Cooper
@ 2011-01-24  9:40   ` Bian Naimeng
  0 siblings, 0 replies; 3+ messages in thread
From: Bian Naimeng @ 2011-01-24  9:40 UTC (permalink / raw)
  To: Garrett Cooper; +Cc: ltp-list



Garrett Cooper wrote:
> On Thu, Nov 25, 2010 at 12:47 AM, Bian Naimeng <biannm@cn.fujitsu.com> wrote:
>> Hi,
>>
>>  The 1-1 and 3-3 do the same test, but they expect different result.
>> I do not know why?
>>
>> However, i think we should get rid of 3-3. Because it looks like not a POSIX
>> compliant case.
> 
> I'll look at cleaning this up. I didn't clean everything up yet in
> that area as I was going through and adding testcases for missing
> POSIX assertions.

Hi Garrett,

 Would you like to pick up it.

Regards
 Bian

> Thanks,
> -Garrett
> 


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

end of thread, other threads:[~2011-01-24  9:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-25  8:47 [LTP] [RFC][POSIX][PATCH]Get rid of the test of pthread_mutex_getprioceiling Bian Naimeng
2010-11-25 20:31 ` Garrett Cooper
2011-01-24  9:40   ` Bian Naimeng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox