'fix' threadlocal fork test
authorDave Watson <davejwatson@fb.com>
Thu, 15 Jan 2015 21:25:02 +0000 (13:25 -0800)
committerwoo <woo@fb.com>
Mon, 2 Feb 2015 21:10:59 +0000 (13:10 -0800)
Summary:
configure seems to think ubuntu 14.04 doesn't have pthread_atfork, which seems wrong?! But this test seems to fail if we don't have it on some platform anyway.  Not sure the right fix, just disable it for now?

Test Plan: watch https://ci-builds.fb.com/job/folly/

Reviewed By: hans@fb.com

Subscribers: doug, folly-diffs@

FB internal diff: D1783046

Signature: t1:1783046:1421348575:d279877abcc597a04c285092a5e5e53406922d5a

Blame Revision: D1768669

folly/test/ThreadLocalTest.cpp

index 5c92d40cad134a18bbd4ea113c56592dc67194d1..f2a4886213a74d5b386524207b878b860ef7077a 100644 (file)
@@ -437,6 +437,7 @@ int totalValue() {
 
 }  // namespace
 
+#ifdef FOLLY_HAVE_PTHREAD_ATFORK
 TEST(ThreadLocal, Fork) {
   EXPECT_EQ(1, ptr->value());  // ensure created
   EXPECT_EQ(1, totalValue());
@@ -506,6 +507,7 @@ TEST(ThreadLocal, Fork) {
 
   EXPECT_EQ(1, totalValue());
 }
+#endif
 
 struct HoldsOneTag2 {};