[kernel][timer][test] Don't assert trylock result to eliminate test flake
I was overzealous with my test assertions in
Ie46d329d59cf00ed8d8d4e9c51b80fd4b7c6a517.
While unlikely, the timer could certainly observe the cancel before
the lock release so we can't assert on the result of
trylock_or_cancel.
Test: "k ut timer" in a loop on VIM2 for several mins, no failures
Change-Id: I2f6c6e8a3fc39a024229676167cc55b84cf2df89
diff --git a/kernel/tests/timer_tests.cpp b/kernel/tests/timer_tests.cpp
index d46ee18..00430bc 100644
--- a/kernel/tests/timer_tests.cpp
+++ b/kernel/tests/timer_tests.cpp
@@ -479,8 +479,9 @@
// See that timer_cancel returns false indicating that the timer ran.
ASSERT_FALSE(timer_cancel(&t), "");
- // See that the timer acquired the lock.
- ASSERT_FALSE(arg.result, "");
+ // Note, we cannot assert the value of arg.result. We have both released the lock and canceled
+ // the timer, but we don't know which of these events the timer observed first.
+
END_TEST;
}