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++) {
|
for (i = 0; i < MDTESTCOUNT; i++) {
|
||||||
(*alg->Data)(MDTestInput[i], strlen(MDTestInput[i]), buffer);
|
(*alg->Data)(MDTestInput[i], strlen(MDTestInput[i]), buffer);
|
||||||
printf("%s (\"%s\") = %s", alg->name, 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");
|
printf(" - verified correct\n");
|
||||||
else
|
} else {
|
||||||
printf(" - INCORRECT RESULT!\n");
|
printf(" - INCORRECT RESULT!\n");
|
||||||
|
failed++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user