Merge "Address review comments from the previous change to this file."
diff --git a/tests/sys_ptrace_test.cpp b/tests/sys_ptrace_test.cpp
index d460dec..e6a1e22 100644
--- a/tests/sys_ptrace_test.cpp
+++ b/tests/sys_ptrace_test.cpp
@@ -271,18 +271,8 @@
 // test fail on arm64, you will likely need to cherry-pick fdfeff0f into your
 // kernel.
 TEST(sys_ptrace, watchpoint_imprecise) {
-  // Make sure we get interrupted in case a buggy kernel does not report the
-  // watchpoint hit correctly.
-  struct sigaction action, oldaction;
-  action.sa_handler = [](int) {};
-  sigemptyset(&action.sa_mask);
-  action.sa_flags = 0;
-  ASSERT_EQ(0, sigaction(SIGALRM, &action, &oldaction)) << strerror(errno);
-  alarm(5);
-
+  // This test relies on the infrastructure to timeout if the test hangs.
   run_watchpoint_test<Uint128_t>(watchpoint_imprecise_child, 8, sizeof(void*));
-
-  ASSERT_EQ(0, sigaction(SIGALRM, &oldaction, nullptr)) << strerror(errno);
 }
 
 static void __attribute__((noinline)) breakpoint_func() {
diff --git a/tests/time_test.cpp b/tests/time_test.cpp
index 9218078..ddeabbf 100644
--- a/tests/time_test.cpp
+++ b/tests/time_test.cpp
@@ -678,7 +678,13 @@
   // For invalid process.
   // We can't use -1 for invalid pid here, because clock_getcpuclockid() can't detect it.
   errno = 0;
-  ASSERT_EQ(ESRCH, clock_getcpuclockid(GetInvalidPid(), &clockid));
+  // If this fails, your kernel needs commit e1b6b6ce to be backported.
+  ASSERT_EQ(ESRCH, clock_getcpuclockid(GetInvalidPid(), &clockid)) << "\n"
+    << "Please ensure that the following kernel patches or their replacements have been applied:\n"
+    << "* https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/"
+    << "commit/?id=e1b6b6ce55a0a25c8aa8af019095253b2133a41a\n"
+    << "* https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/"
+    << "commit/?id=c80ed088a519da53f27b798a69748eaabc66aadf\n";
   ASSERT_EQ(0, errno);
 }
 
diff --git a/tests/utils.h b/tests/utils.h
index 9a8eb5d..410b427 100644
--- a/tests/utils.h
+++ b/tests/utils.h
@@ -29,6 +29,7 @@
 #include <regex>
 
 #include <android-base/file.h>
+#include <android-base/macros.h>
 #include <android-base/scopeguard.h>
 #include <android-base/stringprintf.h>