NetBSD Problem Report #51806
From www@NetBSD.org Tue Jan 10 09:01:18 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 AAF467A26F
for <gnats-bugs@gnats.NetBSD.org>; Tue, 10 Jan 2017 09:01:18 +0000 (UTC)
Message-Id: <20170110090117.8912F7A2AF@mollari.NetBSD.org>
Date: Tue, 10 Jan 2017 09:01:17 +0000 (UTC)
From: yaneurabeya@gmail.com
Reply-To: yaneurabeya@gmail.com
To: gnats-bugs@NetBSD.org
Subject: [PATCH] tests/lib/libc/gen/t_vis.c: only run strvis_locale test cases if VIS_NOLOCALE is defined
X-Send-Pr-Version: www-1.0
>Number: 51806
>Category: bin
>Synopsis: [PATCH] tests/lib/libc/gen/t_vis.c: only run strvis_locale test cases if VIS_NOLOCALE is defined
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 10 09:05:00 +0000 2017
>Closed-Date: Tue Jan 10 18:13:03 +0000 2017
>Last-Modified: Tue Jan 10 18:13:03 +0000 2017
>Originator: Ngie Cooper
>Release: 7.0.2
>Organization:
>Environment:
n/a
>Description:
I discovered (when porting the test case to FreeBSD ^/stable/10) that tests/lib/libc/gen/t_vis.c wouldn't compile because it lacked a copy of strvis which supported strvis_locale. In order to compensate for this, I added appropriate #ifdefs for VIS_NOLOCALE around strvis_locale.
This seems to affect NetBSD 7.0.2 as well when testing the build there (it fails before my patch).
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: Ngie Cooper (yaneurabeya) <yaneurabeya@gmail.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/51806: [PATCH] tests/lib/libc/gen/t_vis.c: only run
strvis_locale test cases if VIS_NOLOCALE is defined
Date: Tue, 10 Jan 2017 01:10:27 -0800
--Apple-Mail=_6B8926F1-A808-49D2-A30B-901E4FACC291
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=us-ascii
Patch attached.
--Apple-Mail=_6B8926F1-A808-49D2-A30B-901E4FACC291
Content-Disposition: attachment;
filename*0=only-run-strvis_locale-testcases-if-VIS_NOLOCALE-is-defined.patc;
filename*1=h
Content-Type: application/octet-stream;
x-unix-mode=0644;
name="only-run-strvis_locale-testcases-if-VIS_NOLOCALE-is-defined.patch"
Content-Transfer-Encoding: 7bit
Index: t_vis.c
===================================================================
RCS file: /cvsroot/src/tests/lib/libc/gen/t_vis.c,v
retrieving revision 1.8
diff -u -r1.8 t_vis.c
--- t_vis.c 23 May 2015 14:02:11 -0000 1.8
+++ t_vis.c 10 Jan 2017 08:58:05 -0000
@@ -144,6 +144,7 @@
}
}
+#ifdef VIS_NOLOCALE
ATF_TC(strvis_locale);
ATF_TC_HEAD(strvis_locale, tc)
{
@@ -172,6 +173,7 @@
setlocale(LC_CTYPE, ol);
free(ol);
}
+#endif /* VIS_NOLOCALE */
ATF_TP_ADD_TCS(tp)
{
@@ -180,7 +182,9 @@
ATF_TP_ADD_TC(tp, strvis_null);
ATF_TP_ADD_TC(tp, strvis_empty);
ATF_TP_ADD_TC(tp, strunvis_hex);
+#ifdef VIS_NOLOCALE
ATF_TP_ADD_TC(tp, strvis_locale);
+#endif /* VIS_NOLOCALE */
return atf_no_error();
}
--Apple-Mail=_6B8926F1-A808-49D2-A30B-901E4FACC291--
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51806 CVS commit: src/tests/lib/libc/gen
Date: Tue, 10 Jan 2017 10:16:57 -0500
Module Name: src
Committed By: christos
Date: Tue Jan 10 15:16:57 UTC 2017
Modified Files:
src/tests/lib/libc/gen: t_vis.c
Log Message:
PR/51806: Ngie Cooper: Only run the vis locale test if VIS_NOLOCALE is defined
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/lib/libc/gen/t_vis.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: dholland@NetBSD.org
State-Changed-When: Tue, 10 Jan 2017 18:13:03 +0000
State-Changed-Why:
christos committed it, thanks
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.