WebKit Bugzilla
Attachment 370468 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-20190522170253.patch (text/plain), 9.63 KB, created by
hysu
on 2019-05-22 17:02:54 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
hysu
Created:
2019-05-22 17:02:54 PDT
Size:
9.63 KB
patch
obsolete
>Subversion Revision: 245594 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 81eabc75e282715dfd8c4ee93533903066283a7f..b8d35b05f8da5672390f0cb775754d3eaddc429f 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,30 @@ >+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, and >+ edited tests to look for tailspin logs rather than spindump. >+ >+ * Scripts/webkitpy/port/darwin.py: >+ (DarwinPort.sample_process): >+ (DarwinPort): >+ (DarwinPort.temp_tailspin_file_path): >+ (DarwinPort.tailspin_file_path): >+ * Scripts/webkitpy/port/darwin_testcase.py: >+ (DarwinTest.test_tailspin): >+ (DarwinTest.test_spindump): Deleted. >+ (DarwinTest.test_spindump.logging_run_command): Deleted. >+ * Scripts/webkitpy/port/ios_device_unittest.py: >+ (IOSDeviceTest.test_tailspin): >+ (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..c38daf1cce40aa3424fad3f61b22bd8d659facb4 100644 >--- a/Tools/Scripts/webkitpy/port/darwin.py >+++ b/Tools/Scripts/webkitpy/port/darwin.py >@@ -160,18 +160,32 @@ class DarwinPort(ApplePort): > def sample_process(self, name, pid, target_host=None): > host = target_host or self.host > tempdir = host.filesystem.mkdtemp() >+ > command = [ >- '/usr/sbin/spindump', >- pid, >- 10, >- 10, >- '-file', >- DarwinPort.spindump_file_path(host, name, pid, str(tempdir)), >+ '/usr/bin/tailspin', >+ 'save', >+ '-n', >+ DarwinPort.temp_tailspin_file_path(host, name, pid, str(tempdir)), > ] > 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: >+ symbolicate_command = [ >+ '/usr/sbin/spindump', >+ '-i', >+ DarwinPort.temp_tailspin_file_path(host, name, pid, str(tempdir)), >+ '-file', >+ DarwinPort.tailspin_file_path(host, name, pid, str(tempdir)), >+ ] >+ host.executive.run_command(symbolicate_command) >+ 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,11 +199,9 @@ 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 > def sample_file_path(host, name, pid, directory): > return host.filesystem.join(directory, "{0}-{1}-sample.txt".format(name, pid)) >@@ -198,6 +210,14 @@ class DarwinPort(ApplePort): > def spindump_file_path(host, name, pid, directory): > return host.filesystem.join(directory, "{0}-{1}-spindump.txt".format(name, pid)) > >+ @staticmethod >+ def temp_tailspin_file_path(host, name, pid, directory): >+ return host.filesystem.join(directory, "{0}-{1}-tailspin-temp.txt".format(name, pid)) >+ >+ @staticmethod >+ 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 = {} > for (test_name, process_name, pid) in unresponsive_processes: >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