[PATCH] Add step to remove all forward socket connections before running test on android

Ying Chen chying at google.com
Thu May 7 14:30:09 PDT 2015


Hi sivachandra, chaoren, vharron,

Forward socket connections were not removed for crashed tests, and this left many open socket connections on slave machine. Add step on buildbot to remove all forwarded ports.

http://reviews.llvm.org/D9578

Files:
  zorg/buildbot/builders/LLDBBuilder.py

Index: zorg/buildbot/builders/LLDBBuilder.py
===================================================================
--- zorg/buildbot/builders/LLDBBuilder.py
+++ zorg/buildbot/builders/LLDBBuilder.py
@@ -281,6 +281,17 @@
                     testenv['LLDB_TEST_THREADS'] = '8'
                     extraTestFlag = ' -m'
                     urlStr = 'adb://%(deviceid)s:%(remote_port)s'
+                    # for Android, remove all forwarded ports before running test
+                    # it is noticed that forwarded socket connections were not cleaned for certain crashed tests
+                    # clean it here to avoid too many "LISTEN" ports left on slave
+                    f.addStep(ShellCommand(name="remove port forwarding %s" % arch,
+                                           command=['adb',
+                                                    'forward',
+                                                    '--remove-all'],
+                                           description="Remove port forwarding",
+                                           env=env,
+                                           haltOnFailure=False,
+                                           workdir='%s' % llvm_builddir))
                 DOTEST_OPTS += ''.join([' --platform-name remote-' + remote_platform,
                                         ' --platform-url ' + urlStr,
                                         ' --platform-working-dir %(remote_dir)s',

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9578.25237.patch
Type: text/x-patch
Size: 1459 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150507/28ecfbb6/attachment.bin>


More information about the llvm-commits mailing list