This is an archive of the discontinued LLVM Phabricator instance.

[test][objcopy] Replace GNU sed extension with BSD compatible syntax.
ClosedPublic

Authored by drodriguez on Oct 26 2021, 5:06 PM.

Details

Summary

GNU sed offers the ,+4d to delete the line a next four lines, but BSD
sed doesn't seem to support it (at least in macOS 10.15, but seems to do
in my 11.6 version).

Replace the usage of the extension with the equivalent syntax that works
both in BSD and GNU sed. I don't have a macOS 10.15 to check, but this
works in both my macOS 11.6 and Linux machines.

The problem was introduced in D111164. It also contains a small change to
not use cat proposed in feedback in that other diff.

Diff Detail

Event Timeline

drodriguez created this revision.Oct 26 2021, 5:06 PM
drodriguez requested review of this revision.Oct 26 2021, 5:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 26 2021, 5:06 PM
smeenai accepted this revision.Oct 26 2021, 5:23 PM

LGTM

This revision is now accepted and ready to land.Oct 26 2021, 5:23 PM

The LLD test compact-unwind-bad-reloc.s failed during the checks, but seems to be fixed in https://reviews.llvm.org/rG1d2a4cd57df590a5d9a6aec9ecdf93a523c8b64b

This revision was landed with ongoing or failed builds.Oct 26 2021, 5:37 PM
This revision was automatically updated to reflect the committed changes.
thakis added a subscriber: thakis.Oct 26 2021, 6:01 PM

This breaks tests on macOS: http://45.33.8.238/mac/37731/step_11.txt

Please take a look, and revert for now if it takes a while to fix.

I attempted to fix this in 3c0cf7e1a9a3. We'll know if it worked in 15 min or so.

Looks like that worked. All my bots are happy now.

Sorry about more breakage. I don’t understand how I was testing for these to pass over and over before submitting.

Thanks for the fix.