Bug 148592 - Fix run-webkit-tests --additional-env-var="DYLD_INSERT_LIBRARIES=..."
Summary: Fix run-webkit-tests --additional-env-var="DYLD_INSERT_LIBRARIES=..."
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-28 14:55 PDT by Alexey Proskuryakov
Modified: 2015-08-31 09:26 PDT (History)
7 users (show)

See Also:


Attachments
proposed fix (3.52 KB, patch)
2015-08-28 15:02 PDT, Alexey Proskuryakov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2015-08-28 14:55:50 PDT
run-webkit-tests doesn't respect DYLD_INSERT_LIBRARIES passed as --additional-env-var.

This is a problem when testing an ASan-built framework with a non-ASan build of WebKit. When main executable is not built with ASAn, you need to insert ASan's dynamic library manually.
Comment 1 Alexey Proskuryakov 2015-08-28 15:02:15 PDT
Created attachment 260182 [details]
proposed fix
Comment 2 Tim Horton 2015-08-28 15:04:22 PDT
Comment on attachment 260182 [details]
proposed fix

View in context: https://bugs.webkit.org/attachment.cgi?id=260182&action=review

> Tools/Scripts/webkitpy/port/base.py:860
> +            env[name] = env[name] + ":" + value

what if env[name] has a trailing :
Comment 3 Alexey Proskuryakov 2015-08-28 15:21:42 PDT
> what if env[name] has a trailing :

I don't know! Would guess that "::" is probably OK, but also this shouldn't happen.
Comment 4 Tim Horton 2015-08-28 15:29:43 PDT
(In reply to comment #3)
> > what if env[name] has a trailing :
> 
> I don't know! Would guess that "::" is probably OK, but also this shouldn't
> happen.

Safe in this case. Not safe if you're mutating $PATH. But sure :D
Comment 5 WebKit Commit Bot 2015-08-28 15:51:02 PDT
Comment on attachment 260182 [details]
proposed fix

Clearing flags on attachment: 260182

Committed r189128: <http://trac.webkit.org/changeset/189128>
Comment 6 WebKit Commit Bot 2015-08-28 15:51:06 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Alexey Proskuryakov 2015-08-31 09:26:56 PDT
> Safe in this case. Not safe if you're mutating $PATH. But sure :D

Turns out that at least for bash, a trailing colon in PATH needs to be converted to a double colon when appending:

"A null directory name may appear as two adjacent colons, or as an initial or trailing colon."

Obviously not a behavior to rely upon.