public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v2] futex: return TCONF if FUTEX_WAIT_BITSET operation is not supported
@ 2015-03-18 10:40 Xiaoguang Wang
  2015-03-18 10:50 ` Cyril Hrubis
  0 siblings, 1 reply; 2+ messages in thread
From: Xiaoguang Wang @ 2015-03-18 10:40 UTC (permalink / raw)
  To: ltp-list

There still exist some linux distributions whose kernel are old and
do not support futex(2)'s FUTEX_WAIT_BITSET operation, e.g. RHEL5.11GA,
so we should catch the ENOSYS error and return TCONF rather than TFAIL.

Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
---
 testcases/kernel/syscalls/futex/futex_wait_bitset.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/testcases/kernel/syscalls/futex/futex_wait_bitset.h b/testcases/kernel/syscalls/futex/futex_wait_bitset.h
index 2f8ddb8..f5e1fde 100644
--- a/testcases/kernel/syscalls/futex/futex_wait_bitset.h
+++ b/testcases/kernel/syscalls/futex/futex_wait_bitset.h
@@ -42,6 +42,12 @@ static void verify_futex_wait_bitset(long long wait_us, clock_t clk_id)
 		return;
 	}
 
+	if (TEST_ERRNO == ENOSYS) {
+		tst_resm(TCONF, "In this kernel, futex() does not support "
+			 "FUTEX_WAIT_BITSET operation");
+		return;
+	}
+
 	if (TEST_ERRNO != ETIMEDOUT) {
 		tst_resm(TFAIL | TTERRNO, "expected %s",
 		         tst_strerrno(ETIMEDOUT));
-- 
1.8.2.1


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

end of thread, other threads:[~2015-03-18 10:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-18 10:40 [LTP] [PATCH v2] futex: return TCONF if FUTEX_WAIT_BITSET operation is not supported Xiaoguang Wang
2015-03-18 10:50 ` Cyril Hrubis

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