mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 09:10:28 +00:00
md5: return non-zero if built-in tests (-x) fail
MFC after: 1 week Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
205f3e1597
commit
af9de844c4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=363457
|
@ -498,10 +498,12 @@ MDTestSuite(const Algorithm_t *alg)
|
|||
for (i = 0; i < MDTESTCOUNT; i++) {
|
||||
(*alg->Data)(MDTestInput[i], strlen(MDTestInput[i]), buffer);
|
||||
printf("%s (\"%s\") = %s", alg->name, MDTestInput[i], buffer);
|
||||
if (strcmp(buffer, (*alg->TestOutput)[i]) == 0)
|
||||
if (strcmp(buffer, (*alg->TestOutput)[i]) == 0) {
|
||||
printf(" - verified correct\n");
|
||||
else
|
||||
} else {
|
||||
printf(" - INCORRECT RESULT!\n");
|
||||
failed++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue