This is an archive of the discontinued LLVM Phabricator instance.

Explicitly state the output file.
ClosedPublic

Authored by saugustine on Feb 12 2020, 9:25 PM.

Details

Summary

Even though this test is a check for failure, lld still attempts
to open the final output file, which fails when the default "a.out"
file is used and the current directory is read-only. Specifying an
output file works around this problem.

Event Timeline

saugustine created this revision.Feb 12 2020, 9:25 PM
mehdi_amini accepted this revision.Feb 12 2020, 9:29 PM
mehdi_amini added a subscriber: mehdi_amini.

Writing to a temp file seems like generally the right pattern, if only because a concurrent test could race on the file creation/deletion.

This revision is now accepted and ready to land.Feb 12 2020, 9:29 PM
This revision was automatically updated to reflect the committed changes.
MaskRay added inline comments.Feb 12 2020, 9:37 PM
lld/test/ELF/linkerscript/insert-not-exist.test
3

-o /dev/null