Page MenuHomePhabricator

[lld-macho][test] Add test for UUID format
ClosedPublic

Authored by int3 on Jan 31 2022, 12:58 PM.

Details

Reviewers
keith
Group Reviewers
Restricted Project
Commits
rG96fb7d059da1: [lld-macho][test] Add test for UUID format

Diff Detail

Event Timeline

int3 created this revision.Jan 31 2022, 12:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 31 2022, 12:58 PM
int3 requested review of this revision.Jan 31 2022, 12:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 31 2022, 12:58 PM
keith accepted this revision as: keith.Jan 31 2022, 3:29 PM
This revision is now accepted and ready to land.Jan 31 2022, 3:29 PM
thevinster added inline comments.
lld/test/MachO/uuid.s
6

How come we can't do strict match here? It shouldn't ever change right? Also, {{([[:xdigit:]]{8})}} should be 12? LC_UUID shows 12 characters for me on that.

int3 added inline comments.Jan 31 2022, 8:32 PM
lld/test/MachO/uuid.s
6

It shouldn't ever change right?

The UUID is a hash, so if we e.g. adjusted how LLD encodes something in the mach header, this would change. It would be annoying to have to update it every time something like that happens.

Also, by using a regex, we can make it clear what behavior is invariant across all binaries, not just this specific one.

LC_UUID shows 12 characters for me on that.

Whoops, you're right, good catch!

This revision was automatically updated to reflect the committed changes.