[libc-commits] [PATCH] D138061: [libc] disable flakey tests

Michael Jones via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Nov 15 13:57:05 PST 2022


michaelrj created this revision.
michaelrj added reviewers: sivachandra, lntue.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added projects: libc-project, All.
michaelrj requested review of this revision.

The mprotect test and gettimeofday test have been failing and causing
significant buildbot noise. Given that these are simple functions it's
more important that the buildbot errors be useful than having more
thorough tests for these functions.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D138061

Files:
  libc/test/src/sys/mman/linux/mprotect_test.cpp
  libc/test/src/time/gettimeofday_test.cpp


Index: libc/test/src/time/gettimeofday_test.cpp
===================================================================
--- libc/test/src/time/gettimeofday_test.cpp
+++ libc/test/src/time/gettimeofday_test.cpp
@@ -34,5 +34,6 @@
   ret = __llvm_libc::gettimeofday(&tv1, tz);
   ASSERT_EQ(ret, 0);
   ASSERT_GT(tv1.tv_usec - tv.tv_usec, 100);
-  ASSERT_LT(tv1.tv_usec - tv.tv_usec, 300);
+  // TODO: Re-enable this condition once it is less flakey.
+  // ASSERT_LT(tv1.tv_usec - tv.tv_usec, 300);
 }
Index: libc/test/src/sys/mman/linux/mprotect_test.cpp
===================================================================
--- libc/test/src/sys/mman/linux/mprotect_test.cpp
+++ libc/test/src/sys/mman/linux/mprotect_test.cpp
@@ -43,6 +43,9 @@
   EXPECT_THAT(__llvm_libc::munmap(addr, alloc_size), Succeeds());
 }
 
+// This test is disabled currently due to flakeyness. It will be re-enabled once
+// it is less flakey.
+/*
 TEST(LlvmLibcMProtectTest, Error_InvalidWrite) {
   // attempting to write to a read-only protected part of memory should cause a
   // segfault.
@@ -60,3 +63,4 @@
   // Reading from a write only segment may succeed on some platforms, so there's
   // no test to check that.
 }
+*/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138061.475569.patch
Type: text/x-patch
Size: 1200 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20221115/7b56340e/attachment.bin>


More information about the libc-commits mailing list