NetBSD Problem Report #51823
From www@NetBSD.org Wed Jan 11 07:43:38 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 7D3AA7A1BE
for <gnats-bugs@gnats.NetBSD.org>; Wed, 11 Jan 2017 07:43:38 +0000 (UTC)
Message-Id: <20170111074337.62B267A2B2@mollari.NetBSD.org>
Date: Wed, 11 Jan 2017 07:43:37 +0000 (UTC)
From: yaneurabeya@gmail.com
Reply-To: yaneurabeya@gmail.com
To: gnats-bugs@NetBSD.org
Subject: [PATCH] add output diagnostic if memcmp of the md5 string fails
X-Send-Pr-Version: www-1.0
>Number: 51823
>Category: bin
>Synopsis: [PATCH] add output diagnostic if memcmp of the md5 string fails
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jan 11 07:45:00 +0000 2017
>Closed-Date: Sun Jun 03 08:51:00 +0000 2018
>Last-Modified: Sun Jun 03 08:51:00 +0000 2018
>Originator: Ngie Cooper
>Release: 7.0.2
>Organization:
>Environment:
n/a
>Description:
Outputting the compared md5 strings on failure can be helpful when debugging why the expected result and the actual result don't match.
This was helpful on FreeBSD for determining why the test case was failing after random(4) was modified this past year.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/51823: [PATCH] add output diagnostic if memcmp of the md5
string fails
Date: Tue, 10 Jan 2017 23:56:35 -0800
--Apple-Mail=_8AD8B933-FD5A-49B1-B13F-163DB5FB29D3
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=us-ascii
Patch attached.
--Apple-Mail=_8AD8B933-FD5A-49B1-B13F-163DB5FB29D3
Content-Disposition: attachment;
filename*0=t_memcpy-output-result-of-md5-comparison-for-diagnosis-purposes.;
filename*1=patch
Content-Type: application/octet-stream;
x-unix-mode=0644;
name="t_memcpy-output-result-of-md5-comparison-for-diagnosis-purposes.patch"
Content-Transfer-Encoding: 7bit
Index: t_memcpy.c
===================================================================
RCS file: /cvsroot/src/tests/lib/libc/string/t_memcpy.c,v
retrieving revision 1.5
diff -u -r1.5 t_memcpy.c
--- t_memcpy.c 17 Mar 2013 02:23:31 -0000 1.5
+++ t_memcpy.c 11 Jan 2017 07:37:10 -0000
@@ -96,7 +96,8 @@
if (i != j)
runTest(start[i], start[j]);
MD5End(mc, result);
- ATF_REQUIRE_EQ(strcmp(result, goodResult), 0);
+ ATF_REQUIRE_EQ_MSG(strcmp(result, goodResult), 0, "%s != %s",
+ result, goodResult);
}
ATF_TC(memccpy_simple);
--Apple-Mail=_8AD8B933-FD5A-49B1-B13F-163DB5FB29D3--
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51823 CVS commit: src/tests/lib/libc/string
Date: Wed, 11 Jan 2017 13:05:54 -0500
Module Name: src
Committed By: christos
Date: Wed Jan 11 18:05:54 UTC 2017
Modified Files:
src/tests/lib/libc/string: t_memcpy.c
Log Message:
PR/51823: Ngie Cooper: Add output diagnostic if memcmp of the md5 string fails
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/string/t_memcpy.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Sun, 03 Jun 2018 08:51:00 +0000
State-Changed-Why:
Committed by christos. Thanks for the patch.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.