WebKit Bugzilla
Attachment 370758 Details for
Bug 198144
: webkitpy: Switch run-webkit-tests to tailspin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198144-20190528101622.patch (text/plain), 9.50 KB, created by
hysu
on 2019-05-28 10:16:22 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
hysu
Created:
2019-05-28 10:16:22 PDT
Size:
9.50 KB
patch
obsolete
>Subversion Revision: 245594 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 81eabc75e282715dfd8c4ee93533903066283a7f..2f14176be08a2e191d2933dfc303dc74f7781fe1 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,31 @@ >+2019-05-22 David Xiong <w_xiong@apple.com> >+ >+ webkitpy: Switch run-webkit-tests to tailspin >+ https://bugs.webkit.org/show_bug.cgi?id=198144 >+ <rdar://problem/32463212> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Changes run-webkit-tests to run tailspin on test time out >+ rather than spindump, and edited tests to look for tailspin logs >+ instead. >+ >+ * Scripts/webkitpy/port/darwin.py: >+ (DarwinPort.sample_process): Replaced spindump with tailspin (+ symbolication) >+ (DarwinPort): >+ (DarwinPort.tailspin_file_path): >+ (DarwinTest.spindump_file_path): Deleted. >+ * Scripts/webkitpy/port/darwin_testcase.py: >+ (DarwinTest.test_tailspin): Changed spindump test (below) to test for tailspin instead >+ (DarwinTest.test_spindump): Deleted. >+ (DarwinTest.test_spindump.logging_run_command): Deleted. >+ * Scripts/webkitpy/port/ios_device_unittest.py: >+ (IOSDeviceTest.test_tailspin): Changed spindump tests (inc. below) to test for tailspin instead >+ (IOSDeviceTest.test_sample_process.logging_run_command): >+ (IOSDeviceTest.test_sample_process_exception.throwing_run_command): >+ (IOSDeviceTest.test_spindump): Deleted. >+ (IOSDeviceTest.test_spindump.logging_run_command): Deleted. >+ > 2019-05-21 Carlos Garcia Campos <cgarcia@igalia.com> > > Unreviewed. Fix the build with HAVE(ACCESSIBILITY) disabled >diff --git a/Tools/Scripts/webkitpy/port/darwin.py b/Tools/Scripts/webkitpy/port/darwin.py >index 33a4bc97b8f05b31f9fef398b61c391350713220..abad1860d450839812dcbf1c2b84306854ae4a9d 100644 >--- a/Tools/Scripts/webkitpy/port/darwin.py >+++ b/Tools/Scripts/webkitpy/port/darwin.py >@@ -160,18 +160,31 @@ class DarwinPort(ApplePort): > def sample_process(self, name, pid, target_host=None): > host = target_host or self.host > tempdir = host.filesystem.mkdtemp() >+ temp_tailspin_file_path = host.filesystem.join(str(tempdir), "{0}-{1}-tailspin-temp.txt".format(name, pid)) > command = [ >- '/usr/sbin/spindump', >- pid, >- 10, >- 10, >- '-file', >- DarwinPort.spindump_file_path(host, name, pid, str(tempdir)), >+ '/usr/bin/tailspin', >+ 'save', >+ '-n', >+ temp_tailspin_file_path, > ] > if self.host.platform.is_mac(): > command = ['/usr/bin/sudo', '-n'] + command >+ > exit_status = host.executive.run_command(command, return_exit_code=True) >- if exit_status: >+ if not exit_status: # Symbolicate tailspin log using spindump >+ try: >+ host.executive.run_command([ >+ '/usr/sbin/spindump', >+ '-i', >+ temp_tailspin_file_path, >+ '-file', >+ DarwinPort.tailspin_file_path(host, name, pid, str(tempdir)), >+ ]) >+ host.filesystem.move_to_base_host(DarwinPort.tailspin_file_path(host, name, pid, str(tempdir)), >+ DarwinPort.tailspin_file_path(self.host, name, pid, self.results_directory())) >+ except IOError as e: >+ _log.warning('Unable to symbolicate tailspin log of process:' + str(e)) >+ else: # Tailspin failed, run sample instead > try: > host.executive.run_command([ > '/usr/bin/sample', >@@ -185,9 +198,6 @@ class DarwinPort(ApplePort): > DarwinPort.sample_file_path(self.host, name, pid, self.results_directory())) > except ScriptError as e: > _log.warning('Unable to sample process:' + str(e)) >- else: >- host.filesystem.move_to_base_host(DarwinPort.spindump_file_path(host, name, pid, str(tempdir)), >- DarwinPort.spindump_file_path(self.host, name, pid, self.results_directory())) > host.filesystem.rmtree(str(tempdir)) > > @staticmethod >@@ -195,8 +205,8 @@ class DarwinPort(ApplePort): > return host.filesystem.join(directory, "{0}-{1}-sample.txt".format(name, pid)) > > @staticmethod >- def spindump_file_path(host, name, pid, directory): >- return host.filesystem.join(directory, "{0}-{1}-spindump.txt".format(name, pid)) >+ def tailspin_file_path(host, name, pid, directory): >+ return host.filesystem.join(directory, "{0}-{1}-tailspin.txt".format(name, pid)) > > def look_for_new_samples(self, unresponsive_processes, start_time): > sample_files = {} >diff --git a/Tools/Scripts/webkitpy/port/darwin_testcase.py b/Tools/Scripts/webkitpy/port/darwin_testcase.py >index bcb3469f7c8c1f5b967214d25d342fee9b24add7..a9c64934abedf793cbe77ee25377926530c7279f 100644 >--- a/Tools/Scripts/webkitpy/port/darwin_testcase.py >+++ b/Tools/Scripts/webkitpy/port/darwin_testcase.py >@@ -98,18 +98,20 @@ class DarwinTest(port_testcase.PortTestCase): > port = self.make_port(host) > self.assertEqual(port.path_to_crash_logs(), '/Users/mock/Library/Logs/DiagnosticReports') > >- def test_spindump(self): >+ def test_tailspin(self): > > def logging_run_command(args): > print(args) > > port = self.make_port() >- port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-spindump.txt'] = 'Spindump file' >+ port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-tailspin-temp.txt'] = 'Temporary tailspin output file' >+ port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-tailspin.txt'] = 'Symbolocated tailspin file' > port.host.executive = MockExecutive2(run_command_fn=logging_run_command) >- expected_stdout = "['/usr/bin/sudo', '-n', '/usr/sbin/spindump', 42, 10, 10, '-file', '/__im_tmp/tmp_0_/test-42-spindump.txt']\n" >+ expected_stdout = "['/usr/bin/sudo', '-n', '/usr/bin/tailspin', 'save', '-n', '/__im_tmp/tmp_0_/test-42-tailspin-temp.txt']\n['/usr/sbin/spindump', '-i', '/__im_tmp/tmp_0_/test-42-tailspin-temp.txt', '-file', '/__im_tmp/tmp_0_/test-42-tailspin.txt']\n" > OutputCapture().assert_outputs(self, port.sample_process, args=['test', 42], expected_stdout=expected_stdout) >- self.assertEqual(port.host.filesystem.files['/mock-build/layout-test-results/test-42-spindump.txt'], 'Spindump file') >- self.assertIsNone(port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-spindump.txt']) >+ self.assertEqual(port.host.filesystem.files['/mock-build/layout-test-results/test-42-tailspin.txt'], 'Symbolocated tailspin file') >+ self.assertIsNone(port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-tailspin-temp.txt']) >+ self.assertIsNone(port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-tailspin.txt']) > > def test_sample_process(self): > >diff --git a/Tools/Scripts/webkitpy/port/ios_device_unittest.py b/Tools/Scripts/webkitpy/port/ios_device_unittest.py >index 4f612825765210e26eff7c19cd95324527a82e16..16e0de189332f86be48e6c4f777ce65e1116f477 100644 >--- a/Tools/Scripts/webkitpy/port/ios_device_unittest.py >+++ b/Tools/Scripts/webkitpy/port/ios_device_unittest.py >@@ -45,21 +45,23 @@ class IOSDeviceTest(ios_testcase.IOSTest): > with self.assertRaises(RuntimeError): > port.path_to_crash_logs() > >- def test_spindump(self): >+ def test_tailspin(self): > def logging_run_command(args): > print(args) > > port = self.make_port() >- port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-spindump.txt'] = 'Spindump file' >+ port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-tailspin-temp.txt'] = 'Temporary tailspin output file' >+ port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-tailspin.txt'] = 'Symbolocated tailspin file' > port.host.executive = MockExecutive2(run_command_fn=logging_run_command) >- expected_stdout = "['/usr/sbin/spindump', 42, 10, 10, '-file', '/__im_tmp/tmp_0_/test-42-spindump.txt']\n" >+ expected_stdout = "['/usr/bin/tailspin', 'save', '-n', '/__im_tmp/tmp_0_/test-42-tailspin-temp.txt']\n['/usr/sbin/spindump', '-i', '/__im_tmp/tmp_0_/test-42-tailspin-temp.txt', '-file', '/__im_tmp/tmp_0_/test-42-tailspin.txt']\n" > OutputCapture().assert_outputs(self, port.sample_process, args=['test', 42], expected_stdout=expected_stdout) >- self.assertEqual(port.host.filesystem.files['/mock-build/layout-test-results/test-42-spindump.txt'], 'Spindump file') >- self.assertIsNone(port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-spindump.txt']) >+ self.assertEqual(port.host.filesystem.files['/mock-build/layout-test-results/test-42-tailspin.txt'], 'Symbolocated tailspin file') >+ self.assertIsNone(port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-tailspin-temp.txt']) >+ self.assertIsNone(port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-tailspin.txt']) > > def test_sample_process(self): > def logging_run_command(args): >- if args[0] == '/usr/sbin/spindump': >+ if args[0] == '/usr/bin/tailspin': > return 1 > print(args) > return 0 >@@ -74,7 +76,7 @@ class IOSDeviceTest(ios_testcase.IOSTest): > > def test_sample_process_exception(self): > def throwing_run_command(args): >- if args[0] == '/usr/sbin/spindump': >+ if args[0] == '/usr/bin/tailspin': > return 1 > raise ScriptError('MOCK script error') >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198144
:
370468
|
370473
|
370566
|
370758
|
370774