Re: [Lldb-commits] [PATCH] D21648: Make sure to reset to correct platform after TestImageListMultiArchitecture
fjricci updated this revision to Diff 61803. fjricci added a comment. This revision is now accepted and ready to land. Skip test on remote platforms http://reviews.llvm.org/D21648 Files: packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py Index: packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py === --- packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py +++ packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py @@ -21,6 +21,7 @@ mydir = TestBase.compute_mydir(__file__) @no_debug_info_test +@skipIfRemote def test_image_list_shows_multiple_architectures(self): """Test that image list properly shows the correct architecture for a set of different architecture object files.""" images = { Index: packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py === --- packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py +++ packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py @@ -21,6 +21,7 @@ mydir = TestBase.compute_mydir(__file__) @no_debug_info_test +@skipIfRemote def test_image_list_shows_multiple_architectures(self): """Test that image list properly shows the correct architecture for a set of different architecture object files.""" images = { ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21648: Make sure to reset to correct platform after TestImageListMultiArchitecture
fjricci planned changes to this revision. fjricci added a comment. That's reasonable, will do. http://reviews.llvm.org/D21648 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21648: Make sure to reset to correct platform after TestImageListMultiArchitecture
tfiala added a comment. In http://reviews.llvm.org/D21648#466011, @fjricci wrote: > I was wondering that as well. I thought there might be some value to testing > that the "disconnect->change platform->reconnect" path worked though. I have > no problem disabling if that doesn't seem useful though. I think that kind of test sounds good, but I would separate that into a test that is focused on that element rather than conflating it with this one. If you can switch this over to skipping the test on remote systems (should be @decorators.skipIfRemote IIRC), that would be ideal. http://reviews.llvm.org/D21648 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21648: Make sure to reset to correct platform after TestImageListMultiArchitecture
fjricci added a comment. I was wondering that as well. I thought there might be some value to testing that the "disconnect->change platform->reconnect" path worked though. I have no problem disabling if that doesn't seem useful though. http://reviews.llvm.org/D21648 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21648: Make sure to reset to correct platform after TestImageListMultiArchitecture
tfiala added a comment. Hi all, If memory serves me correctly, I originally wrote this test. I don't think it buys us anything to run it against remote targets. I think a better approach here is to just exclude it when running against a remote. We could instead use: @decorator.skipIfRemote http://reviews.llvm.org/D21648 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21648: Make sure to reset to correct platform after TestImageListMultiArchitecture
fjricci updated this revision to Diff 61717. fjricci added a comment. This revision is now accepted and ready to land. Disconnect from existing platform connection to prevent extra hanging connections This is good practice on all debug servers, and required for debug servers which can't handle more than one simultaneous platform mode connection. http://reviews.llvm.org/D21648 Files: packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py Index: packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py === --- packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py +++ packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py @@ -23,6 +23,10 @@ @no_debug_info_test def test_image_list_shows_multiple_architectures(self): """Test that image list properly shows the correct architecture for a set of different architecture object files.""" +# Don't leave residual open platform connections +if lldb.remote_platform: +lldb.remote_platform.DisconnectRemote() + images = { "hello-freebsd-10.0-x86_64-clang-3.3": re.compile(r"x86_64-(\*)?-freebsd10.0(-unknown)? x86_64"), "hello-freebsd-10.0-x86_64-gcc-4.7.3": re.compile(r"x86_64-(\*)?-freebsd10.0(-unknown)? x86_64"), @@ -39,5 +43,11 @@ self.runCmd("file {}".format(file_name)) self.match("image list -t -A", [expected_triple_and_arch_regex]) -# Revert to the host platform after all of this is done -self.runCmd("platform select host") + +# Revert to the original platform after all of this is done +if lldb.remote_platform: +platform_connect_options = lldb.SBPlatformConnectOptions(configuration.lldb_platform_url) +err = lldb.remote_platform.ConnectRemote(platform_connect_options) +self.assertTrue(err.Success()) +else: +self.runCmd("platform select host") Index: packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py === --- packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py +++ packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py @@ -23,6 +23,10 @@ @no_debug_info_test def test_image_list_shows_multiple_architectures(self): """Test that image list properly shows the correct architecture for a set of different architecture object files.""" +# Don't leave residual open platform connections +if lldb.remote_platform: +lldb.remote_platform.DisconnectRemote() + images = { "hello-freebsd-10.0-x86_64-clang-3.3": re.compile(r"x86_64-(\*)?-freebsd10.0(-unknown)? x86_64"), "hello-freebsd-10.0-x86_64-gcc-4.7.3": re.compile(r"x86_64-(\*)?-freebsd10.0(-unknown)? x86_64"), @@ -39,5 +43,11 @@ self.runCmd("file {}".format(file_name)) self.match("image list -t -A", [expected_triple_and_arch_regex]) -# Revert to the host platform after all of this is done -self.runCmd("platform select host") + +# Revert to the original platform after all of this is done +if lldb.remote_platform: +platform_connect_options = lldb.SBPlatformConnectOptions(configuration.lldb_platform_url) +err = lldb.remote_platform.ConnectRemote(platform_connect_options) +self.assertTrue(err.Success()) +else: +self.runCmd("platform select host") ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D21648: Make sure to reset to correct platform after TestImageListMultiArchitecture
fjricci planned changes to this revision. fjricci added a comment. This fix does not work without something along the lines of http://reviews.llvm.org/D21649, I'll re-upload with a better fix. http://reviews.llvm.org/D21648 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits