svn commit: r363457 - head/sbin/md5
Ed Maste
emaste at FreeBSD.org
Thu Jul 23 20:06:24 UTC 2020
Author: emaste
Date: Thu Jul 23 20:06:24 2020
New Revision: 363457
URL: https://svnweb.freebsd.org/changeset/base/363457
Log:
md5: return non-zero if built-in tests (-x) fail
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Modified:
head/sbin/md5/md5.c
Modified: head/sbin/md5/md5.c
==============================================================================
--- head/sbin/md5/md5.c Thu Jul 23 19:43:49 2020 (r363456)
+++ head/sbin/md5/md5.c Thu Jul 23 20:06:24 2020 (r363457)
@@ -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++;
+ }
}
}
More information about the svn-src-head
mailing list