-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[lldb] Reenable test HostTest.GetProcessInfo with relaxed constraints. #89637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-lldb Author: Fred Grim (feg208) Changes@jimingham I am wondering if you are ok removing this test? It caused failures in some of the build bots because the user time was less than a microsecond. Alternatively we can increase the number of loops or maybe I need some other approach? I had commented it out just to not impact others Full diff: https://github.com/llvm/llvm-project/pull/89637.diff 1 Files Affected:
diff --git a/lldb/unittests/Host/linux/HostTest.cpp b/lldb/unittests/Host/linux/HostTest.cpp
index 733909902474d7..5599e4349c8291 100644
--- a/lldb/unittests/Host/linux/HostTest.cpp
+++ b/lldb/unittests/Host/linux/HostTest.cpp
@@ -68,18 +68,4 @@ TEST_F(HostTest, GetProcessInfo) {
EXPECT_TRUE(Info.GetArchitecture().IsValid());
EXPECT_EQ(HostInfo::GetArchitecture(HostInfo::eArchKindDefault),
Info.GetArchitecture());
- // Test timings
- /*
- * This is flaky in the buildbots on all archs
- ASSERT_TRUE(Host::GetProcessInfo(getpid(), Info));
- ProcessInstanceInfo::timespec user_time = Info.GetUserTime();
- static volatile unsigned u = 0;
- for (unsigned i = 0; i < 10'000'000; i++) {
- u = i;
- }
- ASSERT_TRUE(Host::GetProcessInfo(getpid(), Info));
- ProcessInstanceInfo::timespec next_user_time = Info.GetUserTime();
- ASSERT_TRUE(user_time.tv_sec < next_user_time.tv_sec ||
- user_time.tv_usec < next_user_time.tv_usec);
- */
}
|
A potential compromise would be to check that the time is great or equal? |
That's a good idea. I'll make that change and add a note |
Hi @feg208 , I noticed that your previous commit has a very.. unusual commit title and message. The same thing applies to this PR. I'd appreciate it if you could follow a more standard commit title and message, so that the logs are more easily parseable. You can also get a good sample by doing a |
21ae49b
to
9ef4220
Compare
Sure thing. I apologize for deviating from expectations. |
9ef4220
to
bd0416d
Compare
bd0416d
to
edc21c6
Compare
This test was commented out which, besides being bad form, disabled the test entirely. But we do want to validate that this timings are not decreasing. The test is modified to reflect those expectations.
edc21c6
to
4117578
Compare
@jimingham I am wondering if you are ok removing this test? It caused failures in some of the build bots because the user time was less than a microsecond. Alternatively we can increase the number of loops or maybe I need some other approach? I had commented it out just to not impact others