Skip to content

[llvm-lit][compiler-rt] Test using 'export' failing to execute with lit internal shell due to too many arguments #106142

Closed
@connieyzhu

Description

@connieyzhu

The following RUN line in compiler-rt/test/asan/TestCases/Posix/high-address-dereference.c fails when run with lit's internal shell because export is given two arguments instead of only one.
RUN: export %env_asan_opts=print_scariness=1

%env_asan_opts expands to env ASAN_OPTIONS, which is why the test is failing to execute.

This is the error message given when running compiler-rt tests with LIT_USE_INTERNAL_SHELL=1.

FAIL: AddressSanitizer-x86_64-linux-dynamic :: TestCases/Posix/high-address-dereference.c (1 of 2)
******************** TEST 'AddressSanitizer-x86_64-linux-dynamic :: TestCases/Posix/high-address-dereference.c' FAILED ********************
Exit Code: 127

Command Output (stdout):
--
# RUN: at line 7
/usr/local/google/home/connieyzhu/llvm-fork/build/./bin/clang  -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only   -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta   -shared-libasan /usr/local/google/home/connieyzhu/llvm-fork/compiler-rt/test/asan/TestCases/Posix/high-address-dereference.c -o /usr/local/google/home/connieyzhu/llvm-fork/build/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/compiler-rt/test/asan/X86_64LinuxDynamicConfig/TestCases/Posix/Output/high-address-dereference.c.tmp
# executed command: /usr/local/google/home/connieyzhu/llvm-fork/build/./bin/clang -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -shared-libasan /usr/local/google/home/connieyzhu/llvm-fork/compiler-rt/test/asan/TestCases/Posix/high-address-dereference.c -o /usr/local/google/home/connieyzhu/llvm-fork/build/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/compiler-rt/test/asan/X86_64LinuxDynamicConfig/TestCases/Posix/Output/high-address-dereference.c.tmp
# RUN: at line 8
export env ASAN_OPTIONS=print_scariness=1
# executed command: export env ASAN_OPTIONS=print_scariness=1
# .---command stderr------------
# | 'export' supports only one argument
# `-----------------------------
# error: command failed with exit status: 127

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions