Skip to content

this test is flakey on arm in linux because I got too clever #89267

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

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

feg208
Copy link
Contributor

@feg208 feg208 commented Apr 18, 2024

the assembly jazz doesn't work on arm. oops

@feg208 feg208 requested a review from jimingham April 18, 2024 17:14
@feg208 feg208 requested a review from JDevlieghere as a code owner April 18, 2024 17:14
@llvmbot llvmbot added the lldb label Apr 18, 2024
@llvmbot
Copy link
Member

llvmbot commented Apr 18, 2024

@llvm/pr-subscribers-lldb

Author: Fred Grim (feg208)

Changes

the assembly jazz doesn't work on arm. oops


Full diff: https://github.com/llvm/llvm-project/pull/89267.diff

1 Files Affected:

  • (modified) lldb/unittests/Host/linux/HostTest.cpp (+2-1)
diff --git a/lldb/unittests/Host/linux/HostTest.cpp b/lldb/unittests/Host/linux/HostTest.cpp
index 046736dce18d7a..27d1898969fb44 100644
--- a/lldb/unittests/Host/linux/HostTest.cpp
+++ b/lldb/unittests/Host/linux/HostTest.cpp
@@ -71,8 +71,9 @@ TEST_F(HostTest, GetProcessInfo) {
   // Test timings
   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++) {
-    __asm__ __volatile__("" : "+g"(i) : :);
+    u = i;
   }
   ASSERT_TRUE(Host::GetProcessInfo(getpid(), Info));
   ProcessInstanceInfo::timespec next_user_time = Info.GetUserTime();

@feg208 feg208 force-pushed the users/feg208/fixes_timing_flakes branch from 13e9825 to 24fa0fc Compare April 18, 2024 17:28
@feg208
Copy link
Contributor Author

feg208 commented Apr 18, 2024

I had to just comment this test out because it randomly fails on at least x86_64 and arm

@feg208 feg208 merged commit 9842726 into llvm:main Apr 18, 2024
@JDevlieghere
Copy link
Member

Can you please put up a follow-up that removes the code instead of commenting it out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants