This is an archive of the discontinued LLVM Phabricator instance.

[lld] [test] Fix reproduce-blackslash.s test with NetBSD tar
ClosedPublic

Authored by mgorny on Dec 7 2018, 9:12 AM.

Details

Summary

Unlike GNU tar and libarchive bsdtar, NetBSD 'tar -t' output does not
use C-style escapes and instead outputs paths literally. Fix the test
to account both for escaped and literal backslash output.

Diff Detail

Repository
rL LLVM

Event Timeline

mgorny created this revision.Dec 7 2018, 9:12 AM

In my opinion it's better to set UNSUPPORTED and align the NetBSD tar to GNU tar and libarchive.

ruiu added a comment.Dec 7 2018, 10:27 AM

I thought NetBSD's tar is bsdtar because it's BSD... Anyways, I think I'm fine with this change, as the new test (which matches both foo\\.o and foo\.o) does not match a string that we don't want it to match.

ruiu accepted this revision.Dec 7 2018, 10:37 AM

LGTM

We might be able to change NetBSD's tar but I guess that takes very long time. This test is not very important in the sense that this tests just test a corner case. So I think we should just land this to make it work on NetBSD.

This revision is now accepted and ready to land.Dec 7 2018, 10:37 AM

bsdtar is libarchive (by BSD people too)

We can align our native tar later and land this as is.

This revision was automatically updated to reflect the committed changes.