From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1V2d1J-0000S6-PH for ltp-list@lists.sourceforge.net; Fri, 26 Jul 2013 08:05:02 +0000 Received: from [222.73.24.84] (helo=song.cn.fujitsu.com) by sog-mx-1.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1V2d1H-0004NK-Og for ltp-list@lists.sourceforge.net; Fri, 26 Jul 2013 08:05:01 +0000 Message-ID: <51F22AB9.6060109@cn.fujitsu.com> Date: Fri, 26 Jul 2013 15:52:25 +0800 From: Wanlong Gao MIME-Version: 1.0 References: <1374807380-20319-1-git-send-email-gaowanlong@cn.fujitsu.com> <221551028.6361858.1374822441673.JavaMail.root@redhat.com> In-Reply-To: <221551028.6361858.1374822441673.JavaMail.root@redhat.com> Subject: Re: [LTP] [PATCH 1/3] pthread_rwlock_rdlock:2-1: do not test on glibc Reply-To: gaowanlong@cn.fujitsu.com List-Id: Linux Test Project General Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ltp-list-bounces@lists.sourceforge.net To: Jan Stancek Cc: LTP On 07/26/2013 03:07 PM, Jan Stancek wrote: > > > ----- Original Message ----- >> From: "Wanlong Gao" >> To: "LTP" >> Cc: "Cyril Hrubis" , "Caspar Zhang" , "Garrett Cooper" , >> "Mike Frysinger" , jstancek@redhat.com, "Wanlong Gao" >> Sent: Friday, 26 July, 2013 4:56:18 AM >> Subject: [PATCH 1/3] pthread_rwlock_rdlock:2-1: do not test on glibc >> >> Since the reader can always acquire the rwlock if there's not a writer >> held the lock. >> >> Signed-off-by: Wanlong Gao > > Hi, > > I agree that these 3 fail by default on glibc at the moment. > Since we are adding a GLIBC ifdef, I'm wondering if we could use > glibc specific api to change default behaviour with > pthread_rwlockattr_setkind_np() and still run the testcase. The first 2 *_rdlock cases can change to WRITER_PREFER to let them pass, but the last *_unlock one can't, because *_unlock will choose the writer first without any care of the NP KIND. How about change the first two cases to WRITER_PREFER and just skip the third *_unlock one? Thanks, Wanlong Gao > > Regards, > Jan > >> --- >> .../conformance/interfaces/pthread_rwlock_rdlock/2-1.c | 6 >> ++++++ >> 1 file changed, 6 insertions(+) >> >> diff --git >> a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-1.c >> b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-1.c >> index c6c1412..62a4b3b 100644 >> --- >> a/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-1.c >> +++ >> b/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-1.c >> @@ -141,6 +141,12 @@ int main(void) >> return PTS_UNSUPPORTED; >> #endif >> >> +#ifdef __GLIBC__ >> + printf("The reader can always acquire rwlock if there's" >> + " not a writer held this lock in glibc\n"); >> + return PTS_UNTESTED; >> +#endif >> + >> int cnt = 0; >> pthread_t rd_thread, wr_thread; >> int priority; >> -- >> 1.8.3.3.754.g9c3c367 >> >> > ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list