From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1S9uSW-0007KW-Eh for ltp-list@lists.sourceforge.net; Tue, 20 Mar 2012 08:30:24 +0000 Received: from mail1.windriver.com ([147.11.146.13]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1S9uSM-0003V6-43 for ltp-list@lists.sourceforge.net; Tue, 20 Mar 2012 08:30:24 +0000 Message-ID: <4F68400F.9080702@windriver.com> Date: Tue, 20 Mar 2012 16:30:07 +0800 From: Kang Kai MIME-Version: 1.0 References: In-Reply-To: Subject: Re: [LTP] Query regarding Open Posix Test Case failure (pthread_rwlock_rdlock) List-Id: Linux Test Project General Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0100293330181244940==" Errors-To: ltp-list-bounces@lists.sourceforge.net To: Jubi Taneja Cc: ltp-list@lists.sourceforge.net --===============0100293330181244940== Content-Type: multipart/alternative; boundary="------------070209010605010100090909" --------------070209010605010100090909 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit On 2012?03?19? 16:11, Jubi Taneja wrote: > Hi > > In LTP(Jan 2012 release) Open Posix Test Suite, the test case > "pthread_rwlock_rdlock/2-1.c" > fails for Linux Kernel 3.0.18 for target ARM. > > > The exact output of the program is: > main: has priority: 3 > main: attempt read lock > main: acquired read lock > main: create wr_thread, with priority: 2 > wr_thread: attempt write lock > main: create rd_thread, with priority: 1 > rd_thread: attempt read lock > rd_thread: acquired read lock > rd_thread: unlock read lock > Test FAILED: rd_thread did not block on read lock, when a reader owns > the lock, and a higher > priority writer is waiting for the lock Hi Jubi, I am using eglibc and meet the same failure. My analysis is that This test case is to test option *Thread Execution Scheduling* of pthread rwlock. But eglibc/libc don't support this option. They provide a rwlock->__data.*__flags* option to identify perfer 'read lock' or write lock, and the default is 'read lock' first. So second reader can get the lock when a higher priority writer is waiting for the lock. Regards, Kai > > > > The path of the program si : > VDLTP_20120104/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock > > Ca anyone please explain why it fails at this point? I am unable to > catch the exact reason. > > Looking forward to your reply. > > Thanks, > Jubi > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > > > _______________________________________________ > Ltp-list mailing list > Ltp-list@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/ltp-list --------------070209010605010100090909 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit On 2012年03月19日 16:11, Jubi Taneja wrote:
Hi

In LTP(Jan 2012 release) Open Posix Test Suite, the test case "pthread_rwlock_rdlock/2-1.c"
fails for Linux Kernel 3.0.18 for target ARM.


The exact output of the program is:
main: has priority: 3
main: attempt read lock
main: acquired read lock
main: create wr_thread, with priority: 2
wr_thread: attempt write lock
main: create rd_thread, with priority: 1
rd_thread: attempt read lock
rd_thread: acquired read lock
rd_thread: unlock read lock
Test FAILED: rd_thread did not block on read lock, when a reader owns the lock, and a higher
priority writer is waiting for the lock

Hi Jubi,

I am using eglibc and meet the same failure. My analysis is that
 
  This test case is to test option Thread Execution Scheduling of pthread rwlock.
  But eglibc/libc don't support this option. They provide a rwlock->__data.__flags option to identify
  perfer 'read lock' or write lock, and the default is 'read lock' first. So second reader can get the lock
  when a higher priority writer is waiting for the lock.

Regards,
Kai


 

The path of the program si :
VDLTP_20120104/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock

Ca anyone please explain why it fails at this point? I am unable to catch the exact reason.

Looking forward to your reply.

Thanks,
Jubi


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure


_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

--------------070209010605010100090909-- --===============0100293330181244940== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure --===============0100293330181244940== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list --===============0100293330181244940==--