Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-557] Test failure on Linux if LD_LIBRARY_PATH set #43174

Open
lhoward opened this issue Jan 16, 2016 · 2 comments
Open

[SR-557] Test failure on Linux if LD_LIBRARY_PATH set #43174

lhoward opened this issue Jan 16, 2016 · 2 comments
Labels
compiler The Swift compiler in itself task

Comments

@lhoward
Copy link
Contributor

lhoward commented Jan 16, 2016

Previous ID SR-557
Radar None
Original Reporter @lhoward
Type Task
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Task
Assignee None
Priority Medium

md5: ea584f8027836b2a59afbb6a7a6438a2

Issue Description:

This test failed for me on Linux:

lukeh@ubuntu:~/CVSRoot/apple$ env SDKROOT= '/home/lukeh/CVSRoot/apple/build/Ninja-DebugAssert/swift-linux-x86_64/bin/swift' -module-cache-path '/tmp/swift-testsuite-clang-module-cacheUl1Ux1' -target x86_64-unknown-gnu-linux -L/foo/ -driver-use-frontend-path /home/lukeh/CVSRoot/apple/swift/test/Driver/Inputs/print-var.sh /home/lukeh/CVSRoot/apple/swift/test/Driver/environment.swift LD_LIBRARY_PATH | /home/lukeh/CVSRoot/apple/build/Ninja-DebugAssert/llvm-linux-x86_64/bin/FileCheck /home/lukeh/CVSRoot/apple/swift/test/Driver/environment.swift
/home/lukeh/CVSRoot/apple/swift/test/Driver/environment.swift:5:11: error: expected string not found in input
// CHECK: {{^/foo/:[^:]+/lib/swift/linux$}}
          ^
<stdin>:1:1: note: scanning from here
/foo/:/home/lukeh/CVSRoot/apple/swift/test/Driver/lib/swift/linux:/home/lukeh/CVSRoot/apple/build/Ninja-DebugAssert/foundation-linux-x86_64/Foundation:/home/lukeh/CVSRoot/apple/build/Ninja-DebugAssert/swift-linux-x86_64/lib/swift/linux:/home/lukeh/CVSRoot/apple/build/Ninja-DebugAssert/xctest-linux-x86_64
^
<stdin>:1:36: note: possible intended match here
/foo/:/home/lukeh/CVSRoot/apple/swift/test/Driver/lib/swift/linux:/home/lukeh/CVSRoot/apple/build/Ninja-DebugAssert/foundation-linux-x86_64/Foundation:/home/lukeh/CVSRoot/apple/build/Ninja-DebugAssert/swift-linux-x86_64/lib/swift/linux:/home/lukeh/CVSRoot/apple/build/Ninja-DebugAssert/xctest-linux-x86_64
                                   ^

It turns out that I already had LD_LIBRARY_PATH set to point to the build directory (for testing other things in-place), and this seems to have broken the test result. Unsetting LD_LIBRARY_PATH unbreaks the test.

@belkadan
Copy link
Contributor

Hm. lit is supposed to filter out potentially hazardous environment variables, and I figured this would be one of them. But we can certainly change the test to explicitly clear LD_LIBRARY_PATH.

@Dante-Broggi
Copy link
Contributor

Has this been resolved? If so, it should be closed.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler in itself task
Projects
None yet
Development

No branches or pull requests

3 participants