Bug 208545

Summary: [macOS] test-lldb-webkit failing on debug bots
Product: WebKit Reporter: Ryan Haddad <ryanhaddad>
Component: Tools / TestsAssignee: Ryan Haddad <ryanhaddad>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, ap, commit-queue, jbedard, webkit-bot-watchers-bugzilla, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Ryan Haddad 2020-03-03 16:35:00 PST
python ./Tools/Scripts/test-lldb-webkit --verbose --no-build
 in dir /Volumes/Data/slave/catalina-debug-tests-wk2/build (timeout 1200 secs)
 watching logfiles {}
 argv: ['python', './Tools/Scripts/test-lldb-webkit', '--verbose', '--no-build']
 environment:
  HOME=/Users/buildbot
  LOGNAME=buildbot
  OLDPWD=/Users/buildbot
  PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
  PWD=/Volumes/Data/slave/catalina-debug-tests-wk2/build
  PYPI_MIRRORS=pypi.apple.com
  SHELL=/bin/bash
  SHLVL=1
  SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.OCv7dFIiID/Listeners
  TMPDIR=/var/folders/1l/gbpzn62d6y9fd5vqt0g1l62m0000gn/T/
  USER=buildbot
  VERSIONER_PYTHON_VERSION=2.7
  XPC_FLAGS=0x0
  XPC_SERVICE_NAME=0
  _=/usr/local/bin/twistd
  __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
 using PTY: False
WARNING: Executing a script that is loading libcrypto in an unsafe way. This will fail in a future version of macOS. Set the LIBRESSL_REDIRECT_STUB_ABORT=1 in the environment to force this into an error.
Suppressing most webkitpy logging while running unit tests.
Failed to find lldbWebKitTester.
Failed to find lldbWebKitTester.
program finished with exit code 1
elapsedTime=0.940733
Comment 1 Ryan Haddad 2020-03-03 16:37:09 PST
On this particular bot, I deleted the lldbWebKitTester binary. I verified that it is indeed downloaded as part of the testing archive, but the script isn't picking that up.

I think the issue is that we do not pass the configuration to the script (i.e. --debug), so it isn't looking for the binary in the correct place.
Comment 2 Radar WebKit Bug Importer 2020-03-03 16:37:41 PST
<rdar://problem/60019103>
Comment 3 Ryan Haddad 2020-03-03 16:38:16 PST
This fails:

bot243:build buildbot$ ./Tools/Scripts/test-lldb-webkit --verbose --debug
WARNING: Executing a script that is loading libcrypto in an unsafe way. This will fail in a future version of macOS. Set the LIBRESSL_REDIRECT_STUB_ABORT=1 in the environment to force this into an error.
Suppressing most webkitpy logging while running unit tests.
Building lldbWebKitTester ...Traceback (most recent call last):
  File "./Tools/Scripts/test-lldb-webkit", line 145, in <module>
    sys.exit(main())
  File "./Tools/Scripts/test-lldb-webkit", line 141, in main
    return not tester.run(host=host, webkit_root=webkit_root)
  File "./Tools/Scripts/test-lldb-webkit", line 107, in run
    [build_lldbwebkittester, config.flag_for_configuration(configuration_to_use)],
  File "/Volumes/Data/slave/catalina-debug-tests-wk2/build/Tools/Scripts/webkitpy/port/config.py", line 108, in flag_for_configuration
    return self._FLAGS_FROM_CONFIGURATIONS[configuration]
KeyError: 'debug'

This works:

bot243:build buildbot$ ./Tools/Scripts/test-lldb-webkit --configuration Debug --no-build
WARNING: Executing a script that is loading libcrypto in an unsafe way. This will fail in a future version of macOS. Set the LIBRESSL_REDIRECT_STUB_ABORT=1 in the environment to force this into an error.
Suppressing most webkitpy logging while running unit tests.
Ran 39 tests in 6.904s

OK
Comment 4 Ryan Haddad 2020-03-03 16:48:45 PST
Created attachment 392349 [details]
Patch
Comment 5 Ryan Haddad 2020-03-03 17:12:28 PST
Created attachment 392352 [details]
Patch

Patch with a better ChangeLog.
Comment 6 Jonathan Bedard 2020-03-03 21:53:20 PST
Comment on attachment 392352 [details]
Patch

r+ing because explicit is better than implicit.

That being said, this mean that the lldb test runner isn’t correctly using the cached build, which is another bug.
Comment 7 WebKit Commit Bot 2020-03-04 10:35:34 PST
Comment on attachment 392352 [details]
Patch

Clearing flags on attachment: 392352

Committed r257859: <https://trac.webkit.org/changeset/257859>
Comment 8 WebKit Commit Bot 2020-03-04 10:35:36 PST
All reviewed patches have been landed.  Closing bug.