This is an archive of the discontinued LLVM Phabricator instance.

Adjust NetBSD/sha2.cc to be portable to more environments
ClosedPublic

Authored by krytarowski on Dec 27 2018, 8:26 AM.

Details

Diff Detail

Repository
rL LLVM

Event Timeline

krytarowski created this revision.Dec 27 2018, 8:26 AM

Tests pass for me now.

This revision was not accepted when it landed; it landed in state Needs Review.Dec 27 2018, 9:09 AM
This revision was automatically updated to reflect the committed changes.
ruiu added a subscriber: ruiu.Dec 27 2018, 9:23 AM

Maybe you should just remove test4, 5, 6 and 7? Their test outputs are not checked at all now, and verifying a SHA hash of /etc/fstab doesn't make sense to me as a test.

Maybe you should just remove test4, 5, 6 and 7? Their test outputs are not checked at all now, and verifying a SHA hash of /etc/fstab doesn't make sense to me as a test.

test4: char *p = SHA_File(SHASIZE)("/etc/fstab", digest); we check whether p is accessible according to sanitizers. It's analogously with test 5, 6 and 7.

We want to keep checking this API, even if the output is allowed to be anything. The point is that it's accessible.