<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Pavel,<div class=""><br class=""></div><div class="">It looks like this change breaks a couple of tests:</div><div class=""><br class=""></div><div class="">   <a href="http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/2315/" class="">http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/2315/</a></div><div class=""><br class=""></div><div class="">Reverting it fixes those on my end.</div><div class=""><br class=""></div><div class="">-Shafik<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Oct 7, 2019, at 10:17 AM, Pavel Labath via lldb-commits <<a href="mailto:lldb-commits@lists.llvm.org" class="">lldb-commits@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Author: labath<br class="">Date: Mon Oct  7 10:17:53 2019<br class="">New Revision: 373925<br class=""><br class="">URL: <a href="http://llvm.org/viewvc/llvm-project?rev=373925&view=rev" class="">http://llvm.org/viewvc/llvm-project?rev=373925&view=rev</a><br class="">Log:<br class="">ProcessInstanceInfoMatch: Don't match processes with no name if a name match was requested<br class=""><br class="">Since D68289, a couple of tests on linux started being extremely flaky.<br class="">All of them were doing name-based attaching and were failing because<br class="">they couldn't find an unambiguous process to attach to.<br class=""><br class="">The patch above changed the process finding logic, so that failure to<br class="">find a process name does not constitute an error. This meant that a lot<br class="">more transient processes showed up in the process list during the test<br class="">suite run. Previously, these processes would not appear as they would be<br class="">gone by the time we went to read their executable name, arguments, etc.<br class=""><br class="">Now, this alone should not cause an issue were it not for the fact that<br class="">we were considering a process with no name as if it matched by default<br class="">(even if we were explicitly searching for a process with a specified<br class="">name). This meant that any of the "transient" processes with no name<br class="">would make the name match ambiguous. That clearly seems like a bug to me<br class="">so I fix that.<br class=""><br class="">Modified:<br class="">    lldb/trunk/source/Utility/ProcessInfo.cpp<br class="">    lldb/trunk/unittests/Utility/ProcessInstanceInfoTest.cpp<br class=""><br class="">Modified: lldb/trunk/source/Utility/ProcessInfo.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/ProcessInfo.cpp?rev=373925&r1=373924&r2=373925&view=diff" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/ProcessInfo.cpp?rev=373925&r1=373924&r2=373925&view=diff</a><br class="">==============================================================================<br class="">--- lldb/trunk/source/Utility/ProcessInfo.cpp (original)<br class="">+++ lldb/trunk/source/Utility/ProcessInfo.cpp Mon Oct  7 10:17:53 2019<br class="">@@ -244,7 +244,7 @@ void ProcessInstanceInfo::DumpAsTableRow<br class=""> }<br class=""><br class=""> bool ProcessInstanceInfoMatch::NameMatches(const char *process_name) const {<br class="">-  if (m_name_match_type == NameMatch::Ignore || process_name == nullptr)<br class="">+  if (m_name_match_type == NameMatch::Ignore)<br class="">     return true;<br class="">   const char *match_name = m_match_info.GetName();<br class="">   if (!match_name)<br class=""><br class="">Modified: lldb/trunk/unittests/Utility/ProcessInstanceInfoTest.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Utility/ProcessInstanceInfoTest.cpp?rev=373925&r1=373924&r2=373925&view=diff" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Utility/ProcessInstanceInfoTest.cpp?rev=373925&r1=373924&r2=373925&view=diff</a><br class="">==============================================================================<br class="">--- lldb/trunk/unittests/Utility/ProcessInstanceInfoTest.cpp (original)<br class="">+++ lldb/trunk/unittests/Utility/ProcessInstanceInfoTest.cpp Mon Oct  7 10:17:53 2019<br class="">@@ -91,3 +91,20 @@ TEST(ProcessInstanceInfo, DumpTable_inva<br class=""> )",<br class="">       s.GetData());<br class=""> }<br class="">+<br class="">+TEST(ProcessInstanceInfoMatch, Name) {<br class="">+  ProcessInstanceInfo info_bar, info_empty;<br class="">+  info_bar.GetExecutableFile().SetFile("/foo/bar", FileSpec::Style::posix);<br class="">+<br class="">+  ProcessInstanceInfoMatch match;<br class="">+  match.SetNameMatchType(NameMatch::Equals);<br class="">+  match.GetProcessInfo().GetExecutableFile().SetFile("bar",<br class="">+                                                     FileSpec::Style::posix);<br class="">+<br class="">+  EXPECT_TRUE(match.Matches(info_bar));<br class="">+  EXPECT_FALSE(match.Matches(info_empty));<br class="">+<br class="">+  match.GetProcessInfo().GetExecutableFile() = FileSpec();<br class="">+  EXPECT_TRUE(match.Matches(info_bar));<br class="">+  EXPECT_TRUE(match.Matches(info_empty));<br class="">+}<br class=""><br class=""><br class="">_______________________________________________<br class="">lldb-commits mailing list<br class=""><a href="mailto:lldb-commits@lists.llvm.org" class="">lldb-commits@lists.llvm.org</a><br class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits<br class=""></div></div></blockquote></div><br class=""></div></body></html>